Actually, its a perfectly legal situation. But software like route AFAIK does'nt allow you to set multiple routes.
You can use iproute command to do that.
You can give routing priorities also etc.
HTH Supreet
Ashok Iyer wrote:
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
'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.
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. _____________________________________________________________________
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.