cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
824
Views
1
Helpful
7
Replies

BGP inject-map not functioning

Mozy
Level 1
Level 1

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

Mozy_0-1717528610735.png

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.

1 Accepted Solution

Accepted Solutions

Harold Ritter
Spotlight
Spotlight

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

View solution in original post

7 Replies 7

Can I see

Show ip bgp

MHM

Certainly! 

Mozy_0-1717531864252.png

Mozy_1-1717531903382.png

 

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

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. 

Harold Ritter
Spotlight
Spotlight

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,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hi @Harold Ritter,

That solved my issue. Thank you!

 

You are very welcome @Mozy and thanks for the feedback

Regards,
Harold Ritter, CCIE #4168 (EI, SP)