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.

I'm configuring a gateway/router linux box. It is performing masquerading/NAT. The primary Internet interface is a 3G modem, but if that goes down, I would like it to try a different interface automatically. How would I go about doing this? Can the routing rules automatically cater for this, or should I get it to periodically check if the 3G connection is up, and if not, try the other?

Cheers,

Victor

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

This blog entry explains how to setup multiple routes for Linux in some detail.

share|improve this answer
add comment

Just set a second default gateway, linux will do the failover by itself.

share|improve this answer
1  
You can't have two default gateways, by definition of default. You can set multiple routes however, and weight them. –  dunxd Jan 25 '11 at 11:48
    
@dunxd: that's semantics. It's a route for the entire internet, and it's set in exactly the same manner as a default gateway. –  Joris Jan 25 '11 at 20:12
    
Not semantics at all. Default routes and default gateways are configured differently. If you used the right terms, or linked to some useful information then your answer would be more helpful. By the way, I didn't down vote your answer. –  dunxd Jan 27 '11 at 8:57
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.