08-26-2006 06:53 AM - edited 03-03-2019 01:46 PM
Hi,
I was wondering if anyone could explain what is the operational difference between these two static routes:
ip route <IP><Mask><nexthop>
and
ip route <IP><Mask><interface><nexthop>
Also is there a differences in how router processes them?
Thanks,
David
08-26-2006 07:11 AM
From
Adding a static route to an Ethernet or other broadcast interface (for example, ip route 0.0.0.0 0.0.0.0 Ethernet 1/2) will cause the route to be inserted into the routing table only when the interface is up. This configuration is not generally recommended. When the next hop of a static route points to an interface, the router considers each of the hosts within the range of the route to be directly connected through that interface, and therefore it will send ARP requests to any destination addresses that route through the static route.
The practical implication of configuring "ip route 0.0.0.0 0.0.0.0 Ethernet 1/2" is that the router will consider all of the destinations that the router does not know how to reach through some other route as directly connected to Ethernet 1/2. So the router will send an ARP request for each host for which it receives packets on this network segment. This configuration can cause high processor utilization and a very large ARP cache (along with attendant memory allocation failures). Configuring a default route or other static route that directs the router to forward packets for a large range of destinations to a connected broadcast network segment can cause your router to reload.
Specifying a numerical next hop that is on a directly connected interface will prevent the router from using Proxy ARP. However, if the interface with the next hop goes down and the numerical next hop can be reached through a recursive route, you may specify both the next hop and interface (for example "ip route 0.0.0.0 0.0.0.0 Ethernet1/2 10.1.2.3") with a static route to prevent routes from passing through an unintended interface.
08-26-2006 07:27 AM
David,
The difference between the two is:
ip route
The route will continue to point to the same next-hop and stay in the routing table as long as the router thinks it has a way to get to the next hop even when the directly connected interface through which the next hop address is reachable is down.
ip route
The route will be removed from the routing table when the interface through which the next hop can be reached goes down though there may be a recursive route to the next hop address.
As you can see the second method will save you lot of headache especially, when you have a default or supernet route configured in the router.
I recommend you take a look at the example to clear things up.
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml
HTH,
Sundar
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide