06-04-2024 12:44 PM - edited 06-04-2024 12:46 PM
Hi there,
I have a lab that I created inside CML where I was working on BGP route aggregation and deaggregation through the bgp inject-map command.
My topology looks like this
AS300 and AS400 are both sending a single prefix: 172.16.1.0/24 and 172.16.2.0/24.
R4 and R5 in AS200 are aggregating those prefixes into a single aggregate 172.16.0.0/16, this aggregate is then propagated towards AS100 R2 and R3.
Here is the configuration for R4 and R5 in AS200
R4#show run | sec ATT
aggregate-address 172.16.0.0 255.255.0.0 as-set summary-only attribute-map ATT
route-map ATT permit 10
set ip next-hop 192.168.45.2
R5#show run | sec ATT
aggregate-address 172.16.0.0 255.255.0.0 as-set summary-only attribute-map ATT
route-map ATT permit 10
set ip next-hop 192.168.45.1
Up untill here everything is going as intended.
Then on R2 and R3 in AS100 I did the following
R2#show run | sec bgp
router bgp 100
bgp log-neighbor-changes
bgp inject-map INJECT exist-map AGG
route-map INJECT permit 10
match ip address prefix-list RIB_INJECTION
set community 100:200 no-export
ip prefix-list RIB_INJECTION seq 10 permit 172.16.1.0/24
route-map AGG permit 10
match ip address prefix-list TRACK
match ip route-source prefix-list SOURCE
ip prefix-list SOURCE seq 10 permit 192.168.24.1/32
ip prefix-list TRACK seq 10 permit 172.16.0.0/16
R3#show run | sec bgp
router bgp 100
bgp log-neighbor-changes
bgp inject-map INJECT exist-map TRACK
route-map INJECT permit 10
match ip address prefix-list RIB_INJECTION
ip prefix-list RIB_INJECTION seq 10 permit 172.16.2.0/24
route-map TRACK permit 10
match ip address prefix-list AGG
match ip route-source SOURCE
ip prefix-list AGG seq 10 permit 172.16.0.0/16
ip prefix-list SOURCE seq 10 permit 192.168.35.1/32
The prefixes are not injected into the BGP RIB which I am stuck on. Looking at my configuration it looks like I took into account everything I needed to get this to work, I can't seem to figure out why the prefixes are not being injected.
Solved! Go to Solution.
06-04-2024 02:04 PM - edited 06-04-2024 02:04 PM
Hi @Mozy ,
The route-map INJECT needs to be changed as follow:
route-map INJECT permit 10
set ip address prefix-list RIB_INJECTION
set community 100:200 no-export
Regards,
06-04-2024 01:02 PM
Can I see
Show ip bgp
MHM
06-04-2024 01:12 PM
Certainly!
06-04-2024 01:22 PM
Sorry but I see prefix
172.16.0.0/16 in bgp table' note that it 172... so it by defualt use /16 as mask
MHM
06-04-2024 01:34 PM
Well yes, that was the aggregate AS100 received from the upstream AS200. I want to inject more specific prefixes into AS100 based on the received aggregate.
06-04-2024 02:04 PM - edited 06-04-2024 02:04 PM
Hi @Mozy ,
The route-map INJECT needs to be changed as follow:
route-map INJECT permit 10
set ip address prefix-list RIB_INJECTION
set community 100:200 no-export
Regards,
06-04-2024 02:36 PM
06-04-2024 05:42 PM
You are very welcome @Mozy and thanks for the feedback
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