BGP Route Summarization Explained with Configuration Example

BGP Route Summarization Explained with  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


Initial 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 2 ways:

  • Static route pointing to null0
  • Aggregate-address


I- Static route pointing to null0

The first method is an old way to perform summarization in BGP, and it quite simple:

  • we configure a static route with destination of the aggregated route pointing to null0 (in order to discard it), since R3 already have the specific routes
  • we use network command to advertise this summarized route (based on the static route) to the neighbors.
R3#

ip route 10.0.0.0 255.255.0.0 Null0

router bgp 65003
network 10.0.0.0 255.255.0.0


II- 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:

The “summary-only” suppresses all the more specific routes of an aggregate address from being advertised. 

  • Configuration:
R3(config-router)#aggregate-address 10.0.0.0 255.255.0.0 summary-only
  • Verification:

As a result, we don’t see the “10.0.10.0/24” and “10.0.20.0/24” being advertised, only the aggregated subnet 10.0.0.0/16.

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


Suppress-map

Since the “summary-only” suppresses all the specific routes of an aggregate address from being advertised. we have another option where we can choose the specific subnets NOT to advertise via a route-map:

R3(config-router)# aggregate-address 10.0.0.0 255.255.0.0 suppress-map route-map-name


unsuppress-map per neighbor

We can advertise the suppressed routes to specific neighbor, by configuring a route-map including these specific routes and applying command below to the neighbor:

“neighbor
 ip-address unsuppress-map route-map-name


AS-SET:

As-set will add the unordered list of the ASN of the summarized routes, this could be prevent potential loops:

  • Configuration:
R3(config-router)#aggregate-address 10.0.0.0 255.255.0.0 summary-only as-set
  • Verification:

we can see that R4 received the aggregated route with {65001,65002} added in the AS PATH:

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


Advertise-map

advertise-map:
We can use advertise-map to Aggregate a Subset of Specific Routes, which means that we can exclude (deny) specific routes (ASN) from the aggregation.

For example, we have “10.0.10.0/24” and “10.0.20.0/24” to be summarized, advertise-map can be used along with a route-map that will deny the subnet “10.0.10.0/24” to exclude this route from the aggregation, but still the aggregated route is advertised because we have “10.0.20.0/24” in the routing table of R3 that allow the advertisement of aggregated route.

The advertise-map can be handy when used with as-set. If we exclude “10.0.10.0/24” (which was advertised from ASN 65001) via advertise-map, we can see that the AS Path of the advertised aggregated route will change and will not contain {65001,65002}, but only {65002}.

which basically means we excluded “10.0.10.0/24” (and its ASN 65001 from the calculation of the aggregation.

Bilel-A

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x