What is BGP Route Aggregation (R A)? How to configure Route Aggregation?

Edgar C Francis
9 min readNov 24, 2023

--

What is BGP Route Aggregation (R A)?
What is atomic-aggregate? What is aggregated?

Route Aggregation or BGP route summarization is used to minimize the routing table size. Route aggregate provides the flexibility to allow none, all, or a subnet of the summary’s component subnets to be advertised out of the BGP table. Route Aggregation minimizes the size of the global routing table, decreases the workload of routers, and also saves the network bandwidth.

BGP summarization is more complex than IGP protocols because when we use the BGP router sub-command aggregate-address without any parameters, all the important information of individual route attributes is lost such as AS_PATH, we know AS_PATH is used for loop prevention. in order to summarize make sure at least one subnet is in the BGP table.

atomic-aggregate is a well-known BGP attribute. this attribute must be recognized by all BGP routers but it’s not mean this attribute has to be included in all BGP updates. this atomic aggregate tells the BGP routers that 192.168.0.0/18 is a result of route aggregation and some information could be missing.

aggregate attribute (aggregated by 65300 192.168.33.1) This attribute specifies the autonomous number and BGP router ID of the aggregating router.

I’m assuming you are familiar with IGP summarization. let’s take a look aggregation command.

R2(config-router)#aggregate-address 192.168.8.0 255.255.248.0 ?

advertise-map Set condition to advertise attribute

as-set Generate AS set path information

attribute-map Set attributes of aggregate

nlri Nlri aggregate applies to

route-map Set parameters of aggregate

summary-only Filter more specific routes from updates

suppress-map Conditionally filter more specific routes from updates

<cr>

(When we configure the aggregate-address 192.168.8.0 255.255.248.0 command without any additional then this command advertises the route with individual prefixes and it looks like this)

R3#show ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 192.168.8.0/21 2.2.2.1 0 0 65200 i

*> 192.168.10.0 2.2.2.1 0 65200 65100 i

*> 192.168.11.0 2.2.2.1 0 65200 65100 i

*> 192.168.12.0 2.2.2.1 0 65200 65100 i

*> 192.168.13.0 2.2.2.1 0 65200 65100 i

(you can delete (suppress) these prefixes and you can tell the BGP router that only advertises the summary address but you need to add an additional command which is summary only. let’s see what it looks like after adding a summary-only command)

R2(config)#router bgp 65200

R2(config-router)#aggregate-address 192.168.8.0 255.255.248.0 summary-only

R2(config-router)#end

R3#show ip bgp

BGP table version is 46, local router ID is 192.168.33.1

Status codes: s suppressed, d damped, h history, * valid, > best, i — internal,

r RIB-failure, S Stale

Origin codes: i — IGP, e — EGP, ? — incomplete

Network Next Hop Metric LocPrf Weight Path

*> 192.168.8.0/21 2.2.2.1 0 0 65200 i

(Now the individual prefixes are gone but there is AS Path information is not available. this will happen if you do not specify any additional option to the command. it looks like a new prefix is born in the local AS.)

Let’s see the configuration: -

Topology: -

Goal_

  • configure the topology as per the diagram
  • assign the IPs to their respective ports as per the topology
  • configure E-BGP as per the topology
  • advertise the loopback route as per the topology
  • configure Router_AS_65300 to aggregate routes 192.168.0.0/18 without any additional command.
  • configure Router_AS_65300 to aggregate routes 192.168.0.0/18 with summary only
  • configure Router_AS_65200 to aggregate routes 192.168.40.0/18 with summary only

assign the IPs to their respective ports as per the topology

Router_AS_65100_(config)#interface serial 4/0

Router_AS_65100_(config-if)#ip address 1.1.1.1 255.0.0.0

Router_AS_65100_(config-if)#no shutdown

Router_AS_65100_(config-if)#exit

Router_AS_65100_(config)#interface fastethernet 0/0

Router_AS_65100_(config-if)#ip address 10.1.1.1 255.0.0.0

Router_AS_65100_(config-if)#no keepalive

Router_AS_65100_(config-if)#no shutdown

Router_AS_65100_(config-if)#exit

Router_AS_65100_(config)#interface loopback 0

Router_AS_65100_(config-if)#ip address 192.168.10.1 255.255.255.0

Router_AS_65100_(config-if)#exit

