Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Filtering Static Route Redistribution into OSPF

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
New Member

Re: Filtering Static Route Redistribution into OSPF

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

4 REPLIES
New Member

Re: Filtering Static Route Redistribution into OSPF

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

Hope this helps.

Cisco Employee

Re: Filtering Static Route Redistribution into OSPF

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

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
New Member

Re: Filtering Static Route Redistribution into OSPF

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

New Member

Re: Filtering Static Route Redistribution into OSPF

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

2495
Views
0
Helpful
4
Replies
CreatePlease login to create content