10-27-2003 05:03 AM - edited 03-02-2019 11:16 AM
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?
10-27-2003 01:36 PM
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.
10-28-2003 05:49 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide