cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1462
Views
5
Helpful
8
Replies

redistributing a static route that is installed by object tracking

tato386
Level 6
Level 6

I am running RIP and currently redistributing only the default route using the "default-info originate" command. This router also has two "types" static routes. I use static routes using the simple ip route command and I also have static routes that are installed by an object tracking process. I would like to also distribute ONLY the static routes that are installed by object tracking. Is this possible?

Also, I see that there are two commands that look very similar but I can't tell the difference between them. What is the difference between "redistib route-map" and "redistri static route-map"?

Maybe these commands can help me do what I need?

Thanks,

Diego

8 Replies 8

walleyewiz
Level 1
Level 1

Are you running RIP version 1 or 2?

Currently running V2

See if this would work for you:

router rip

redistribute static route-map DENY_RIP_REDIST

ip route 172.16.1.0 255.255.255.0 Null0 name REDIST_YES

ip route 206.131.20.0 255.255.255.0 Null0 name REDIST_NO

ip prefix-list DENY_RIP_REDIST seq 5 deny 206.131.20.0/24

ip prefix-list DENY_RIP_REDIST seq 10 permit 0.0.0.0/0 le 32

route-map DENY_RIP_REDIST permit 10

match ip address prefix-list DENY_RIP_REDIST

HTH,

Brad.

Sorry but I am noot clear on how the obj tracking installed routes are selected for redistribution. My router has two types of static routes:

ip route 1.1.1.0 255.255.255.0 10.10.10.1

ip route 2.2.2.0 255.255.255.0 10.10.10.2 1 track 1

The idea is to only redistribute the track routes when the tracked object is up.

Diego

ip prefix-list DENY_RIP_REDIST seq 5 deny 206.131.20.0/24

ip prefix-list DENY_RIP_REDIST seq 10 permit 0.0.0.0/0 le 32

The first line in the prefix-list above would deny your static routes. All other routes are covered by the second line in the prefix-list.

So, when your tracked static route comes up, it will be redistributed.

So it seems that your approach doesn't really take into account if a route is a tracked route or not. What you are saying is to tag the static routes with a REDIST_YES or REDIST_NO tag and then use this tag in a route-map to determine if the route is to be redistributed. Is this correct?

Actually, the fact that the static route is inserted by tracking is immaterial--the only fact is whether the route is in the routing table or not. If it is there, either redist or not based on the route-map.

One more thing, the REDIST_YES or REDIST_NO was simply a name for illustrative purposes. These routes are not being tagged.

Thanks, I'll give it a shot.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco