Weird route tracking behavior

image

 

scenario 1:

ospf is configured between R1, R2, R3. R2 is configured to generate a default route on condition:

!

router ospf 1

default-information originate route-map TRACK

!

route-map TRACK permit 10

 match track  3

!

track 1 ip route 1.1.1.1 255.255.255.255 reachability

track 2 ip route 3.3.3.3 255.255.255.255 reachability

track 3 list boolean and

 object 1

 object 2

 

a default route doesn't get generated, even though track 3 is shown as up.

Track 3

  List boolean and

  Boolean AND is Up

    8 changes, last change 00:14:18

    object 1 Up

    object 2 Up

  Tracked by:

    Route Map 0

    Static IP Routing 0

 

However,

1) making an ip route 22.22.22.22 255.255.255.255 Null0 track 3 under the same conditions works as expected - when atleast one of the tracked prefixes is withdrawn it dissapears.

2) redistributring a tracked static route also works as expected.

What am I missing?

Comments

  • JoeMJoeM ✭✭✭

    Right this minute, I cannot lab and test this with your configuration.

    Maybe try doing one of these:

    * Use default-information with the "always" option. (ignores that the router has no default in its rib, that can be distribute)

    * or create a static default route

     

     

  • there any multiple ways to bypass this, however I'm wondering why the behavior is inconsistent in this very mainstream use of track

  • there any multiple ways to bypass this, however I'm wondering why the behavior is inconsistent in this very mainstream use of track

    Hi,

    I'm not sure that this is supposed to work this way. The condition to advertise the default should be the existence of a route or set of routes in the routing table and not the result of a tracking object to same routes or other ones. So I guess what you get here is the correct behavior. To skip a step here though, you can do something like:

    ip route 0.0.0.0 0.0.0.0 <next-hop> track 3

    router ospf 1

     default-information originate 

     

    Gabriel

  • JoeMJoeM ✭✭✭

    ip route 0.0.0.0 0.0.0.0 <next-hop> track 3

    router ospf 1

     default-information originate 

    I like this better.   Much cleaner, but does not use a route-map.

     

    I also am not sure about the method being tried with route-map tied to tracking.

    I tried a couple of other scenarios with a route-map:

    1. matching the existence of an interface  match interface lo0   Does not work.

    2. matching  prefix-list for route in RIB .  Does work.

Sign In or Register to comment.