Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
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?


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.


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


redistribute static metric 10 subnets route-map testredist

network area 0


access-list 10 permit

access-list 10 permit


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.


CreatePlease to create content