cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3622
Views
13
Helpful
24
Replies

Route map while redistributing OSPF to BGP

raghav.rai
Level 1
Level 1

Hello,

I need to add a route-map to an existing ospf redistribution to filter default and summary routes. Can you please verify my configs below and confirm it would work?

Current config :

!
address-family ipv4 vrf corp
  redistribute connected
  redistribute ospf 100 vrf corp metric 1 match internal external 1 external 2
  maximum-paths ibgp 2
  default-information originate
  no synchronization
exit-address-family
!

Planning to add a route-map to OSPF redistribution:

address-family ipv4 vrf corp
redistribute ospf 100 vrf corp metric 1 match internal external 1 external 2 route-map Non-Interesting-Traffic --

is it allowed?

!!! Also need to check below route-map will block only 10.200.0.0/16 summary and default route rest specific subnets will get advertised?

!
route-map Non-Interesting-Traffic deny 10
match ip address prefix-list deny-list
!
route-map Non-Interesting-Traffic permit 20
!
ip prefix-list deny-list seq 15 permit 10.200.0.0/16
!
ip prefix-list deny-list seq 25 permit 0.0.0.0/0

Tks,

Raghavendra

24 Replies 24

Hello MHM,

Here it is:

raghavrai_1-1703237858594.png

 

in OSPF 5 on VRF corp, I have 50+ SVI's all are subnets of 10.200.0.0/16. Now my ospf is a stub with no summary, if i add a network 10.200.0.0/16 in ospf it will only advertise a summary which I don't want. I need individual SVI's specific IP to be advertise. initially I though I will do redistribute connected in OSPF but stub doesn't advertise redistributed routes. what else option do I have ?

Hello MHM, 

Thank you for your reply..

here is the topology

raghavrai_0-1703250901752.png

All I wanted to know the options to advertise specific subnets of SVI's. Right now 10.200.0.0/16 subnet is getting advertised with network 10.200.0.0/16 statement on ospf 5 with no summary. 

router ospf 5 vrf corp
router-id 100.200.10.10
log-adjacency-changes
auto-cost reference-bandwidth 100000
area 5 stub no-summary
area 5 range 10.200.0.0 255.255.0.0

network 10.200.0.0 0.0.255.255 area 5

area 5 range 10.200.0.0 255.255.0.0 command in ospf 5 is the culprit which is advertising summary route? or is it something else

what other options do I have to advertise only specific subnets of SVI ? 

raghavrai_0-1703250901752.png

MHM

check above

MHM

raghav.rai
Level 1
Level 1

Hello MHM.. Thanks a lot.

I had this in mind to advertise directly connected interfaces(SVI's) directly into BGP. Still wanted to understand that my OSPF stub will not advertise specific subnets instead it advertises summary route because of area x range 10.x.0.0 255.255.0.0 command in OSPF. Thanks a ton for your answers. It really helped for me to understand the OSPF behaviour.

 

Screenshot (41).pngScreenshot (40).pngScreenshot (43).pngScreenshot (39).png

Thank you MHM! -- appreciate your effort in answering the questions.

Please correct me if I am wrong with the below conclusion from your tests:

So the conclusion here is area x range <subnet> command in OSPF will summarise the subnets, otherwise OSPF network statement will advertise each and every SVI subnets under network command.

hi 
you ask about the area range, the area range is work only in ABR router, that why I ask before does your router is ASBR or ABR 
for my lab I config R2 as ABR connect to  two area, area 1 and area0 
area 1 is stub (stub allow LSA3, stub no summary not allow LSA3)
so since the router is ABR and area is Stub I config area range 
and redistribute the OSPF into BGP
the OSPF redistribute all LSA3 include range into BGP ( see show ip route in R1 22.0.0.0/8)
then I use route-map to filter OSPF prefix and not allow R2 to advertise the area range.

I save this lab if you want other test please write to me 
Thanks 
MHM

Thanks a lot!

I would call it an ASBR as my area x in OSPF (VRF Corp) is directly redistributing routes to BGP. On the other side same router has Area0 in the global table ( not attached to any VRF).   

if it ASBR and area is stub 
then 
1- no redistribute 
2- no summary 
3- You can add each SVI with network command under OSPF 
4- no area range (it need ABR)

MHM