Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Redistributing static routes into OSPF & filters

When redistributing static routes into OSPF and filtering so that only selected static routes get redistributed, I am aware of two methods:

1) Using a "distribute-list x out static" command under the OSPF process with the appropriate access-list x which allows the subnets you want redistributed.

2) In the redistribution command, refer to a route-map, such as "redistribute static subnets route-map STATIC". Where the route-map includes the subnets you want redistributed.

Is there any advantage of one method over the other one? I've used the "distribute-list x out static" in the past & have found that if I modify the access-list x later on, I need to restart the OSPF redistribution process in order for the new static route redistribution to take place (i.e., clear ip ospf redistribution). Would this also be the case when using method #2 above?

2 REPLIES

Re: Redistributing static routes into OSPF & filters

I would think, both methods will need a restart of the OSPF process. But the advantage of using route maps is that, you can set tags on redistributed routes, while with distribute lists you cant do that.

Gold

Re: Redistributing static routes into OSPF & filters

I just popped this up in the lab, and the redistribute using the route map doesn't require you to reset the ospf redistribution when you change the policy. I set this up:

router ospf 100

log-adjacency-changes

redistribute static metric 10 subnets route-map testredist

network 208.0.16.0 0.0.0.255 area 0

!

access-list 10 permit 208.0.100.0 0.0.0.255

access-list 10 permit 208.0.101.0 0.0.0.255

!

route-map testredist permit 10

match ip address 10

When I cahnge access list 10, the routes pulled into the ospf database change without resetting the ospf redistribution.

Russ.W

120
Views
0
Helpful
2
Replies
CreatePlease to create content