On Mon, 2005-01-03 at 19:04 +0530, Ashok Iyer wrote:
'route ' does allow to set multiple default gateways. For e.g. route add default gw x.x.x.x and then route add default gw y.y.y.y
This is where I am confused. Since this facility is provided, what is it useful for? I am facing a problem due to this, in that I am unable to ping out of my subnet when the DHCP servers of the two subnets each assign a default gateway to my machine. So I have two default gateways.
First of all, DHCP client on linux machine will use only one of the two DHCP servers, and set the default route accordingly. It will not use the settings from both DHCP servers. In case you are seeing two default routes, that means one was statically configured as gateway when you configured your networking and other is injected by DHCP. DHCP will not delete existing default route when adding new default route.
By adding multiple default routes one can use load balancing.
Amitay.