route preference - ospf or static.

Discussion in 'Cisco' started by news8080, Oct 12, 2006.

  1. news8080

    news8080 Guest

    As I understand it, connected routes have 1 weight and OSPF routes have
    110 weight. Now what happens in a case where I have a /24 ospf route
    (e2) being learned on a device and I put a static route that is /23
    (which should cover that /24 route that I learn via ospf) what takes
    over then?

    I have this setup but can't really screw with production environment to
    try this or I'd do that before posting.

    anyone?
     
    news8080, Oct 12, 2006
    #1
    1. Advertisements

  2. news8080

    John Agosta Guest


    Longest mask length ALWAYS wins.
     
    John Agosta, Oct 13, 2006
    #2
    1. Advertisements

  3. news8080

    news8080 Guest

    Thanks, is there any cisco documentation link you can send me on that?
     
    news8080, Oct 13, 2006
    #3
  4. news8080

    sodaant Guest

    Who needs Cisco documentation? That rule is one of the fundamental
    rules of IP routing. Look it up in any book on routing.
     
    sodaant, Oct 13, 2006
    #4
  5. news8080

    Scooby Guest

    Scooby, Oct 13, 2006
    #5
  6. news8080

    John Agosta Guest

    google administrative distance site:cisco.com route selection
    site:cisco.com
     
    John Agosta, Oct 13, 2006
    #6
  7. news8080

    Sam Wilson Guest

    It's not just that, it's that we're comparing two different things. The
    administrative distance (the weight the OP refers to) is used to decide
    which routing protocol to take a routing table entry from - if the same
    prefix (same value, same prefix length) is learned in two different
    protocols the better admin distance is chosen. Once routes are
    installed in the table then longest match decides which entry is used to
    route the packet. Prefixes of two different lengths don't conflict when
    it comes to admin distance.

    Sam
     
    Sam Wilson, Oct 13, 2006
    #7
  8. news8080

    Manohar Guest

    I agree with Sam. During the Route selection process, longest prefix
    matched is prefered. If the prefix length is same then admin distance
    is compared.

    Regards

    Manohar
     
    Manohar, Oct 14, 2006
    #8
    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.