Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

You'd be better suited with weighted routing, bonding, or some similar redundancy-based setup - such that you only use one default gateway at a time.

Having two default routes basically leads to asymmetrical routing:

That can cause a lot of issues which are fiddly and annoying.

share|improve this answer
add comment

I fear this could lead to very unpredictable network behaviour and even to connection problems. You might look into bonding your network devices for ourgoing conenctions and using it in hot spare mode. This can prevent further failures.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.