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-20-2023 01:08 AM
12-23-2023 12:17 PM - edited 12-23-2023 10:14 PM
12-20-2023
12:24 AM
- last edited on
12-20-2023
03:51 AM
by
Translator
Redistrubte ospf into bgp with route-map and deny summary
Your route-map correct
But for defualt I think it not work
Becuase you use under bgp address ipv4 vrf
Defualt information originate
So even if you dont redistrubte ospf defualt into bgp the bgp will advertise defualt with above command.
MHM
12-20-2023
12:32 AM
- last edited on
12-20-2023
03:46 AM
by
Translator
Thank you!
I will remove default-information originate. Will that work ?
Also, i have doubt on route-map after match internal external 1 external 2 -- is it a correct syntax ? my box is Cisco9606R running on ios-xe 17.6.4
redistribute ospf 100 vrf corp metric 1 match internal external 1 external 2 route-map Non-Interesting-Traffic
Thanks again,
Raghavendra
12-20-2023
01:05 AM
- last edited on
12-20-2023
03:56 AM
by
Translator
there is no conflict I make double check and the result as you see
LO 3.3.3.3 is not advertise
(LO in R3, R1-R2 BGP, R2-R3 OSPF)
LO 33.33.33.33 is advertise
MHM
12-20-2023 01:08 AM
wow - that is perfect. Thanks a Lot!
12-20-2023 01:11 AM
We here try our best and answer as much as we can prefect answer.
I get your Q but I was need to full check it' that why I make lab and test
You are so welcome friend
MHM
12-21-2023 12:55 AM - edited 12-21-2023 12:57 AM
Hello MHM,
I got another doubt on the same config.
redistribute ospf 100 vrf corp metric 1 match internal external 1 external 2 route-map Non-Interesting-Traffic
OSPF 100 is a stub area (stub no-summary) and it is redistributed to BGP with the above command.
!
router ospf 100 vrf Corp
router-id 100.200.10.10
log-adjacency-changes
auto-cost reference-bandwidth 100000
area 14 stub no-summary
area 14 range 10.200.0.0 255.255.0.0
network 10.200.0.0 0.0.255.255 area 14
.
.
I have SVI's on this routes with subnets of 10.200.0.0/16
SVI-1 - 10.200.100.1
SVI-2 --10.200.200.1
My question is whether 10.200.100.1 and 10.200.200.1 will get advertised from OSPF to BGP ?
Appreciate your support.
12-20-2023 01:28 AM
Hello
Your prefix-list and route-map look okay, the catch all permit 20 statement should allow all other non matching traffic to be advertise within the ipv4 AF vrf corp stanza
As @MHM Cisco World remove the default-originate if you do not wish to advertise a default-route in bgp from this bgp rtr
12-21-2023 12:58 AM
Hello MHM,
I got another doubt on the same config.
redistribute ospf 100 vrf corp metric 1 match internal external 1 external 2 route-map Non-Interesting-Traffic
OSPF 100 is a stub area (stub no-summary) and it is redistributed to BGP with the above command.
!
router ospf 100 vrf corp
router-id 100.200.10.10
log-adjacency-changes
auto-cost reference-bandwidth 100000
area 14 stub no-summary
area 14 range 10.200.0.0 255.255.0.0
network 10.200.0.0 0.0.255.255 area 14
.
.
I have SVI's on this routes with subnets of 10.200.0.0/16
SVI-1 - 10.200.100.1
SVI-2 --10.200.200.1
My question is whether 10.200.100.1 and 10.200.200.1 will get advertised from OSPF to BGP ?
Appreciate your support.
12-21-2023 01:58 AM
Or does it requires a redistribute connected subnets in OSPF? to advertise SVI's with subnets on network statement?
router ospf 100 vrf corp
redistribute connected subnets
12-21-2023 06:54 AM
Hello @raghav.rai ,
you don't need the redistribute connected because you have:
network 10.200.0.0 0.0.255.255 area 14
in router ospf config.
Your route-map for redistribution should work as already explained by colleagues @MHM Cisco World and @paul driver . The specific subnets of the two SVI should go to BGP. Your prefix-list requires exact match and only the summary route and the default route can match its statements.
As a result of this all other more specific OSPF routes including those within the summary address should be redistributed into BGP.
They will be advertised to other routers if they are considered BGP best paths
Hope to help
Giuseppe
12-22-2023 01:49 AM
Thanks Giuseppe Larosa
I think area 14 range 10.200.0.0 255.255.0.0 is the culprit which advertises summary route. in my case summary route is getting adverised at this point.
12-21-2023 07:50 PM
friend you must careful
area Stub and no-summary
this mean that the area is not accept
LSA3 nor LSA5/LSA7
i.e. the redistribute will not work nor the LSA3 from other areas
you can use network command to inject the prefix into the OSPF which add it as L1 and then redistribute it into BGP
below lab show you two router in area 1 stub no-summary
some Lo use redistribute and other use network, check which appear in R1 (BGP 100)
Goodluck
MHM
12-21-2023 08:22 PM - edited 12-21-2023 08:24 PM
Thank you MHM .. If I have understood correctly. OSPF stub with no summary here redistributes SVI's under network statement but doesn't redistribute connected subnets with "redistribute connected statement".
Sorry to ask more clarity .. network 10.0.0.0/8 statement will redistribute specific subnet of a connected SVI with 10.10.10.0/24.
I wanted to make sure that network 10.0.0.0/8 in a OSPF stub with no summary will will redistribute 10.10.10.0/24 subnet and not the summary 10.0.0.0/8.
Sorry again for asking simple question, but i am a bit confused here.
12-21-2023 11:28 PM
Sorry dont get it,
You redistrubte SVI IP in this router and you run only one area which is stub?
Can you share topology
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