Cisco Routing ip default-network vs. Default Static Routes
Below is a MRR and PLR article in category Computers Technology -> subcategory Computer Certification.
Cisco Routing: "ip default-network" vs. Default Static Routes
Understanding the Differences: Static Routes vs. ip default-network
Many CCNA and CCNP candidates often confuse static default routes with the Cisco command `ip default-network`. While they might seem similar at first glance, they serve different purposes in network routing.
Key Differences
Both options enable the designation of a route for packets when no specific route exists in the routing table. However, the distinction lies in their scope and behavior:
- Default Static Route: This only defines a default route for the router on which it is configured.
- ip default-network: This propagates the route through the routing protocol to other routers.
Illustrative Example
Consider a hub-and-spoke network setup with routers R1 (hub) and R2 and R3 (spokes). They are interconnected via the 172.12.123.0/24 network, and each has a loopback address (1.1.1.1, 2.2.2.2, etc.). RIP is the routing protocol in use.
R1’s additional serial interface with IP 10.1.1.1/24 is flagged as a default network using the command `ip default-network 10.0.0.0`. This route is not advertised by RIP, but it is propagated across the network.
Routing Table Examination
On R1, the routing table shows this route as a candidate default route:
```
R1
show ip route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
R 2.0.0.0/8 [120/1] via 172.12.123.2, 00:00:11, Serial0
R 3.0.0.0/8 [120/1] via 172.12.123.3, 00:00:11, Serial0
* 10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Serial1
```
R2 and R3 receive a default RIP route:
```
R2
show ip route
Gateway of last resort is 172.12.123.1 to network 0.0.0.0
R 1.0.0.0/8 [120/1] via 172.12.123.1, 00:00:00, Serial0.213
R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:00, Serial0.213
```
```
R3
show ip route
Gateway of last resort is 172.12.123.1 to network 0.0.0.0
R 1.0.0.0/8 [120/1] via 172.12.123.1, 00:00:27, Serial0.31
R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:28, Serial0.31
```
Testing the Default Route
The default route is functional as both R2 and R3 can successfully ping 10.1.1.1 despite not having a specific route:
```
R2
ping 10.1.1.1
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms
```
```
R3
ping 10.1.1.1
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms
```
Conclusion
When choosing between a default static route and `ip default-network`, consider the scope:
- Use default static route for local router use.
- Use ip default-network for propagating the route across the entire network via the routing protocol.
You can find the original non-AI version of this article here: Cisco Routing ip default-network vs. Default Static Routes.
You can browse and read all the articles for free. If you want to use them and get PLR and MRR rights, you need to buy the pack. Learn more about this pack of over 100 000 MRR and PLR articles.