Router_AS_65100_(config)#interface loopback 1

Router_AS_65100_(config-if)#ip address 192.168.11.1 255.255.255.0

Router_AS_65100_(config-if)#exit

Router_AS_65100_(config)#interface loopback 2

Router_AS_65100_(config-if)#ip address 192.168.12.1 255.255.255.0

Router_AS_65100_(config-if)#exit

Router_AS_65100_(config)#interface loopback 3

Router_AS_65100_(config-if)#ip address 192.168.13.1 255.255.255.0

Router_AS_65100_(config-if)#exit

Router_AS_65200_(config)#interface serial 4/0

Router_AS_65200_(config-if)#ip address 1.1.1.2 255.0.0.0

Router_AS_65200_(config-if)#no shutdown

Router_AS_65200_(config-if)#exit

Router_AS_65200_(config)#interface serial 4/1

Router_AS_65200_(config-if)#ip address 2.2.2.1 255.0.0.0

Router_AS_65200_(config-if)#no shutdown

Router_AS_65200_(config-if)#exit

Router_AS_65200_(config)#interface serial 4/2

Router_AS_65200_(config-if)#ip address 3.3.3.1 255.0.0.0

Router_AS_65200_(config-if)#no shutdown

Router_AS_65200_(config-if)#exit

Router_AS_65200_(config)#interface serial 4/3

Router_AS_65200_(config-if)#ip address 4.4.4.1 255.0.0.0

Router_AS_65200_(config-if)#no shutdown

Router_AS_65200_(config-if)#exit

Router_AS_65200_(config)#interface fastethernet 0/0

Router_AS_65200_(config-if)#ip address 20.1.1.1 255.0.0.0

Router_AS_65200_(config-if)#no keepalive

Router_AS_65200_(config-if)#no shutdown

Router_AS_65200_(config-if)#exit

Router_AS_65300_(config)#interface serial 4/1

Router_AS_65300_(config-if)#ip address 2.2.2.2 255.0.0.0

Router_AS_65300_(config-if)#no shutdown

Router_AS_65300_(config-if)#exit

Router_AS_65300_(config)#interface fastethernet 0/0

Router_AS_65300_(config-if)#ip address 30.1.1.1 255.0.0.0

Router_AS_65300_(config-if)#no keepalive

Router_AS_65300_(config-if)#no shutdown

Router_AS_65300_(config-if)#exit

Router_AS_65300_(config)#interface loopback 0

Router_AS_65300_(config-if)#ip address 192.168.30.1 255.255.255.0

Router_AS_65300_(config-if)#exit

Router_AS_65300_(config)#interface loopback 1

Router_AS_65300_(config-if)#ip address 192.168.31.1 255.255.255.0

Router_AS_65300_(config-if)#exit

Router_AS_65300_(config)#interface loopback 2

Router_AS_65300_(config-if)#ip address 192.168.32.1 255.255.255.0

Router_AS_65300_(config-if)#exit

Router_AS_65300_(config)#interface loopback 3

Router_AS_65300_(config-if)#ip address 192.168.33.1 255.255.255.0

Router_AS_65300_(config-if)#exit

Router_AS_65400_(config)#interface serial 4/2

Router_AS_65400_(config-if)#ip address 3.3.3.2 255.0.0.0

Router_AS_65400_(config-if)#no shutdown

Router_AS_65400_(config-if)#exit

Router_AS_65400_(config)#interface fastethernet 0/0

Router_AS_65400_(config-if)#ip address 40.1.1.1 255.0.0.0

Router_AS_65400_(config-if)#no keepalive

Router_AS_65400_(config-if)#no shutdown

Router_AS_65400_(config-if)#exit

Router_AS_65400_(config)#interface loopback 0

Router_AS_65400_(config-if)#ip address 192.168.40.1 255.255.255.0

Router_AS_65400_(config-if)#exit

Router_AS_65400_(config)#interface loopback 1

Router_AS_65400_(config-if)#ip address 192.168.41.1 255.255.255.0

Router_AS_65400_(config-if)#exit

Router_AS_65400_(config)#interface loopback 2

Router_AS_65400_(config-if)#ip address 192.168.42.1 255.255.255.0

Router_AS_65400_(config-if)#exit

Router_AS_65400_(config)#interface loopback 3

