BGP – Summarization – Aggregate Address

0
150

There are many ways that routes can be shared between BGP neighbors as we all know. Sometimes there are specific requirements though as to how they need to be shared or if you want a single route to be shared to cover a variety of subnets. That brings up the topic that I am focusing on this morning (while the dogs are finally napping). Here’s what the topology looks like:

This is pretty straight forward. R1 and R5 are BGP neighbors with R3 as a transit router. OSPF is the IGP I am running between all three. The routes on R1 are what we want R5 to learn via BGP. We will be controlling how these routes are shared with the aggregate address as you will see in a moment.

I created a few static routes on R1 that are just directed to Null0:

R1#sh run | i Null0
ip route 192.168.0.0 255.255.255.0 Null0
ip route 192.168.1.0 255.255.255.0 Null0
R1#

Each of those routes is a /24 as you can see. A /23 subnet would cover those IP spaces as basic subnetting would show. That’s what we will use for our aggregate address: 192.168.0.0/23.

As for BGP. I have a basic neighbor relationship setup between R1 and R5. I redistributed these 2 static routes into BGP and R5 is able to see them just fine:

R5#sh ip bgp neighbors 1.1.1.1 advertised-routes
BGP table version is 11, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
 
Originating default network 0.0.0.0
 
Network Next Hop Metric LocPrf Weight Path
*>i 192.168.0.0 1.1.1.1 0 100 0 ?
*>i 192.168.1.0 1.1.1.1 0 100 0 ?
 
Total number of prefixes 2
R5#

Each of the routes are now being seen individually. What if we wanted to add that summary route. On R1, under the BGP process, we’d add the command:

R1(config-router)#aggregate-address 192.168.0.0 255.255.254.0

This will get the new summary route advertised as seen on R1:

R5#sh ip bgp neighbors 1.1.1.1 advertised-routes
BGP table version is 13, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
 
Originating default network 0.0.0.0
 
Network Next Hop Metric LocPrf Weight Path
*>i 192.168.0.0 1.1.1.1 0 100 0 ?
*>i 192.168.0.0/23 1.1.1.1 0 100 0 i
*>i 192.168.1.0 1.1.1.1 0 100 0 ?
 
Total number of prefixes 3
R5#

That doesn’t do much for cleaning up the advertised BGP routes though so there is one more small change to be made:

R1(config-router)#aggregate-address 192.168.0.0 255.255.254.0 summary-only

And with that, the individual /24 routes are not advertised into BGP, only the summary route:

R5#sh ip bgp neighbors 1.1.1.1 advertised-routes
BGP table version is 8, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
 
Originating default network 0.0.0.0
 
Network Next Hop Metric LocPrf Weight Path
*>i 192.168.0.0/23 1.1.1.1 0 100 0 i
 
Total number of prefixes 1
R5#

This is one of those functions that takes BGP knowledge up a notch. It is very easy to create two BGP neighbors and share a few connected routes. Being able to filter advertisements to meet a specific set of requirements is what takes it to the next level. Very few networks are vanilla enough where only the basics are needed.

Not a huge post, but a very useful topic to cover. I will be going more into modifying BGP advertisements and how the information is shared within the next few posts.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.