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