2 nics. 2 Defaults Gateways
Posted
by
andre.dias
on Server Fault
See other posts from Server Fault
or by andre.dias
Published on 2012-09-28T23:36:30Z
Indexed on
2012/09/29
3:40 UTC
Read the original article
Hit count: 491
Here is my scenario: i have this server with 2 nics, each one with different IPs, connected to differents routers.
Almost everything is configured whe way i need. Traffic coming from eth0 exits using eth0, traffic coming from eth1 exits using eth1. And there is a default gateway configured.
$route: default IP 0.0.0.0 UG 0 0 0 eth0
With this configuration, the traffic generated in the server is going out using eth0 (lynx www.google.com for example).
The problem is: the Internet link from eth0 went down today. The traffic coming from eth1 was ok...no problem. But the traffic generated in the server was a problem...the default gateway was out...no access do the Internet anymore (no more lynx www.google.com)
So i added a new default gateway configuration, pointing to eth1. For 30 minutes i kept that way...2 default gateways, but just one was "working"...and everything was working just fine. But then i removed de eth0 gateway entry because, well, 2 default gateways is kind of weird.
My question: is there any problem on keeping these 2 default gateways, one for each? So i don´t need to do nothing when one link go down again?
$route: default IP1 0.0.0.0 UG 0 0 0 eth0 default IP2 0.0.0.0 UG 0 0 0 eth1
© Server Fault or respective owner