Commonly people run into issues with the ip default-network command putting static routes in their configuration when they select a network that can not be considered as the candidate default network. I’ll show the two common mistakes with this command that causes this to happen.
In the scenario below R4 is receiving a subnet of the 10.0.0.0/8 network (10.1.1.0/24) and has the 172.16.1.0/24 network directly attached to it’s E0/0 interface. We can also see that the router does not have any static routes configured.
In the scenario below R4 is receiving a subnet of the 10.0.0.0/8 network (10.1.1.0/24) and has the 172.16.1.0/24 network directly attached to it’s E0/0 interface. We can also see that the router does not have any static routes configured.
Rack4R4(config)#do show ip route rip 10.0.0.0/24 is subnetted, 1 subnets R 10.1.1.0 [120/1] via 172.16.1.7, 00:00:10, Ethernet0/0 Rack4R4(config)# Rack4R4(config)#do show ip interface brief | exclude unassigned Interface IP-Address OK? Method Status Protocol Ethernet0/0 172.16.1.4 YES manual up up Rack4R4(config)# Rack4R4(config)#do show run | include ip route Rack4R4(config)#Now I’ll set the default network to a network that I have a connected route for.
Rack4R4(config)#ip default-network 172.16.1.0 Rack4R4(config)#do show run | include ip default-network Rack4R4(config)# Rack4R4(config)#do show run | include ip route ip route 172.16.0.0 255.255.0.0 172.16.1.0 Rack4R4(config)#We can see that the ip default-network command put a static route in the configuration since the network I tried to mark as default was directly connected. Now I’ll try to remove it.
Rack4R4(config)#no ip route 172.16.0.0 255.255.0.0 172.16.1.0 %No matching route to deleteAnd as we can see from the error message the static route wasn’t removed. To remove the static route just do a “no” on the ip default-network command.
Rack4R4(config)#no ip default-network 172.16.1.0 Rack4R4(config)#do show run | include ip route Rack4R4(config)#Now we’ll try to set the default network to a subnet of a classful network that we have a route for in the routing table (see above)
Rack4R4(config)#ip default-network 10.1.1.0 Rack4R4(config)#do show run | include ip default-network Rack4R4(config)# Rack4R4(config)#do show run | include ip route ip route 10.0.0.0 255.0.0.0 10.1.1.0 Rack4R4(config)#Once again a static route was added and I’ll need to remove it.
Rack4R4(config)#no ip default-network 10.1.1.0In order for the ip default-network command to actually work I’ll need to select a classful network. To do this I summarized the 10.1.1.124/30 to 10.0.0.0/8 on the router that was advertising the /30 to R4.
Rack4R4(config)#do show ip route rip R 10.0.0.0/8 [120/1] via 172.16.1.7, 00:00:01, Ethernet0/0 Rack4R4(config)# Rack4R4(config)#ip default-network 10.0.0.0 Rack4R4(config)#do show run | include ip default-network ip default-network 10.0.0.0 Rack4R4(config)# Rack4R4(config)#do show run | include ip route Rack4R4(config)# Rack4R4(config)#do show ip route | include \* ia - IS-IS inter area, * - candidate default, U - per-user static route R* 10.0.0.0/8 [120/1] via 172.16.1.7, 00:00:02, Ethernet0/0 Rack4R4(config)#As we can see now the 10.0.0.0/8 is flagged as our candidate default network
0 comments:
Post a Comment