cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7211
Views
5
Helpful
4
Replies

Filtering Static Route Redistribution into OSPF

phawker56
Level 1
Level 1

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!

1 Accepted Solution

Accepted Solutions

m.mcconnell
Level 1
Level 1

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:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fiprrp_r/ind_r/1rfindp2.htm#wp1041381

View solution in original post

4 Replies 4

rais.ahmad
Level 1
Level 1

Try "redistribute static subnet route-map TEST type 1"

Hope this helps.

Harold Ritter
Spotlight
Spotlight

Try "clear ip ospf redistribution" after modifying the redistribution policy.

Hope this helps,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

m.mcconnell
Level 1
Level 1

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:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fiprrp_r/ind_r/1rfindp2.htm#wp1041381

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