cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3089
Views
0
Helpful
4
Replies

Advertise smaller BGP subnet

aweise
Level 1
Level 1


I have a router with 4 BGP neighbors, to which I am advertising a list of subnets. This list includes
a handful of /14 and /15 ranges. However, I want to advertise a /29 within the /14 range without
prepending the AS path. I have things like this:


route-map REGION permit 10
match ip address prefix-list region
set as-path prepend 65420 65420

 

route-map REGION permit 20
match ip address prefix-list subnet

 

ip prefix-list subnet seq 10 permit 172.25.254.128/29

 

ip prefix-list region seq 10 permit 10.0.0.0/8
ip prefix-list region seq 20 permit 192.168.0.0/16
ip prefix-list region seq 30 permit 172.16.0.0/14
ip prefix-list region seq 40 permit 172.20.0.0/16
ip prefix-list region seq 50 permit 172.22.0.0/15
ip prefix-list region seq 60 permit 172.24.0.0/14
ip prefix-list region seq 70 permit 172.28.0.0/15
ip prefix-list region seq 80 permit 172.30.0.0/16

 

So, I want to prepend the AS path for everything except for 172.25.254.128/29. 

 

When I see the routes I'm advertising, I only see the ones in the "region" prefix-list. Can I not advertise the /29 as part of this? If so, is that because BGP is advertising the larger (172.24.0.0/15) subnet?

1 Accepted Solution

Accepted Solutions

Hello @aweise ,

if you haven't used the aggregate command and you are using a modern IOS version you have:

no auto-summary

enabled by default and in this case the network command in BGP requires an exact match in IP routing table to trigger an advertisement.

At this point to see the /29 advertised you need to add the appropriate network command in BGP

 

network 172.25.254.128 255.255.255.248

 

but the prefix must be present in the IP routing table with that exact netmask by any means (via an IGP or static route or connected)

 

Likely the BGP router does not see this component route.

 

Hope to help

Giuseppe

 

View solution in original post

4 Replies 4

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @aweise ,

if you have created the aggregate route in the following way:

aggregate-address 172.24.0.0.0 255.252.0.0 summary-only

 

then the component route is suppressed.

you can use a route-map to select what component routes should be still advertised and you need to invoke it with unsuppress-map at the end of aggregate-address command

 

route-map SELECTED permit 10

match ip address prefix-list subnet

 

aggregate-address 172.24.0.0.0 255.252.0.0 summary-only unsuppress-map SELECTED

 

Hope to help

Giuseppe

Giuseppe,

 

I didn't use an aggregate-address statement, just a network statement under router bgp:

 

network 172.24.0.0 mask 255.252.0.0

 

Should I remove that statement and use the aggregate-address command with the route-map & unsuppress-map  as you suggested instead?

Hello @aweise ,

if you haven't used the aggregate command and you are using a modern IOS version you have:

no auto-summary

enabled by default and in this case the network command in BGP requires an exact match in IP routing table to trigger an advertisement.

At this point to see the /29 advertised you need to add the appropriate network command in BGP

 

network 172.25.254.128 255.255.255.248

 

but the prefix must be present in the IP routing table with that exact netmask by any means (via an IGP or static route or connected)

 

Likely the BGP router does not see this component route.

 

Hope to help

Giuseppe

 

Giuseppe - that worked. Just giving the network statement with the correct mask, along with the route-map I had made BGP announce that component prefix. Thanks!

Review Cisco Networking for a $25 gift card