cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1887
Views
0
Helpful
1
Replies

How to filter Static routes into OSPF and EIGRP

rama12487
Level 1
Level 1

Hi,

I've a scenario where I need to redistribute between EIGRP and OSPF. We have choosen Static redistribution between protocols ie.,Static to EIGRp and static to OSPF. I'm attaching picture of the topology.

From R1 and R2, static routes for 10.33.0.0/16 with AD 130 points to HSRP IP (192.168.1.6). I used AD 130 to avoid loop between these routers for 10.33.0.0/16 due to best route advertised by static from R1/2.

Similarly on R3 and R4 static routes 10.0.0.0/8 with AD 130 pointing towards HSRP IP (192.168.1.1). To make the config smple instead of many static routes , I used static route 10.0.0.0/8 with AD 130 on R3 and R4 so that my internal routes for 10.33.0.0/16 will not change.

Now my issue is, I want to filter the 10.33.0.0/16 networks learning from static routes into OSPF. I thought of few options, but didn't find anything impressive.

If I use distribution lists with Route-maps and match address, I'm denying learning of all 10.33.0.0/16 (even from own network) into OSPF. I'm unable use match interface since I'm using HSRP IP as next hop.

I just dont want to learn 10.33.0.0/16 only from static routes into OSPF network.

Can someone help me out on this.

Note : There is no option of going EIGRP to OSPF redistribution due to some other reasons.

1 Reply 1

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Rama,

the right tool to filter a route with a specific prefix length is a prefix-list that can be invoked in a route-map

ip prefix-list DENY-ONE seq 5 deny 10.33.0.0/16 le 16 ge 16

ip prefix-list DENY_ONE seq 10 permit 0.0.0.0/0 le 32

route-map STATIC-INTO-OSPF permit 10

match ip address prefix DENY_ONE

router ospf 10

redistribute static subnets route-map STATIC-INTO-OSPF

Hope to help

Giuseppe