will the following two statements work? ip route 0.0.0.0 0.0.0.0 1.2.3.4 10 ip route 0.0.0.0 0.0.0.0 5.6.7.8 128 The idea is to have a normal default route to 1.2.3.4 but in case the interface is down use 5.6.7.8 as a default route. The router accepts both commands. But a "sho ip route" doesn't list the second default route.
Regards, Christoph Gartmann
Didn't find your answer? Ask the community — no account required.
T
Trendkill
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.
This may help:
formatting link
A
Arnold Nipper
On 14.03.2007 13:07 Christoph Gartmann wrote
That's ok, isn't it? AS long as 1.2.3.4 is up and working default route is to that gateway. Only when 1.2.3.4 fails the 2nd route should kick in.
If both routes were shown, you would have *two* active default routes. I guess that's not what you want.
Did you test what happens if you unplug 1.2.3.4?
Arnold
C
Christoph Gartmann
The local router has an interface with an ip address of 1.2.3.3 connected via a direct link to 1.2.3.4. 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.
Regards, Christoph Gartmann
C
Christoph Gartmann
No, not yet. The thing is in use. That's why I am asking before.
Regards, Christoph Gartmann
T
Trendkill
Again, you need to put a next hop interface instead of an address or your router will never equate the interface being down with the next hop IP being unavailable.
F
Frank Winkler
But how will a packet ever reach the next hop if the mentioned interface is not a point-to-point link?
fw
T
Trendkill
He said its a direct connection..............just going off of the information I have.
F
Frank Winkler
You're right, sorry. But your statement would have also applied if this wasn't the case (you made it before the OP mentioned the direct link) or did I get that wrong?
Regards
fw
T
Trendkill
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.
C
Christoph Gartmann
It is a direct connection for both ways.
It is nothing with DSL, both connections are single-mode fiber.
Regards, Christoph Gartmann
A
Arnold Nipper
On 14.03.2007 17:04 Christoph Gartmann wrote
Single-mode fibre really does not mean too much ;-) Why don't you tell us how your setup us. Or do you want us to do a quiz?
Arnold
T
Trendkill
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.
A
Arnold Nipper
On 14.03.2007 20:08 Trendkill wrote
well even with ethernet imho this should work as after some time 1.2.3.4 will be unreachable.
Arnold
B
Barry Margolin
If it's not a direct connection, the scheme of having two static routes with different metrics won't work at all, because the primary route will never go away when the interface goes down.
T
Trendkill
Agreed. The posted originally said its a direct point to point link...but then said it was fiber. He needs to turn up routing.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.