Tracking a static route via line-protocol

Unanswered Question
Aug 14th, 2009
User Badges:
  • Bronze, 100 points or more

When my physical link to the next hop (gateway) is up and operational, my 0/0 route is injected into my routing table - just what I need.


When the physical link to the next hop is down and not operational, I would still like to have the 0/0 route in the routing table to ensure down stream routers send unknown destination traffic this router.


I am currently using the track command but tracking does not wanna follow my direction.


Perhaps some other method would work better and/or simpler.

ANY thoughts?

THANKS again!!!!!!!

Frank


This is my config:

interface f3/1

description Network Gateway

ip add 1.1.1.0 255.255.255.254

!

track 1 interface f3/1 line-protocol

!

track 2 list boolean and

object 1 not

!

router eigrp 90

redistribute static - I should have a filter here, but currently don't - don't tell anyone.

net . . .

no auto-summary

!

ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 2

Show commands when the physical link is disconnected:

R1# sh ip ro track

ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 2 state is [Up]

R1# sh track 1

track 1

interface f3/1 line-protocol

line protocol is down (hw down)

876 changes

tracked by:

2

R1# sh track 2

track 2

list boolean and

Boolean AND is Up

875 changes

object 1 not Down

Tracked by:

STATIC_IP_ROUTINGTrack-list 0

Show commands when the physical link is connected:

R1# sh ip ro track

ip route 0.0.0.0 0.0.0.0 1.1.1.1 track 2 state is [Down]

R1# sh track 1

track 1

interface f3/1 line-protocol

line protocol is up

877 changes

tracked by:

2

R1# sh track 2

track 2

list boolean and

Boolean AND is Down

876 changes

object 1 not Up

Tracked by:

STATIC_IP_ROUTINGTrack-list 0

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Edison Ortiz Fri, 08/14/2009 - 06:12
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

If you want to draw traffic even if the interface is down, don't point to the interface but point to a null0.


You can either have the null0 as your primary static route or a floating static route, it makes no difference.


ip route 0.0.0.0 0.0.0.0 null0


HTH,


__


Edison.

fsebera Fri, 08/14/2009 - 06:55
User Badges:
  • Bronze, 100 points or more

Hey Edison,

Yea I currently have 0/0 to null0 with an additional AD of 254 to ensure this would be used LAST.


I was also hoping to be able to track the number of up/downs (didn't mention this in my initial question) but perhaps SNMP would be the way to go on that one.


Also, I think the way (at what point) the router injects routes into the routing table is after the tracking function has ended. Tracking only present the data to the routing function, tracking cannot interfere with the routing decision functions.


Thanks much!!

Frank

Edison Ortiz Fri, 08/14/2009 - 07:17
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

Yea I currently have 0/0 to null0 with an additional AD of 254 to ensure this would be used LAST.


And that's not working?

A Quad 0 will still be sent via EIGRP, isn't it?


I was also hoping to be able to track the number of up/downs (didn't mention this in my initial question) but perhaps SNMP would be the way to go on that one.


Logging is incorporated if you use 'IP SLA'


Also, I think the way (at what point) the router injects routes into the routing table is after the tracking function has ended. Tracking only present the data to the routing function, tracking cannot interfere with the routing decision functions.


If the route is associated to a track, the route will be in the RIB only when the track is up. If the track is down, the route will be removed from the RIB.


HTH,


__


Edison.


fsebera Fri, 08/14/2009 - 09:12
User Badges:
  • Bronze, 100 points or more

Oh sorry, YES, quad 0 to null0 AD 254 is working well.


But using the tracking feature does not put the quad 0 in the routing table IF the tracked next hop is down even though it shows the correct output - see original post. My quess is ... my config is broken.


Tks

Frank

Edison Ortiz Fri, 08/14/2009 - 09:31
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

Now I see the logic you are trying to implement, you want the route to be installed only when the interface is down?


I believe there are some caveats and I will need to lab this one out.


It may take some time so if someone else can offer assistance, please do so.


__


Edison.

Actions

This Discussion