12-13-2005 07:57 AM - edited 03-03-2019 11:13 AM
I need to redistribute some static routes into OSPF but not others, but after many tries I just can't seem to get it to work. The router just seems to redistribute all the static routes no matter which ACLs I use! I have tried using tags on the routes and a route-map as follows:
router ospf 1
redistribute static route-map TEST
!
route-map TEST deny 10
match ip address 1
access-list 1 permit 7.0.0.0 0.255.255.255
ip route 7.0.0.0 255.255.0.0 5.1.1.2
As far as I can see this should stop the 7.0.0.0 static route redistributing but it doesn't. I have also tried:
router ospf 1
redistribute static route-map TEST
!
route-map TEST permit 10
match tag 1
ip route 7.0.0.0 255.255.0.0 5.1.1.2 tag 1
And also tried:
router ospf 1
redistribute static tag 1
!
ip route 7.0.0.0 255.255.0.0 5.1.1.2 tag 1
with all the other static routes untagged (or even with a different tag number) but all the routes still get redistributed!
Any help in working out where I'm going wrong would be greatly appreciated!
Solved! Go to Solution.
12-13-2005 11:20 AM
Your ACL is permitting the 7.0.0.0/8 network and it should be denying that network. Something like this:
route-map TEST permit 10
match ip address 1
access-list 1 deny 7.0.0.0 0.255.255.255
router ospf 1
redistribute static subnets metric-type 1 metric 64 route-map TEST
A handy URI:
12-13-2005 10:40 AM
Try "redistribute static subnet route-map TEST type 1"
Hope this helps.
12-13-2005 11:02 AM
Try "clear ip ospf redistribution" after modifying the redistribution policy.
Hope this helps,
12-13-2005 11:20 AM
Your ACL is permitting the 7.0.0.0/8 network and it should be denying that network. Something like this:
route-map TEST permit 10
match ip address 1
access-list 1 deny 7.0.0.0 0.255.255.255
router ospf 1
redistribute static subnets metric-type 1 metric 64 route-map TEST
A handy URI:
12-14-2005 05:55 AM
Thank you all for your help, it's now working properly with the following commands:
router ospf 1
redistribute static metric 64 metric-type 1 subnets route-map TEST
access-list 1 permit 7.0.0.0 0.255.255.255
route-map TEST permit 10
match ip address 1
Strangely enough though, the router still reports that it is redistributing the other static routes in OSPF but it really isn't!:
e.g.
Routing entry for 6.0.0.0/8
Known via "static", distance 1, metric 0
Redistributing via ospf 1
Routing Descriptor Blocks:
* 5.1.1.2
Route metric is 0, traffic share count is 1
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