question on default route
how do you configure a static default route to avoid a recursive look-up??
Comments
-
nomane Member Posts: 15 ■□□□□□□□□□To avoid the recursive look-up use ip route 192.168.1.0 255.255.255.0 serial 0.
The route will only remain in the routing table while the interface is up.
Why do you want to avoid the recursive look-up?CCDA ( ) - Dec 2012
CCDP ( ) - 2013 -
MrXpert Member Posts: 586 ■■■□□□□□□□I have a question, whats this "recursive lookup"? why the "192.168.1.0/24 s0" and why is it needed?I'm an Xpert at nothing apart from remembering useless information that nobody else cares about.
-
Forsaken_GA Member Posts: 4,024I think he actually meant 0.0.0.0 0.0.0.0 serial0/0, instead of 192.168.1.0.
basically, if you want to avoid the recursive lookup, you need to specify the next hop interface, not the next hop address.
However, do not do this on an internet facing router where the default route points out an ethernet point. You will be much better with the recursive lookup. -
CodeBlox Member Posts: 1,363 ■■■■□□□□□□I always thought you avoided the recursive lookup by specifying BOTH the next hop AND exit interface in the ip route statement. Ex: ip route 0.0.0.0 0.0.0.0 192.168.0.2 fa0/0 I may have the next hop and interface backwards but that's how I thought it went.Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
-
harila Registered Users Posts: 6 ■□□□□□□□□□my thinking was to specify the exit interface. but thnx for the clarification.
-
Forsaken_GA Member Posts: 4,024I always thought you avoided the recursive lookup by specifying BOTH the next hop AND exit interface in the ip route statement. Ex: ip route 0.0.0.0 0.0.0.0 192.168.0.2 fa0/0 I may have the next hop and interface backwards but that's how I thought it went.
No. The only way to get rid of the recursive lookup is to specify the exit interface. Appending the next-hop address is basically a hack to allow you to use broadcast interfaces (ie, ethernet) in the your next hop without killing the router. Appending the next-hop after the interface basically tells the router 'only ARP for this address'. The default behavior of a static route pointed out a broadcast interface is to ARP for EVERYTHING that goes out the interface, hence why I strongly recommend not doing it on an internet facing router.. the router will ARP for every address you try to connect to over the internet, and is a huge drain on resources.
There are pros and cons to doing recursive vs. not doing recursive. If you don't do recursive, then obviously you save the router lookups. However, if you do do the recursive lookup, then if the interface that normally goes to that next-hop goes down, and you have another route to the next-hop, you'll still be able to reach it. If you're not doing a recursive lookup, then as soon as the interface goes down, your static route is no longer valid.
Specifying the next-hop after the interface follows non-recursive rules, so if the interface goes down, you still lose the route.
Which way to do it depends on your needs and your scenarios. In a highly redundant network, where I have multiple paths to everything, then I use next-hops. In a network that lacks redundancy, I use output interface for point to point links, and next-hop addresses for broadcast links -
nomane Member Posts: 15 ■□□□□□□□□□Opps, I just used any static route for my example not default route.
Recursive lookup is use to find which connected interface to forward the traffic for any static route with destination ip address. E.G ip route 0.0.0.0 0.0.0.0 192.168.0.2.
Edit: Forsaken_GA covered everything you need to know in his post above.CCDA ( ) - Dec 2012
CCDP ( ) - 2013