How-to:Configure BGP aggregation Part1


In this series we will explore how route aggregation is accomplished in BGP, We am going to split this topic into multiple posts in order to keep things simple and manageable.

Our Network is shown in the digram below. R1 is directly connected to R2 and BGP is basically configured as shown:

BGP

Router1 Configuration

router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.0.0.0
neighbor 192.168.12.2 remote-as 2
no auto-summary

Router2 configuration

router bgp 2
no synchronization
bgp log-neighbor-changes

!-- loopbacks are advertised into BGP using network commands

network 2.2.0.0 mask 255.255.255.0
network 2.2.1.0 mask 255.255.255.0
network 2.2.2.0 mask 255.255.255.0
network 2.2.3.0 mask 255.255.255.0
neighbor 192.168.12.1 remote-as 1
no auto-summary

BGP tables on R1 & R2 before configuring summarization:

R1#sh ip bgp
BGP table version is 18, local router ID is 11.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 0.0.0.0 0 32768 i
*> 2.2.0.0/24 192.168.12.2 0 0 2 i
*> 2.2.1.0/24 192.168.12.2 0 0 2 i
*> 2.2.2.0/24 192.168.12.2 0 0 2 i
*> 2.2.3.0/24 192.168.12.2 0 0 2 i

R2#sh ip bgp
BGP table version is 33, local router ID is 123.23.2.2
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 192.168.12.1 0 0 1 i
*> 2.2.0.0/24 0.0.0.0 0 32768 i
*> 2.2.1.0/24 0.0.0.0 0 32768 i
*> 2.2.2.0/24 0.0.0.0 0 32768 i
*> 2.2.3.0/24 0.0.0.0 0 32768 i

As shown in the output above both routers have all loopbacks in thier BGP tables.

Task1: Configure R2 to summarize its loopback addresses into one summary.

The aggregate-address command is used on R2 to summarize its loopbacks into 2.2.0.0/22.

Note that the default behavior of BGP is to advertise the aggregate address plus all its component routes to its neighbors as shown in the output below

R2(config)#router bgp 2
R2(config-router)#aggregate-address 2.2.0.0 255.255.252.0

R2#sh ip bgp
BGP table version is 63, local router ID is 123.23.2.2
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 192.168.12.1 0 0 1 i
*> 2.2.0.0/24 0.0.0.0 0 32768 i
*> 2.2.0.0/22 0.0.0.0 32768 i
*> 2.2.1.0/24 0.0.0.0 0 32768 i
*> 2.2.2.0/24 0.0.0.0 0 32768 i
*> 2.2.3.0/24 0.0.0.0 0 32768 i

Note that the BGP table of R1 includes the summary and all summarized addresses

R1#sh ip bgp
BGP table version is 36, local router ID is 11.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 0.0.0.0 0 32768 i
*> 2.2.0.0/24 192.168.12.2 0 0 2 i
*> 2.2.0.0/22 192.168.12.2 0 0 2 i
*> 2.2.1.0/24 192.168.12.2 0 0 2 i
*> 2.2.2.0/24 192.168.12.2 0 0 2 i
*> 2.2.3.0/24 192.168.12.2 0 0 2 i

Task2: Configure R2 to summarize its loopback addresses and advertise only the summary route to its neighbors.

The summary-only keyword is used in the aggregate-address command allow only the summary route to be advertised to BGP peers.

R2(config)#router bgp 2
R2(config-router)#aggregate-address 2.2.0.0 255.255.252.0 summary-only

The s letter beside all networks indicates that these routes are suppressed and not advertised to other peers.

R2#sh ip bgp
BGP table version is 38, local router ID is 123.23.2.2
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 192.168.12.1 0 0 1 i
s> 2.2.0.0/24 0.0.0.0 0 32768 i
*> 2.2.0.0/22 0.0.0.0 32768 i
s> 2.2.1.0/24 0.0.0.0 0 32768 i
s> 2.2.2.0/24 0.0.0.0 0 32768 i
s> 2.2.3.0/24 0.0.0.0 0 32768 i

The BGP table of R1 contains only the summary route 22.2.0.0/22 received from the R2

R1#sh ip bgp
BGP table version is 23, local router ID is 11.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 0.0.0.0 0 32768 i
*> 2.2.0.0/22 192.168.12.2 0 0 2 i

Final Notes:

  • The summary route does not inherit any attributes from the its components by default.
  • The atomic-aggregate arribute is set to indicated that the route is an aggregate and some information may be lost like AS-Path.
  • The aggregator abbribute is set to the router-id of the rotuer that performed the aggregation.
R1#sh ip bgp 2.2.0.0
BGP routing table entry for 2.2.0.0/22, version 19
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
2, (aggregated by 2 123.23.2.2)
192.168.12.2 from 192.168.12.2 (123.23.2.2)
Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best

We will explore more about BGP route aggregation in upcoming posts.We appreciate your comments, questions or corrections.

Wael Osama

Check Also

Best AI tools list