Static vs Dynamic Routing: Differences and How to Configure Them

Static routing means an administrator manually enters each route into a router, while dynamic routing lets routers learn routes automatically from each other using protocols such as OSPF, EIGRP, RIP or BGP. Static routes are simple, predictable and use no extra bandwidth, which suits small networks, default routes and stub sites, but they do not adapt when links fail.

Jul 05, 2025 - 14:42
Updated: 
104.1k

Networking in IT Infrastructure · Comparison

Static vs Dynamic Routing: Differences and How to Configure Them

Quick answer: Static routing means an administrator manually enters each route into a router, while dynamic routing lets routers learn routes automatically from each other using protocols such as OSPF, EIGRP, RIP or BGP. Static routes are simple, predictable and use no extra bandwidth, which suits small networks, default routes and stub sites, but they do not adapt when links fail. Dynamic routing scales to larger networks and reroutes around failures automatically, at the cost of more complexity and the need to secure the routing protocol. Most real networks use both.

Key takeaways

  • Static routes are manual and do not react to failures unless designed as backups.
  • Dynamic protocols share routes and recalculate paths automatically.
  • OSPF is common inside organisations; BGP connects organisations and ISPs.
  • Administrative distance decides which source wins when several offer a route.
  • Secure dynamic routing with authentication and filtering.

Table of Contents

How Do Static and Dynamic Routing Compare?

StaticDynamic
ConfigurationManual per routeProtocol learns routes
Reaction to failureNone, unless a backup route is configuredAutomatic reconvergence
OverheadNoneProtocol messages, CPU and memory
ScaleSmall or simple networksMedium to very large networks
SecurityNo protocol to attackNeeds authentication and filtering
Typical useDefault route, stub sitesCampus, data centre, WAN, internet

How Do You Configure Static Routes?

! Cisco IOS: route to 10.20.0.0/16 via 192.168.1.2
ip route 10.20.0.0 255.255.0.0 192.168.1.2
! Default route to the ISP
ip route 0.0.0.0 0.0.0.0 203.0.113.1
! Floating static backup (higher distance, used only if the primary fails)
ip route 0.0.0.0 0.0.0.0 198.51.100.1 250

# Linux equivalent
sudo ip route add 10.20.0.0/16 via 192.168.1.2

Cisco documents options in its static routing guide.

Which Dynamic Routing Protocols Exist?

ProtocolTypeUse
RIP v2Distance vectorLegacy and labs; slow, hop limit of 15
OSPFLink stateEnterprise interior routing
EIGRPAdvanced distance vectorCisco-centric networks
BGPPath vectorBetween organisations and ISPs; large data centres

How Do You Configure Basic OSPF?

router ospf 1
 router-id 1.1.1.1
 network 10.0.0.0 0.0.255.255 area 0
 passive-interface default
 no passive-interface GigabitEthernet0/0
!
! Verify
show ip ospf neighbor
show ip route ospf

passive-interface default stops OSPF talking on user-facing ports unless explicitly enabled.

When several sources offer a route to the same network, routers prefer the lowest administrative distance. On Cisco devices defaults include connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110 and RIP 120. Raising a static route's distance creates a floating backup that only appears when the dynamic route disappears.

How Do You Secure Routing?

  • Enable routing protocol authentication, such as OSPF HMAC-SHA (RFC 5709).
  • Use passive interfaces so routing runs only where needed.
  • Filter routes you accept and advertise, especially with BGP.
  • Restrict management access and log routing changes, as the NSA Network Infrastructure Security Guide advises.

Related: the TCP/IP model and scalable network design. WebAsha offers CCNA and CCNP training.

References

Frequently Asked Questions

Routing where an administrator manually configures each route, which stays fixed until someone changes it.

Routing where routers exchange information with protocols such as OSPF or BGP and update paths automatically.

For small networks, default routes to an ISP, stub sites with one exit, and backup routes.

OSPF is widely used inside organisations, while BGP is used between organisations and internet providers.

A static route with a higher administrative distance that is used only when the primary route disappears.

A value routers use to choose between routing sources; the lower the distance, the more trusted the route.

Yes. Attackers can inject false routes, so use authentication, passive interfaces and route filtering.

Yes. Most networks run a dynamic protocol internally and use static routes for defaults and special cases.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.