cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
9975
Views
0
Helpful
2
Replies

Redistribute Static into OSPF with route-map

bcturner
Level 1
Level 1

I've been trying to be selective in the static routes I want to redistribute from static into my OSPF area.  It looks like the route-map I've created is being ignored by OSPF during the redistribution process.  Anybody out there know if it's possible to be selective in static route redistribution into OSPF?

Here's a sample config:

-----------------------------------------------------------------------------------

ip route 192.168.16.0 255.255.248.0 Null0 240 tag 7777 name static_summary_4redistribution

ip route 10.1.1.0 255.255.255.0 Null0 240 name test_route

!

route-map static-redistribution permit 10

match tag 7777

!

route-map static-redistribution deny 15

!

router ospf 1

redistribute static metric 9999 subnets route-map static-redistribution

------------------------------------------------------------------------------------

When I look at the route tables of other routers inside the OSPF area they all have route 192.168.16.0/21 and 10.1.1.0/24.  So, the route map is not being used to filter out the static route for 10.1.1.0/24.

Any ideas?

1 Accepted Solution

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

I tried your config on 2 devices and it seems to be filtering out 10.1.1.0/24

here is the routing table on the neigbor router with your config:

Switch#sh ip route ospf

     2.0.0.0/32 is subnetted, 2 subnets

O       2.2.2.2 [110/2] via 1.1.1.2, 00:08:05, GigabitEthernet1/0/48

O E2 192.168.16.0/21 [110/9999] via 1.1.1.2, 00:08:05, GigabitEthernet1/0/48

Switch#

Here is the routing table when I change

route-map static-redistribution deny 15

to

route-map static-redistribution permit 15

Switch#sh ip route ospf

     2.0.0.0/32 is subnetted, 2 subnets

O       2.2.2.2 [110/2] via 1.1.1.2, 00:07:01, GigabitEthernet1/0/48

     5.0.0.0/24 is subnetted, 1 subnets

O E2    5.5.5.0 [110/9999] via 1.1.1.2, 00:04:38, GigabitEthernet1/0/48

     10.0.0.0/24 is subnetted, 1 subnets

O E2    10.1.1.0 [110/9999] via 1.1.1.2, 00:04:38, GigabitEthernet1/0/48

O E2 192.168.16.0/21 [110/9999] via 1.1.1.2, 00:07:01, GigabitEthernet1/0/48

HTH

View solution in original post

2 Replies 2

Reza Sharifi
Hall of Fame
Hall of Fame

I tried your config on 2 devices and it seems to be filtering out 10.1.1.0/24

here is the routing table on the neigbor router with your config:

Switch#sh ip route ospf

     2.0.0.0/32 is subnetted, 2 subnets

O       2.2.2.2 [110/2] via 1.1.1.2, 00:08:05, GigabitEthernet1/0/48

O E2 192.168.16.0/21 [110/9999] via 1.1.1.2, 00:08:05, GigabitEthernet1/0/48

Switch#

Here is the routing table when I change

route-map static-redistribution deny 15

to

route-map static-redistribution permit 15

Switch#sh ip route ospf

     2.0.0.0/32 is subnetted, 2 subnets

O       2.2.2.2 [110/2] via 1.1.1.2, 00:07:01, GigabitEthernet1/0/48

     5.0.0.0/24 is subnetted, 1 subnets

O E2    5.5.5.0 [110/9999] via 1.1.1.2, 00:04:38, GigabitEthernet1/0/48

     10.0.0.0/24 is subnetted, 1 subnets

O E2    10.1.1.0 [110/9999] via 1.1.1.2, 00:04:38, GigabitEthernet1/0/48

O E2 192.168.16.0/21 [110/9999] via 1.1.1.2, 00:07:01, GigabitEthernet1/0/48

HTH

Hi Reza - Thanks for confirming this will indeed work.  I just tested the config on a third router (ISR G2 2911 running ver 15.1(4)M4) and it works fine.  I think I was hitting a bug on both test routers (ISR G1 2821) since they were running 12.4(15)T17 and T15. 

One last question, when you do a "show route-map" do you see any packets being processed?  Here's my output from the working router:

---------------------------------------------------------------------

testrouter#sh route-map

route-map static-redistribution, permit, sequence 10

  Match clauses:

    tag 7777

  Set clauses:

  Policy routing matches: 0 packets, 0 bytes

route-map static-redistribution, deny, sequence 15

  Match clauses:

  Set clauses:

  Policy routing matches: 0 packets, 0 bytes

-----------------------------------------------------------------------

Review Cisco Networking products for a $25 gift card