BGP Route Summarization Explained and Configuration Example

What is BGP Route summarization
BGP Route Summarization (or Route Aggregation) is a way to minimize the size of the routing table, by announcing summarized subnets to BGP peers. Route Aggregation decreases routers’ workload and saves network bandwidth.
Lab Topology

Intitial configuration
R1:
R1(config)#int e1/0
R1(config-if)#ip address 172.16.13.1 255.255.255.252
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#router bgp 65001
R1(config-router)#network 10.0.10.0 mask 255.255.255.0
R1(config-router)#exit
R1(config)#int lo0
R1(config-if)#ip address 10.0.10.1 255.255.255.0
R1(config-if)#end
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router bgp 65001
R1(config-router)#neighbor 172.16.13.2 remote-as 65003
R1(config-router)#end
R2:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int e1/0
R2(config-if)#ip add
R2(config-if)#ip address 172.16.23.1 255.255.255.252
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router bgp
R2(config)#router bgp 65002
R2(config-router)#neighbor 172.16.23.2 remoe-as 65003
R2(config-router)#network 10.0.20.0 mask 255.255.255.0
R2(config-router)#exit
R2(config)#int lo0
R2(config-if)#ip address 10.0.20.1 255.255.255.0
R3:
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int e1/0
R3(config-if)#ip address 172.16.13.2 255.255.255.252
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#router bgp 65003
R3(config-router)#neighbor 172.16.13.1 remote-as 65001
R3(config-router)#end
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int e1/1
R3(config-if)#ip add
R3(config-if)#ip address 172.16.23.2 255.255.255.252
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#router bgp 65003
R3(config-router)#neighbor 172.16.23.1 remote-as 65002
R3(config-router)#end
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int e1/2
R3(config-if)#ip address 172.16.34.1 255.255.255.252
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#router bgp 65003
R3(config-router)#neighbor 172.16.34.2 remote-as 65003
R3(config-router)#end
*Sep 7 21:00:43.943: %SYS-5-CONFIG_I: Configured from console by console
R3#
*Sep 7 21:01:41.967: %BGP-5-ADJCHANGE: neighbor 172.16.34.2 Up
R3#conf t
R3(config)#router bgp 65003
R3(config-router)#neighbor 172.16.34.2 next-hop-self
R4:
R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#int e1/0
R4(config-if)#ip address 172.16.34.2 255.255.255.252
R4(config-if)#no sh
R4(config-if)#exit
R4(config)#router bgp 65003
R4(config-router)#neighbor 172.16.34.1 remote-as 65003
Verification:
R4#show ip bgp
BGP table version is 3, local router ID is 172.16.34.2
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
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.10.0/24 172.16.34.1 0 100 0 65001 i
*>i 10.0.20.0/24 172.16.34.1 0 100 0 65002 i
----
R4#show ip route
10.0.0.0/24 is subnetted, 2 subnets
B 10.0.10.0 [200/0] via 172.16.34.1, 00:00:04
B 10.0.20.0 [200/0] via 172.16.34.1, 00:00:04
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.34.0/30 is directly connected, Ethernet1/0
L 172.16.34.2/32 is directly connected, Ethernet1/0
Let’s start BGP Route summarization, to accomplish this, we basically have 3 ways:
- Aggregate-address
I- Aggregate-address
Basic configuration:
- Configuration:
R3(config)#router bgp 65003
R3(config-router)#aggregate-address 10.0.0.0 255.255.0.0
- Verifications:
R4#show ip route
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B 10.0.0.0/16 [200/0] via 172.16.34.1, 00:00:04
B 10.0.10.0/24 [200/0] via 172.16.34.1, 00:01:57
B 10.0.20.0/24 [200/0] via 172.16.34.1, 00:01:57
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.34.0/30 is directly connected, Ethernet1/0
L 172.16.34.2/32 is directly connected, Ethernet1/0
R4#show ip bgp
BGP table version is 4, local router ID is 172.16.34.2
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
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/16 172.16.34.1 0 100 0 i
*>i 10.0.10.0/24 172.16.34.1 0 100 0 65001 i
*>i 10.0.20.0/24 172.16.34.1 0 100 0 65002 i
Summary Only:
- Configuration:
R3(config-router)#aggregate-address 10.0.0.0 255.255.0.0 summary-only
- Verification:
R4#show ip bgp
BGP table version is 6, local router ID is 172.16.34.2
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
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/16 172.16.34.1 0 100 0 i
R4#show ip route
10.0.0.0/16 is subnetted, 1 subnets
B 10.0.0.0 [200/0] via 172.16.34.1, 00:18:09
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.34.0/30 is directly connected, Ethernet1/0
L 172.16.34.2/32 is directly connected, Ethernet1/0
AS-SET:
- Configuration:
R3(config-router)#aggregate-address 10.0.0.0 255.255.0.0 summary-only as-set
- Verification:
R4#show ip bgp
BGP table version is 7, local router ID is 172.16.34.2
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
Network Next Hop Metric LocPrf Weight Path
*>i 10.0.0.0/16 172.16.34.1 0 100 0 {65001,65002} i