06-22-2009 01:05 PM - edited 03-06-2019 06:23 AM
Hello,
I am a little confused with how to use the ip default-network command to configure a default route. Can someone explain the difference using "ip default-network" and "ip route"?
Thanks.
06-22-2009 07:21 PM
Hi Francisco,
You would use ip default-network when your device is configured with no ip routing. It really means device doesn't need to perform any kind of routing (like a PC) and use the IP address as its default router/gateway.
When you are using ip route, ip routing must be configured. ip route means you want to set up a static route for certain destination.
HTH,
jerry
06-23-2009 06:12 AM
Correction...
It should be ip default-gateway.
jerry
06-23-2009 06:27 AM
More correction,
ip default-network is used to select a network as a candidate route for 0.0.0.0/0.
ip route is static route entry that will go into the routing table.
To explain this in an example:
ip route 172.16.0.0 255.255.0.0 172.16.1.1
ip default-network 172.16.0.0
when a packet destinated to 172.16.0.0/16 network, router will route it to 172.16.1.1, at the same time, when a packet destinated to network has no specific match in the routing table (0.0.0.0/0), router will use the 0.0.0.0/0 and send it to 172.16.0.0 network.
Regards,
jerry
06-23-2009 06:18 AM
Hello Francisco,
some protocols support the ip default-network concept:
instead of simply specifying a default gateway or advertising a default route 0.0.0.0/0, the protocol can send out an advertisement for the IP subnet of the default network with a special flag that says that it can be used as exit point to outside world.
The protocols that support ip default-network are RIP, IGRP and EIGRP.
To be noted that the ip default-network have to reference a different major network (class A,B, C) then the one used internally.
Also EIGRP and IGRP require a network command for the ip subnet for being able to send the IP route with the external flag.
Hope to help
Giuseppe
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: