BGP IPv4 - Summarization
Summarization
BGP (Border Gateway Protocol) IPv4 summarization is a technique used to condense the representation of IP prefixes within BGP routing tables. In BGP, particularly in the context of Internet routing, the global BGP table can become massive, leading to increased memory and processing requirements for routers. IPv4 summarization helps alleviate this scalability challenge by aggregating multiple IP prefixes into a more compact summary route. This process is often performed at the network edge, where routers connect to external networks. By summarizing prefixes, BGP routers reduce the size of their routing tables and improve the efficiency of routing information dissemination. However, careful consideration is required during summarization to avoid losing granularity in routing information, ensuring that aggregated prefixes accurately represent the underlying IP prefixes while contributing to a more scalable and manageable BGP routing infrastructure.
Lab:
Disclaimer
This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an “as is” basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.
Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE
Task 1: Configure IPv4 BGP Summarization
Step 1: In the configuration mode of router configure loopbacks with network address in sequence
R1:
interface loopback 1
ip address 11.0.1.1 255.255.255.0
interface loopback 2
ip address 11.0.2.1 255.255.255.0
interface loopback 3
ip address 11.0.3.1 255.255.255.0
exit
Step 2: Summarize BGP routes in router mode
R1:
router bgp 65100
address-family ipv4
aggregate-address 11.0.0.0 255.255.252.0
exit
Step 3: Verify receipt of summary route in other router’s bgp table by following command:
R2# clear ip bgp * soft
//it will learn fresh route without making TCP link down
R2#show ip bgp
BGP table version is 26, local router ID is 22.0.3.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
*> 11.0.0.0/22 11.0.1.1 0 0 65100 i
*> 11.0.1.0/24 11.0.1.1 0 0 65100 i
*> 11.0.2.0/24 11.0.1.1 0 0 65100 i
*> 11.0.3.0/24 11.0.1.1 0 0 65100 i
*> 22.0.1.0/24 0.0.0.0 0 32768 i
*> 22.0.2.0/24 0.0.0.0 0 32768 i
*> 22.0.3.0/24 0.0.0.0 0 32768 i
*>i33.0.1.0/24 33.0.1.3 0 100 0 i
*>i33.0.2.0/24 33.0.1.3 0 100 0 i
*>i33.0.3.0/24 33.0.1.3 0 100 0 i
*>i44.0.1.0/24 44.0.1.4 0 100 0 65200 i
*>i44.0.2.0/24 44.0.1.4 0 100 0 65200 i
*>i44.0.3.0/24 44.0.1.4 0 100 0 65200 i
R4# clear ip bgp * soft
R4#show ip bgp
BGP table version is 62, local router ID is 44.0.3.4
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
*> 11.0.0.0/22 33.0.1.3 0 65000 65100 i
*> 11.0.1.0/24 33.0.1.3 0 65000 65100 i
*> 11.0.2.0/24 33.0.1.3 0 65000 65100 i
*> 11.0.3.0/24 33.0.1.3 0 65000 65100 i
*> 22.0.1.0/24 33.0.1.3 0 65000 i
*> 22.0.2.0/24 33.0.1.3 0 65000 i
*> 22.0.3.0/24 33.0.1.3 0 65000 i
*> 33.0.1.0/24 33.0.1.3 0 0 65000 i
*> 33.0.2.0/24 33.0.1.3 0 0 65000 i
*> 33.0.3.0/24 33.0.1.3 0 0 65000 i
*> 44.0.1.0/24 0.0.0.0 0 32768 i
*> 44.0.2.0/24 0.0.0.0 0 32768 i
*> 44.0.3.0/24 0.0.0.0 0 32768 i
If BGP will send only summary route of an network then the router which is sending summary route will stripped off all previous AS-tag and will send summarized route with fresh originating router, this will lead to Loops in BGP. To avoid loops, BGP send summarized as well as Individual routes to other routers.
Step 4: Configure Summarize only BGP routes in router mode
R3:
router bgp 65000
address-family ipv4
aggregate-address 11.0.0.0 255.255.252.0 summary-only
exit
Step 5: Verify receipt of summary route in other router’s bgp table by following command
R4# clear ip bgp * soft
R4#show ip bgp
BGP table version is 18, local router ID is 44.0.3.4
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
*> 11.0.0.0/22 33.0.1.3 0 0 65000 i
*> 22.0.1.0/24 33.0.1.3 0 65000 i
*> 22.0.2.0/24 33.0.1.3 0 65000 i
*> 22.0.3.0/24 33.0.1.3 0 65000 i
*> 33.0.1.0/24 33.0.1.3 0 0 65000 i
*> 33.0.2.0/24 33.0.1.3 0 0 65000 i
*> 33.0.3.0/24 33.0.1.3 0 0 65000 i
*> 44.0.1.0/24 0.0.0.0 0 32768 i
*> 44.0.2.0/24 0.0.0.0 0 32768 i
*> 44.0.3.0/24 0.0.0.0 0 32768 i
By summary-only command, BGP will send only summary route of network then the router which is sending summary route will stripped off all previous AS-tag and will send summarized route with fresh originating router.
Step 6: Configure Summarize only as-set BGP routes in router mode
R3:
router bgp 65000
address-family ipv4
aggregate-address 11.0.0.0 255.255.252.0 summary-only as-set
exit
Step 7: Verify receipt of summary route in other router’s bgp table by following command
R4# show bgp ipv6 unicast
BGP table version is 19, local router ID is 44.0.3.4
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
*> 11.0.0.0/22 33.0.1.3 0 0 65000 65100 i
*> 22.0.1.0/24 33.0.1.3 0 65000 i
*> 22.0.2.0/24 33.0.1.3 0 65000 i
*> 22.0.3.0/24 33.0.1.3 0 65000 i
*> 33.0.1.0/24 33.0.1.3 0 0 65000 i
*> 33.0.2.0/24 33.0.1.3 0 0 65000 i
*> 33.0.3.0/24 33.0.1.3 0 0 65000 i
*> 44.0.1.0/24 0.0.0.0 0 32768 i
*> 44.0.2.0/24 0.0.0.0 0 32768 i
*> 44.0.3.0/24 0.0.0.0 0 32768 i
By as-set command, only summary route as well as retaining all previous AS-tag is achieved.