Router_AS_65400_(config-if)#ip address 192.168.43.1 255.255.255.0

Router_AS_65400_(config-if)#exit

configure E-BGP as per the topology and advertise the loopback route as per the topology

Router_AS_65100_(config)#router bgp 65100
Router_AS_65100_(config-router)#neighbor 1.1.1.2 remote-as 65200
Router_AS_65100_(config-router)#network 1.0.0.0
Router_AS_65100_(config-router)#network 10.0.0.0
Router_AS_65100_(config-router)#no auto-summary
Router_AS_65100_(config-router)#no synchronization
Router_AS_65100_(config-router)#exit

Router_AS_65200_(config)#router bgp 65200

Router_AS_65200_(config-router)#neighbor 1.1.1.1 remote-as 65100

Router_AS_65200_(config-router)#neighbor 2.2.2.2 remote-as 65300

Router_AS_65200_(config-router)#neighbor 3.3.3.2 remote-as 65400

Router_AS_65200_(config-router)#network 1.0.0.0

Router_AS_65200_(config-router)#network 2.0.0.0

Router_AS_65200_(config-router)#network 3.0.0.0

Router_AS_65200_(config-router)#no auto-summary

Router_AS_65200_(config-router)#no synchronization

Router_AS_65200_(config-router)#exit

Router_AS_65300_(config)#router bgp 65300

Router_AS_65300_(config-router)#neighbor 2.2.2.1 remote-as 65200

Router_AS_65300_(config-router)#network 192.168.30.0 mask 255.255.255.0

Router_AS_65300_(config-router)#network 192.168.31.0 mask 255.255.255.0

Router_AS_65300_(config-router)#network 192.168.32.0 mASK 255.255.255.0

Router_AS_65300_(config-router)#network 192.168.33.0 mask 255.255.255.0

Router_AS_65300_(config-router)#network 2.0.0.0

Router_AS_65300_(config-router)#network 30.0.0.0

Router_AS_65300_(config-router)#no auto-summary

Router_AS_65300_(config-router)#no synchronization

Router_AS_65300_(config-router)#exit

Router_AS_65400_(config)#router bgp 65400

Router_AS_65400_(config-router)#neighbor 3.3.3.1 remote-as 65200

Router_AS_65400_(config-router)#network 192.168.40.0 mask 255.255.255.0

Router_AS_65400_(config-router)#network 192.168.41.0 mask 255.255.255.0

Router_AS_65400_(config-router)#network 192.168.42.0 mASK 255.255.255.0

Router_AS_65400_(config-router)#network 192.168.43.0 mask 255.255.255.0

Router_AS_65400_(config-router)#network 3.0.0.0

Router_AS_65400_(config-router)#network 40.0.0.0

Router_AS_65400_(config-router)#no auto-summary

Router_AS_65400_(config-router)#no synchronization

Router_AS_65400_(config-router)#exit

Router_AS_65200_#show ip bgp

BGP table version is 25, local router ID is 20.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i — internal,

r RIB-failure, S Stale

Origin codes: i — IGP, e — EGP, ? — incomplete

Network Next Hop Metric LocPrf Weight Path

* 1.0.0.0 1.1.1.1 0 0 65100 i

*> 0.0.0.0 0 32768 i

* 2.0.0.0 2.2.2.2 0 0 65300 i

*> 0.0.0.0 0 32768 i

* 3.0.0.0 3.3.3.2 0 0 65400 i

*> 0.0.0.0 0 32768 i

*> 4.0.0.0 0.0.0.0 0 32768 i

*> 10.0.0.0 1.1.1.1 0 0 65100 i

*> 30.0.0.0 2.2.2.2 0 0 65300 i

*> 40.0.0.0 3.3.3.2 0 0 65400 i

*> 50.0.0.0 4.4.4.2 0 0 65500 i

*> 192.168.30.0 2.2.2.2 0 0 65300 i

*> 192.168.31.0 2.2.2.2 0 0 65300 i

*> 192.168.32.0 2.2.2.2 0 0 65300 i

*> 192.168.33.0 2.2.2.2 0 0 65300 i

*> 192.168.40.0 3.3.3.2 0 0 65400 i

*> 192.168.41.0 3.3.3.2 0 0 65400 i

*> 192.168.42.0 3.3.3.2 0 0 65400 i

