Get linux to change default route if one path goes down?

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


Solution 1:

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