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.
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 delete
And 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.0
In 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.

Excellent! I was just complaining about this command… Many thanks!
Hmmmmm !!!!
During the time of class full routing protocols, a CCIE guy by his observations proved the behaviour of the routing table to be itself acting in a classfull manner, and thereafter the comand ”Ipclassless” cameup for making it work in a classless manner.
We are again observing the likewise case here!!!
Thanks a lot,
Great contribution
Thank you for your article. I should bookmark this page.
Could anybody explain what is the reason for such behavior of ip default-network command when subnetwork is specified?
thx great explanation