*> 192.168.43.0 3.3.3.2 0 0 65400 i

Router_AS_65300_#show ip bgp

BGP table version is 21, local router ID is 192.168.33.1

Status codes: s suppressed, d damped, h history, * valid, > best, i — internal,

r RIB-failure, S Stale

Origin codes: i — IGP, e — EGP, ? — incomplete

Network Next Hop Metric LocPrf Weight Path

*> 1.0.0.0 2.2.2.1 0 0 65200 i

* 2.0.0.0 2.2.2.1 0 0 65200 i

*> 0.0.0.0 0 32768 i

*> 3.0.0.0 2.2.2.1 0 0 65200 i

*> 4.0.0.0 2.2.2.1 0 0 65200 i

*> 10.0.0.0 2.2.2.1 0 65200 65100 i

*> 30.0.0.0 0.0.0.0 0 32768 i

*> 40.0.0.0 2.2.2.1 0 65200 65400 i

*> 50.0.0.0 2.2.2.1 0 65200 65500 i

*> 192.168.30.0 0.0.0.0 0 32768 i

*> 192.168.31.0 0.0.0.0 0 32768 i

*> 192.168.32.0 0.0.0.0 0 32768 i

*> 192.168.33.0 0.0.0.0 0 32768 i

*> 192.168.40.0 2.2.2.1 0 65200 65400 i

*> 192.168.41.0 2.2.2.1 0 65200 65400 i

*> 192.168.42.0 2.2.2.1 0 65200 65400 i

*> 192.168.43.0 2.2.2.1 0 65200 65400 i

(configure Router_AS_65300 to summarize routes 192.168.0.0/18)

Router_AS_65300_(config)#router bgp 65300

Router_AS_65300_(config-router)#aggregate-address 192.168.0.0 255.255.192.0

Router_AS_65300_(config-router)#exit

(now let’s take a look at Router_AS_65200)

Router_AS_65200_#show ip bgp

BGP table version is 26, local router ID is 20.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i — internal,

r RIB-failure, S Stale

Origin codes: i — IGP, e — EGP, ? — incomplete

Network Next Hop Metric LocPrf Weight Path

* 1.0.0.0 1.1.1.1 0 0 65100 i

*> 0.0.0.0 0 32768 i

* 2.0.0.0 2.2.2.2 0 0 65300 i

*> 0.0.0.0 0 32768 i

* 3.0.0.0 3.3.3.2 0 0 65400 i

*> 0.0.0.0 0 32768 i

*> 4.0.0.0 0.0.0.0 0 32768 i

*> 10.0.0.0 1.1.1.1 0 0 65100 i

*> 30.0.0.0 2.2.2.2 0 0 65300 i

*> 40.0.0.0 3.3.3.2 0 0 65400 i

*> 50.0.0.0 4.4.4.2 0 0 65500 i

*> 192.168.0.0/18 2.2.2.2 0 0 65300 i

*> 192.168.30.0 2.2.2.2 0 0 65300 i

*> 192.168.31.0 2.2.2.2 0 0 65300 i

*> 192.168.32.0 2.2.2.2 0 0 65300 i

*> 192.168.33.0 2.2.2.2 0 0 65300 i

*> 192.168.40.0 3.3.3.2 0 0 65400 i

*> 192.168.41.0 3.3.3.2 0 0 65400 i

*> 192.168.42.0 3.3.3.2 0 0 65400 i

*> 192.168.43.0 3.3.3.2 0 0 65400 i

(as you can see it looks like a new prefix is generated in the AS and also you see the Aggregate-address command advertises the aggregate route (192.168.0.0/18) along with the individual prefixes and we do not want these prefixes to be advertised. to remove these individuals’ routes, we are going to add the command summary only)

Router_AS_65300_(config)#router bgp 65300
Router_AS_65300_(config-router)#aggregate-address 192.168.0.0 255.255.192.0 ?
advertise-map Set condition to advertise attribute
as-set Generate AS set path information
attribute-map Set attributes of aggregate
nlri Nlri aggregate applies to
route-map Set parameters of aggregate
summary-only Filter more specific routes from updates
suppress-map Conditionally filter more specific routes from updates
<cr>

Router_AS_65300_(config-router)#$.168.0.0 255.255.192.0 summary-only
Router_AS_65300_(config-router)#end

