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.
Topic: Networking in IT Infrastructure · Comparison
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?
- How Do You Configure Static Routes?
- Which Dynamic Routing Protocols Exist?
- How Do You Configure Basic OSPF?
- What Is Administrative Distance?
- How Do You Secure Routing?
- References
How Do Static and Dynamic Routing Compare?
| Static | Dynamic | |
|---|---|---|
| Configuration | Manual per route | Protocol learns routes |
| Reaction to failure | None, unless a backup route is configured | Automatic reconvergence |
| Overhead | None | Protocol messages, CPU and memory |
| Scale | Small or simple networks | Medium to very large networks |
| Security | No protocol to attack | Needs authentication and filtering |
| Typical use | Default route, stub sites | Campus, 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?
| Protocol | Type | Use |
|---|---|---|
| RIP v2 | Distance vector | Legacy and labs; slow, hop limit of 15 |
| OSPF | Link state | Enterprise interior routing |
| EIGRP | Advanced distance vector | Cisco-centric networks |
| BGP | Path vector | Between 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.
What Is Administrative Distance?
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
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0