will the following two statements work? ip route 0.0.0.0 0.0.0.0 184.108.40.206 10 ip route 0.0.0.0 0.0.0.0 220.127.116.11 128 The idea is to have a normal default route to 18.104.22.168 but in case the interface is down use 22.214.171.124 as a default route. The router accepts both commands. But a "sho ip route" doesn't list the second default route.
How will the first route ever 'go down'? The ip route command doesn't inherently know anything about interface status if you have a next hop IP, so the second route will never be used. You need to use a ip route 0.0.0.0 ethernet1 and ip route 0.0.0.0 ethernet2 200 or something like that. Then it should work if an interface fails. The problem with that solution starts if the interface is up, but there is another problem. For example, if this is a dsl internet connection, it is very likely that ethernet1 will be up but the DSL router could be hosed.
The local router has an interface with an ip address of 126.96.36.199 connected via a direct link to 188.8.131.52. So there is a static route for the first default route as long as the interface is up. I assume that the route will disappear as soon as the cable from the interface is unplugged.
I made the assumption that this is a dual internet connection and that is the purpose...so yes you are correct, although my assumption would still put me in the clear. If this is not a direct connection and is not for two internet links, then you need to turn up a routing protocol because the solution he suggests will not work. As much as text doesn't convey it, I do appreciate the check & balance. :-)
I don't remember the name of the concept, but there is also a way to turn up policy-based routing based on the results of a ping test. Aka, if the first next-hop router is up, forward traffic there, else forward to next hop router 2. I'll see what I can find but this would work as well presuming there is something you can ping. It still doesn't negate problems associated with hung dsl routers...but I haven't officially heard that is the case or not.
If these are not point to point links, you need to run a routing protocol to get the gateway to failover properly. The configuration you have proposed will not failover as the router does not equate an interface going down as taking away the first default route, because you have specified a next hop IP address and not an interface. If this was point to point, you can do a and or something like that, that will do what you expect. Else turn up the default routes on the next hops and advertise them via a routing protocol.