12-20-2023
12:18 AM
- last edited on
12-20-2023
03:42 AM
by
Translator
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
Solved! Go to Solution.
12-22-2023 01:33 AM - edited 12-22-2023 01:40 AM
Hello MHM,
Here it is:
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 ?
12-22-2023 05:24 AM
Hello MHM,
Thank you for your reply..
here is the topology
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 ?
12-23-2023 12:17 PM - edited 12-23-2023 10:14 PM
MHM
12-23-2023 12:30 PM - edited 12-23-2023 10:14 PM
check above
MHM
12-24-2023 12:35 AM
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.
12-26-2023 06:05 AM
12-26-2023 09:41 PM
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.
12-26-2023 09:49 PM - edited 12-26-2023 09:50 PM
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
12-26-2023 09:59 PM
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).
12-26-2023 10:04 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide