BGP Aggregate-Address Support for VRF Address-Family
Overview
The aggregate-address feature for VRF address-families in BGP is designed to simplify route management by summarizing multiple specific routes into a single, broader prefix. This helps reduce the size of routing tables and minimizes the overhead for both local and remote routers. Below is an functionality explanation of the behavior and implications of this feature during configuration and un-configuration processes.
Benefits
• Route Summarization: Aggregates multiple specific routes into a single summary route, reducing routing table complexity.
• Scalability: Summarized routes optimize resource utilization, particularly in networks with multiple VRFs and large routing tables.
• Stability: Reduces route flapping as changes in individual specific routes do not impact the advertised aggregate route.
Prerequisites
• IPv4: Individual routes are advertised to BGP peers as separate prefixes.
• IPv6: Individual routes are advertised to BGP peers as separate prefixes.
• Each route is treated independently in the BGP table and shared with peers accordingly.
Configuration for Aggregate Family with IPv4
Topology
This sample topology provides basic connectivity for IPv4 Aggregated address.
BGP Aggregate Address with IPv4
PE1
1. Configure the router ID:
#configure terminal
PE1(config)#router ldp
PE1(config-router)#router-id 1.1.1.1
PE1(config-router)#exit
2. Create and configure VRFs:
PE1(config)#ip vrf VRF1
PE1(config-vrf)#rd 100:1
PE1(config-vrf)#route-target both 100:1
PE1(config-vrf)#exit
3. Enable LDP globally:
PE1(config)#router ldp
PE1(config-ldp)#exit
4. Configure loopback interface with IPv4 and IPv6:
PE1(config-if)#interface lo
PE1(config-if)#ip address 127.0.0.1/8
PE1(config-if)#ip address 1.1.1.1/32 secondary
PE1(config-if)#ipv6 address ::1/128
PE1(config-if)#exit
5. Configure eth1 under VRF1 with an IP address:
PE1(config)#interface eth1
PE1(config-if)#ip vrf forwarding VRF1
PE1(config-if)#ip address 30.1.1.2/24
PE1(config-if)#exit
6. Configure eth2 for MPLS and enable LDP:
PE1(config)#interface eth2
PE1(config-if)#ip address 40.1.1.2/24
PE1(config-if)#ipv6 address 3000::2/64
PE1(config-if)#label-switching
PE1(config-if)#enable-ldp ipv4
PE1(config-if)#interface eth3
PE1(config-if)#interface eth4
PE1(config-if)#interface eth5
PE1(config-if)#interface eth6
PE1(config-if)#exit
7. Enable OSPF and define networks:
PE1(config)#router ospf 100
PE1(config-router)#ospf router-id 1.1.1.1
PE1(config-router)#network 1.1.1.1/32 area 0.0.0.0
PE1(config-router)#network 40.1.1.0/24 area 0.0.0.0
PE1(config-router)#exit
8. Configure BGP:
PE1(config)#router bgp 100
PE1(config-router)#bgp router-id 1.1.1.1
PE1(config-router)#neighbor 2.2.2.2 remote-as 100
PE1(config-router)#neighbor 2.2.2.2 update-source lo
PE1(config-router)#address-family ipv4 unicast
PE1(config-router-ad)#neighbor 2.2.2.2 activate
PE1(config-router-ad)#exit-address-family
PE1(config-router)#address-family vpnv4 unicast
PE1(config-router-ad)#neighbor 2.2.2.2 activate
PE1(config-router-ad)#exit-address-family
PE1(config-router)#address-family ipv4 vrf VRF1
PE1(config-router-ad)#aggregate-address 20.20.20.0/24 as-set summary-only
PE1(config-router-ad)#neighbor 30.1.1.1 remote-as 200
PE1(config-router-ad)#neighbor 30.1.1.1 activate
PE1(config-router-ad)#neighbor 30.1.1.1 route-map map1 in
PE1(config-router-ad)#exit-address-family
PE2
1. Configure the router ID:
#configure terminal
PE2(config)#router ldp
PE2(config-router)#router-id 2.2.2.2
PE2(config-router)#exit
2. Create and configure VRFs:
PE2(config)#ip vrf VRF1
PE2(config-vrf)#rd 200:1
PE2(config-vrf)#route-target both 100:1
PE2(config-vrf)#exit
3. Enable LDP globally:
PE2(config)#router ldp
PE2(config-ldp)#exit
4. Configure loopback interface with IPv4 and IPv6:
PE2(config-if)#interface lo
PE2(config-if)#ip address 127.0.0.1/8
PE2(config-if)#ip address 1.1.1.1/32 secondary
PE2(config-if)#ipv6 address ::1/128
PE2(config-if)#exit
5. Configure eth1 under VRF1 with an IP address:
PE2(config)#interface eth1
PE2(config-if)#ip vrf forwarding VRF1
PE2(config-if)#ip address 50.1.1.2/24
PE2(config-if)#exit
6. Configure eth2 for MPLS and enable LDP:
PE2(config)#interface eth2
PE2(config-if)#ip address 40.1.1.2/24
PE2(config-if)#ipv6 address 3000::2/64
PE2(config-if)#label-switching
PE2(config-if)#enable-ldp ipv4
PE2(config-if)#interface eth3
PE2(config-if)#interface eth4
PE2(config-if)#interface eth5
PE2(config-if)#interface eth6
PE2(config-if)#exit
7. Enable OSPF and define networks:
PE2(config)#router ospf 100
PE2(config-router)#ospf router-id 2.2.2.2
PE2(config-router)#network 2.2.2.2/32 area 0.0.0.0
PE2(config-router)#network 40.1.1.0/24 area 0.0.0.0
PE2(config-router)#exit
8. Configure BGP:
PE2(config)#router bgp 100
PE2(config-router)#bgp router-id 2.2.2.2
PE2(config-router)#neighbor 1.1.1.1 remote-as 100
PE2(config-router)#neighbor 1.1.1.1 update-source lo
PE2(config-router)#address-family ipv4 unicast
PE2(config-router-ad)#neighbor 1.1.1.1 activate
PE2(config-router-ad)#exit-address-family
PE2(config-router)#address-family vpnv4 unicast
PE2(config-router-ad)#neighbor 1.1.1.1 activate
PE2(config-router-ad)#exit-address-family
PE2(config-router)#address-family ipv4 vrf VRF1
PE2(config-router-ad)#neighbor 50.1.1.1 remote-as 200
PE2(config-router-ad)#neighbor 50.1.1.1 route-map map1 in
PE2(config-router-ad)#exit-address-family
CE1
1. Configure Ethernet Interface eth1 with IP Address:
(config)#interface eth1
CE1(config-if)#ip address 30.1.1.1/24
CE1(config-if)#exit
2. Configure Loopback Interfaces
(config)#interface lo1
CE1(config-if)#ip address 20.20.20.1/32
CE1(config-if)#exit
CE1(config)#interface lo2
CE1(config-if)#ip address 20.20.20.2/32
CE1(config-if)#exit
CE1(config)#interface lo3
CE1(config-if)#ip address 20.20.20.3/32
CE1(config-if)#exit
CE1(config)#interface lo4
CE1(config-if)#ip address 20.20.20.4/32
CE1(config-if)#exit
3. Configure BGP:
(config)#router bgp 300
CE1(config-router)#neighbor 30.30.30.2 remote-as 100
CE1(config-router)#address-family ipv4 unicast
CE1(config-router-ad)#neighbor 30.30.30.2 activate
CE1(config-router-ad)#redistribute connected
CE1(config-router-ad)#exit-address-family
CE1(config-router)#exit
Running Configuration with IPv4
PE1
!
router-id 1.1.1.1
!
ip vrf management
!
ip vrf VRF1
rd 100:1
route-target both 100:1
!
router ldp
!
interface lo
ip address 127.0.0.1/8
ip address 1.1.1.1/32 secondary
ipv6 address ::1/128
!
interface eth0
ip address dhcp
!
interface eth1
ip vrf forwarding VRF1
ip address 30.1.1.2/24
!
interface eth2
ip address 40.1.1.2/24
ipv6 address 3000::2/64
label-switching
enable-ldp ipv4
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
exit
!
router ospf 100
ospf router-id 1.1.1.1
network 1.1.1.1/32 area 0.0.0.0
network 40.1.1.0/24 area 0.0.0.0
!
router bgp 100
bgp router-id 1.1.1.1
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source lo
!
address-family ipv4 unicast
neighbor 2.2.2.2 activate
exit-address-family
!
address-family vpnv4 unicast
neighbor 2.2.2.2 activate
exit-address-family
!
address-family ipv4 vrf VRF1
aggregate-address 20.20.20.0/24 as-set summary-only
neighbor 30.1.1.1 remote-as 200
neighbor 30.1.1.1 activate
neighbor 30.1.1.1 route-map map1 in
exit-address-family
!
exit
!
PE2
!
router-id 2.2.2.2
!
ip vrf management
!
ip vrf VRF1
rd 200:1
route-target both 100:1
!
router ldp
!
interface lo
ip address 127.0.0.1/8
ip address 2.2.2.2/32 secondary
ipv6 address ::1/128
!
interface eth0
ip address dhcp
!
interface eth1
ip vrf forwarding VRF1
ip address 50.1.1.2/24
!
interface eth2
ip address 40.1.1.1/24
ipv6 address 3000::1/64
label-switching
enable-ldp ipv4
!
interface eth3
!
interface eth4
!
interface eth5
!
interface eth6
!
exit
!
router ospf 100
ospf router-id 2.2.2.2
network 2.2.2.2/32 area 0.0.0.0
network 40.1.1.0/24 area 0.0.0.0
!
router bgp 100
bgp router-id 2.2.2.2
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source lo
!
address-family ipv4 unicast
neighbor 1.1.1.1 activate
exit-address-family
!
address-family vpnv4 unicast
neighbor 1.1.1.1 activate
exit-address-family
!
address-family ipv4 vrf VRF1
neighbor 50.1.1.1 remote-as 200
neighbor 50.1.1.1 activate
exit-address-family
!
exit
!
CE1
interface eth1
ip address 30.1.1.1/24
!
interface lo1
ip address 20.20.20.1/32
!
interface lo2
ip address 20.20.20.2/32
!
interface lo3
ip address 20.20.20.3/32
!
nterface lo4
ip address 20.20.20.4/32
!
exit
!
router bgp 300
neighbor 30.30.30.2 remote-as 100
!
address-family ipv4 unicast
neighbor 30.30.30.2 activate
redistribute connected
exit-address-family
!
exit
!
Validation
PE1#sh ip bgp vpnv4 all summary
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 1
1 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd Desc
2.2.2.2 4 100 8 7 1 0 0 00:02:10 0
Total number of neighbors 1
Total number of Established sessions 1
BGP VRF VRF1 Route Distinguisher: 100:1
BGP table version is 1
1 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd Desc
30.1.1.1 4 200 6 7 1 0 0 00:02:10 0
Total number of neighbors 1
Total number of Established sessions 1
PE1#sh ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1 (Default for VRF VRF1)
*> l 20.20.20.0/24 0.0.0.0 0 100 32768 ? -
s> 20.20.20.2/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.3/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.4/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.5/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.6/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.7/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.8/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.9/32 30.1.1.1 0 100 0 3000 200 ? -
s> 20.20.20.20/32 30.1.1.1 0 100 0 3000 200 ? -
Announced routes count = 10
Accepted routes count = 0
PE1#sh ip bgp neighbors 2.2.2.2 advertised-routes
For address family: VPNv4 Unicast
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, a add-path, b back-up, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path Ext-Color
*>i 20.20.20.0/24 1.1.1.1 0 100 32768 ? -
Total number of prefixes 1
Configuration for Aggregate Family with IPv6
Topology
This sample topology provides basic connectivity for IPv6 Aggregated address.
BGP Aggregate Address with IPv6
PE1
1. Configure Interfaces:
PE1(config)#interface eth1
PE1(config-if)#ip address 10.1.1.1/24
PE1(config-if)#ipv6 address 3000::1/64
PE1(config-if)#label-switching
PE1(config-if)#enable-ldp ipv4
PE1(config-if)#commit
PE1(config-if)#exit
PE1(config)#interface lo
PE1(config-if)#ip address 127.0.0.1/8
PE1(config-if)#ip address 1.1.1.1/32 secondary
PE1(config-if)#ipv6 address ::1/128
PE1(config-if)#commit
PE1(config-if)#exit
2. Configure OSPF (IPv4):
PE1(config)#router ospf 100
PE1(config-router)#network 1.1.1.1/32 area 0.0.0.0
PE1(config-router)#network 10.1.1.0/24 area 0.0.0.0
PE1(config-router)#commit
PE1(config-router)#exit
3. Configure BGP (IPv4 and IPv6):
PE1(config)#router bgp 100
PE1(config-router)#neighbor 2.2.2.2 remote-as 100
PE1(config-router)#neighbor 2.2.2.2 update-source lo
PE1(config-router)#address-family vpnv4 unicast
PE1(config-router-af)#neighbor 2.2.2.2 activate
PE1(config-router-af)#exit-address-family
PE1(config-router)#address-family vpnv6 unicast
PE1(config-router-af)#neighbor 2.2.2.2 activate
PE1(config-router-af)#exit-address-family
PE1(config-router)#address-family ipv6 vrf vrf1
PE1(config-router-af)#aggregate-address 2001:db8:100::/48 summary-only
PE1(config-router-af)#redistribute static
PE1(config-router-af)#exit-address-family
PE1(config-router)#commit
PE1(config-router)#exit
4. Configure Static IPv6 Routes in vrf1:
PE1(config)#ipv6 route vrf vrf1 2001:db8:100:1::/64 eth8
PE1(config)#ipv6 route vrf vrf1 2001:db8:100:2::/64 eth8
PE1(config)#ipv6 route vrf vrf1 2001:db8:100:3::/64 eth8
PE2
1. Configure Interfaces:
(config)#interface eth1
(config-if)#ip address 10.1.1.2/24
(config-if)#label-switching
(config-if)#enable-ldp ipv4
(config-if)#commit
(config-if)#exit
(config)#interface lo
(config-if)#ip address 127.0.0.1/8
(config-if)#ip address 2.2.2.2/32 secondary
(config-if)#ipv6 address ::1/128
(config-if)#commit
(config-if)#exit
2. Configure OSPF (IPv4):
(config)#router ospf 100
(config-router)#network 2.2.2.2/32 area 0.0.0.0
(config-router)#network 10.1.1.0/24 area 0.0.0.0
3. Configure BGP (IPv4/IPv6/VPN):
(config)#router bgp 100
(config-router)#neighbor 1.1.1.1 remote-as 100
(config-router)#neighbor 1.1.1.1 update-source lo
(config-router-af)#address-family vpnv4 unicast
(config-router-af)#neighbor 1.1.1.1 activate
(config-router-af)#exit-address-family
(config-router)#address-family vpnv6 unicast
(config-router-af)#neighbor 1.1.1.1 activate
(config-router-af)#exit-address-family
(config-router)#address-family ipv6 vrf vrf1
(config-router-af)#exit-address-family
(config-router)#commit
(config-router)#exit
Running Configuration with IPv6
PE1
!
interface eth1
ip address 10.1.1.1/24
ipv6 address 3000::1/64
label-switching
enable-ldp ipv4
!
interface lo
ip address 127.0.0.1/8
ip address 1.1.1.1/32 secondary
ipv6 address ::1/128
!
exit
!
router ospf 100
network 1.1.1.1/32 area 0.0.0.0
network 10.1.1.0/24 area 0.0.0.0
!
router bgp 100
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source lo
!
address-family vpnv4 unicast
neighbor 2.2.2.2 activate
exit-address-family
!
address-family vpnv6 unicast
neighbor 2.2.2.2 activate
exit-address-family
!
address-family ipv6 vrf vrf1
aggregate-address 2001:db8:100::/48 summary-only
redistribute static
exit-address-family
!
exit
!
ipv6 route vrf vrf1 2001:db8:100:1::/64 eth8
ipv6 route vrf vrf1 2001:db8:100:2::/64 eth8
ipv6 route vrf vrf1 2001:db8:100:3::/64 eth8
!
!
end
PE2
!
interface eth1
ip address 10.1.1.2/24
label-switching
enable-ldp ipv4
!
interface lo
ip address 127.0.0.1/8
ip address 2.2.2.2/32 secondary
ipv6 address ::1/128
!
exit
!
router ospf 100
network 2.2.2.2/32 area 0.0.0.0
network 10.1.1.0/24 area 0.0.0.0
!
router bgp 100
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source lo
!
address-family vpnv4 unicast
neighbor 1.1.1.1 activate
exit-address-family
!
address-family vpnv6 unicast
neighbor 1.1.1.1 activate
exit-address-family
!
address-family ipv6 vrf vrf1
exit-address-family
!
exit
!
!
end
Validation
PE1
PE1#show ip bgp vpnv6 all
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1 (Default for VRF vrf1)
*> l 2001:db8:100::/48
:: 0 100 32768 ? -
s> 2001:db8:100:1::/64
:: 0 100 32768 ? -
s> 2001:db8:100:2::/64
:: 0 100 32768 ? -
s> 2001:db8:100:3::/64
:: 0 100 32768 ? -
Announced routes count = 4
Accepted routes count = 0
PE1#
PE2
PE2#show ip bgp vpnv6 all summary
BGP router identifier 10.16.42.104, local AS number 100
BGP table version is 4
1 BGP AS-PATH entries
0 BGP community entries
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd Desc
1.1.1.1 4 100 39 38 4 0 0 00:01:39 1
Total number of neighbors 1
Total number of Established sessions 1
OcNOS#sh ip bgp vpnv6 all
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1
*>i 2001:db8:100:1::/64
::ffff:1.1.1.1 0 100 0 ? -
*>i 2001:db8:100:2::/64
::ffff:1.1.1.1 0 100 0 ? -
*>i 2001:db8:100:3::/64
::ffff:1.1.1.1 0 100 0 ? -
Announced routes count = 0
Accepted routes count = 3
After aggregation
==========================
PE2#sh ip bgp vpnv6 all
Status codes: s suppressed, d damped, h history, a add-path, b back-up, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1
*>i 2001:db8:100::/48
::ffff:1.1.1.1 0 100 0 ? -
Announced routes count = 0
Accepted routes count = 1
Route Distinguisher: 200:1 (Default for VRF vrf1)
*>i 2001:db8:100::/48
::ffff:1.1.1.1 0 100 0 ? -
Announced routes count = 0
Accepted routes count = 1
PE2#