multihomed is a script that can detect when your primary Internet uplink goes down and switch to a backup uplink. It's smarter than many similar scripts: it continuously pings several hosts around the Internet using both uplinks, and elects the best one as primary. You can define the priority with which uplinks are tried. This can be very useful if you have a per-traffic contract on one of your uplinks and a flat-traffic contract on another one: you can configure multihomed to use the per-traffic uplink only if the other one is not working. It runs as a daemon, and you can define the interval between consecutive checks. It can detect failures in your ISP's uplinks too; by checking multiple remote hosts around the Internet, you can tell if your ISP is fully working or not. This is much more reliable than simply pinging a single server or (worse) your default router. It is very flexible: you can easily customize the commands to execute whenever one of the links goes down.