Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Attention: The Community will be in read-only mode on 12/14/2017 from 12:00 am pacific to 11:30 am.

During this time you will only be able to see content. Other interactions such as posting, replying to questions, or marking content as helpful will be disabled for few hours.

We apologize for the inconvenience while we perform important updates to the Community.

Bronze

Tracking a static route via line-protocol

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

5 REPLIES
Hall of Fame Super Bronze

Re: Tracking a static route via line-protocol

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.

Bronze

Re: Tracking a static route via line-protocol

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

Hall of Fame Super Bronze

Re: Tracking a static route via line-protocol

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.

Bronze

Re: Tracking a static route via line-protocol

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

Hall of Fame Super Bronze

Re: Tracking a static route via line-protocol

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.

343
Views
0
Helpful
5
Replies
CreatePlease to create content