Router_AS_65200_#show ip bgp

BGP table version is 30, local router ID is 20.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i — internal,

r RIB-failure, S Stale

Origin codes: i — IGP, e — EGP, ? — incomplete

Network Next Hop Metric LocPrf Weight Path

* 1.0.0.0 1.1.1.1 0 0 65100 i

*> 0.0.0.0 0 32768 i

* 2.0.0.0 2.2.2.2 0 0 65300 i

*> 0.0.0.0 0 32768 i

* 3.0.0.0 3.3.3.2 0 0 65400 i

*> 0.0.0.0 0 32768 i

*> 4.0.0.0 0.0.0.0 0 32768 i

*> 10.0.0.0 1.1.1.1 0 0 65100 i

*> 30.0.0.0 2.2.2.2 0 0 65300 i

*> 40.0.0.0 3.3.3.2 0 0 65400 i

*> 50.0.0.0 4.4.4.2 0 0 65500 i

*> 192.168.0.0/18 2.2.2.2 0 0 65300 i

*> 192.168.40.0 3.3.3.2 0 0 65400 i

*> 192.168.41.0 3.3.3.2 0 0 65400 i

*> 192.168.42.0 3.3.3.2 0 0 65400 i

*> 192.168.43.0 3.3.3.2 0 0 65400 i

*> 192.168.50.0 4.4.4.2 0 0 65500 i

*> 192.168.51.0 4.4.4.2 0 0 65500 i

*> 192.168.52.0 4.4.4.2 0 0 65500 i

*> 192.168.53.0 4.4.4.2 0 0 65500 i

(as you can see now there are no more individual prefixes installed, let’s take a close look at the 192.168.0.0/18 prefix)

Router_AS_65200_#show ip bgp 192.168.0.0/18

BGP routing table entry for 192.168.0.0/18, version 26

Paths: (1 available, best #1, table Default-IP-Routing-Table)

Advertised to update-groups:

2

65300, (aggregated by 65300 192.168.33.1)

2.2.2.2 from 2.2.2.2 (192.168.33.1)

Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best

(You notice atomic-aggregate is a well-known BGP attribute. this attribute must be recognized by all BGP routers but it does not mean this attribute has to be included in all BGP updates. this atomic aggregate tells the BGP routers that 192.168.0.0/18 is a result of route aggregation and some information could be missing. you also notice there is one more aggregate attribute (aggregated by 65300 192.168.33.1) This attribute specifies the autonomous number and BGP router ID of the aggregating router in our topology we configure the aggregate command on the router 3)

(Now we are to aggregate router 4 loopbacks network but on router_2)

Router_AS_65200_(config)#router bgp 65200

Router_AS_65200_(config-router)#aggregate-address 192.168.40.0 255.255.248.0 summary-only

Router_AS_65200_(config-router)#end

(We have aggregated the router 4 loopbacks network on router 2, now let’s take a look at router 1. What information is missing?)

Router_AS_65100_#show ip bgp

BGP table version is 23, local router ID is 192.168.13.1

Status codes: s suppressed, d damped, h history, * valid, > best, i — internal,

r RIB-failure, S Stale

Origin codes: i — IGP, e — EGP, ? — incomplete

Network Next Hop Metric LocPrf Weight Path

* 1.0.0.0 1.1.1.2 0 0 65200 i

*> 0.0.0.0 0 32768 i

*> 2.0.0.0 1.1.1.2 0 0 65200 i

*> 3.0.0.0 1.1.1.2 0 0 65200 i

*> 4.0.0.0 1.1.1.2 0 0 65200 i

*> 10.0.0.0 0.0.0.0 0 32768 i

*> 30.0.0.0 1.1.1.2 0 65200 65300 i

*> 40.0.0.0 1.1.1.2 0 65200 65400 i

*> 50.0.0.0 1.1.1.2 0 65200 65500 i

*> 192.168.0.0/18 1.1.1.2 0 65200 65300 i

*> 192.168.40.0/21 1.1.1.2 0 0 65200 i

(As you can see the 192.168.40.0 belongs to AS 65400 and here the AS path is not the same as the original to fix this, we need an AS set).

--

--

Edgar C Francis

I am a CCIE Technical Instructor/Network consultant. I am having experience ranging from operating and maintaining PCs and peripherals to network control