Hi,
I am using a RH 9.0 host. I know that multiple 'default' routes do not make sense. But still I can add multiple default routes via 'route add default gw <ip-address> command. Is this some feature that I do not understand?
I guess that the behaviour will be as follows if I have 'two default routes'. If the first default gateway is reachable, the packets will be routed through that gateway. If it is unreachable, the packets will be routed through the other gateway.
This may be totally incorrect, but I really cannot think of any other possibility.
Regards, Ashok
http://www.patni.com World-Wide Partnerships. World-Class Solutions. _____________________________________________________________________
This e-mail message may contain proprietary, confidential or legally privileged information for the sole use of the person or entity to whom this message was originally addressed. Any review, e-transmission dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error kindly delete this e-mail from your records. If it appears that this mail has been forwarded to you without proper authority, please notify us immediately at netadmin@patni.com and delete this mail. _____________________________________________________________________
Ashok Iyer ashok.iyer@patni.com wrote:
I guess that the behaviour will be as follows if I have 'two default routes'. If the first default gateway is reachable, the packets will be routed through that gateway. If it is unreachable, the packets will be routed through the other gateway.
You can add multiple default routes but only the first in the table will be used, regardless of whether its down or up. By first I mean, the first entry in the route table for a default gw. While resolving route entries, the kernel always traverses the route table from top to bottom (similar to output seen with "route -n" cmd). It first tries to match a host entry, then a network entry. If neither match , then it follows the default route entry.
Multiple default gws are normally used when you wnat source policy routing. Its a pretty neat feature.
-- Rohan
Sometime Today, Ashok Iyer assembled some asciibets to say:
I know that multiple 'default' routes do not make sense. But still I can add multiple default routes via 'route add default gw <ip-address> command. Is this some feature that I do not understand?
Oh, look what I found: http://www.google.com/search?q=multiple+default+routes
I'm sure you could have too. The first link probably tells you what you want to know.