ip route 0 & metric?

Discussion in 'Cisco' started by Christoph Gartmann, Mar 14, 2007.

  1. Hello,

    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

    --
    Max-Planck-Institut fuer Phone : +49-761-5108-464 Fax: -452
    Immunbiologie
    Postfach 1169 Internet: [email protected] dot mpg dot de
    D-79011 Freiburg, Germany
    http://www.immunbio.mpg.de/home/menue.html
     
    Christoph Gartmann, Mar 14, 2007
    #1
    1. Advertisements

  2. Christoph Gartmann

    Trendkill Guest

    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:
    http://www.macroscape.com/pdf/isp_ha.pdf
     
    Trendkill, Mar 14, 2007
    #2
    1. Advertisements

  3. 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
     
    Arnold Nipper, Mar 14, 2007
    #3
  4. 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

    --
    Max-Planck-Institut fuer Phone : +49-761-5108-464 Fax: -452
    Immunbiologie
    Postfach 1169 Internet: [email protected] dot mpg dot de
    D-79011 Freiburg, Germany
    http://www.immunbio.mpg.de/home/menue.html
     
    Christoph Gartmann, Mar 14, 2007
    #4
  5. No, not yet. The thing is in use. That's why I am asking before.

    Regards,
    Christoph Gartmann

    --
    Max-Planck-Institut fuer Phone : +49-761-5108-464 Fax: -452
    Immunbiologie
    Postfach 1169 Internet: [email protected] dot mpg dot de
    D-79011 Freiburg, Germany
    http://www.immunbio.mpg.de/home/menue.html
     
    Christoph Gartmann, Mar 14, 2007
    #5
  6. Christoph Gartmann

    Trendkill Guest

    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.
     
    Trendkill, Mar 14, 2007
    #6
  7. But how will a packet ever reach the next hop if the mentioned interface is
    not a point-to-point link?

    fw
     
    Frank Winkler, Mar 14, 2007
    #7
  8. Christoph Gartmann

    Trendkill Guest

    He said its a direct connection..............just going off of the
    information I have.
     
    Trendkill, Mar 14, 2007
    #8
  9. 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
     
    Frank Winkler, Mar 14, 2007
    #9
  10. Christoph Gartmann

    Trendkill Guest

    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.
     
    Trendkill, Mar 14, 2007
    #10
  11. It is a direct connection for both ways.
    It is nothing with DSL, both connections are single-mode fiber.

    Regards,
    Christoph Gartmann


    --
    Max-Planck-Institut fuer Phone : +49-761-5108-464 Fax: -452
    Immunbiologie
    Postfach 1169 Internet: [email protected] dot mpg dot de
    D-79011 Freiburg, Germany
    http://www.immunbio.mpg.de/home/menue.html
     
    Christoph Gartmann, Mar 14, 2007
    #11
  12. 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
     
    Arnold Nipper, Mar 14, 2007
    #12
  13. Christoph Gartmann

    Trendkill Guest

    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 <ip route 0.0.0.0 fe0/1> and <ip
    route 0.0.0.0 fe0/2 200> 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.
     
    Trendkill, Mar 14, 2007
    #13
  14. 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
     
    Arnold Nipper, Mar 14, 2007
    #14
  15. 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.
     
    Barry Margolin, Mar 15, 2007
    #15
  16. Christoph Gartmann

    Trendkill Guest

    Agreed. The posted originally said its a direct point to point
    link...but then said it was fiber. He needs to turn up routing.
     
    Trendkill, Mar 15, 2007
    #16
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.