BGP IPv4 - Confederation

Confederation

BGP (Border Gateway Protocol) IPv4 Confederation is a mechanism used to address scalability challenges in large and complex autonomous systems. In traditional BGP, all routers within an autonomous system (AS) must maintain a full mesh of BGP peer connections, leading to potential scaling issues as the number of routers increases. IPv4 BGP Confederations offer a solution by dividing the AS into smaller sub-AS groups, each known as a confederation. Within these confederations, routers maintain a full mesh of BGP connections, but routers in different confederations only need to establish connections with the routers in their own confederation and the confederation's external peers. This approach simplifies the BGP topology and enhances scalability, making it more manageable for large-scale networks. BGP Confederation allows for better control of route propagation, reducing the complexity of BGP peering relationships and improving the overall efficiency of BGP in diverse and extensive network environments.

Lab:

BGP Topology

Task 1: Configure IPv4 BGP Process for Autonomous

R1:
router bgp 100
neighbor 12.0.0.2 remote-as 65002
neighbor 12.0.0.2 soft-reconfiguration inbound
address-family ipv4
network 11.0.1.0 mask 255.255.255.0
network 11.0.2.0 mask 255.255.255.0
network 11.0.3.0 mask 255.255.255.0
exit 
R2:
router bgp 65002
neighbor 23.0.0.3 remote-as 65001
neighbor 23.0.0.3 soft-reconfiguration inbound
neighbor 12.0.0.1 remote-as 100
neighbor 12.0.0.1 soft-reconfiguration inbound
address-family ipv4
network 22.0.1.0 mask 255.255.255.0
network 22.0.2.0 mask 255.255.255.0
network 22.0.3.0 mask 255.255.255.0
exit 
R3:
router bgp 65001
neighbor 23.0.0.2 remote-as 65002
neighbor 23.0.0.2 soft-reconfiguration inbound
neighbor 34.0.0.4 remote-as 65001
neighbor 34.0.0.4 soft-reconfiguration inbound
address-family ipv4
network 33.0.1.0 mask 255.255.255.0
network 33.0.2.0 mask 255.255.255.0
network 33.0.3.0 mask 255.255.255.0
exit 
R4:
router bgp 65001
neighbor 34.0.0.3 remote-as 65001
neighbor 34.0.0.3 soft-reconfiguration inbound
address-family ipv4
network 44.0.1.0 mask 255.255.255.0
network 44.0.2.0 mask 255.255.255.0
network 44.0.3.0 mask 255.255.255.0
exit 

Step 2: In the configuration mode of router configure IPv4 OSPF Process by following command:

R1:
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit 
R2:
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit
R3:
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit
R4:
router ospf 1
network 0.0.0.0 0.0.0.0 area 0
exit 

Step 3: Verify IPv4 BGP routes by following command:

R1#show ip bgp
BGP table version is 13, local router ID is 11.0.3.1
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.1.0/24     0.0.0.0       0                      32768      i
*> 11.0.2.0/24     0.0.0.0       0                      32768      i
*> 11.0.3.0/24     0.0.0.0       0                      32768      i
*> 22.0.1.0/24     12.0.0.2      0                      0          65002 i
*> 22.0.2.0/24     12.0.0.2      0                      0          65002 i
*> 22.0.3.0/24     12.0.0.2      0                      0          65002 i
*> 33.0.1.0/24     12.0.0.2                             0          65002 65001 i
*> 33.0.2.0/24     12.0.0.2                             0          65002 65001 i
*> 33.0.3.0/24     12.0.0.2                             0          65002 65001 i
*> 44.0.1.0/24     12.0.0.2                             0          65002 65001 i
*> 44.0.2.0/24     12.0.0.2                             0          65002 65001 i
*> 44.0.3.0/24     12.0.0.2                             0          65002 65001 i
R2#show ip bgp
BGP table version is 13, 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, 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.1.0/24    12.0.0.1      0                      0           100 i
*> 11.0.2.0/24    12.0.0.1      0                      0           100 i
*> 11.0.3.0/24    12.0.0.1      0                      0           100 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
*> 33.0.1.0/24    23.0.0.3      0                      0           65001 i
*> 33.0.2.0/24    23.0.0.3      0                      0           65001 i
*> 33.0.3.0/24    23.0.0.3      0                      0           65001 i
*> 44.0.1.0/24    23.0.0.3                             0           65001 i
*> 44.0.2.0/24    23.0.0.3                             0           65001 i
*> 44.0.3.0/24    23.0.0.3                             0           65001 i
R3#show ip bgp
BGP table version is 13, local router ID is 33.0.3.3
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.1.0/24   23.0.0.2                              0         65002 100 i
*> 11.0.2.0/24   23.0.0.2                              0         65002 100 i
*> 11.0.3.0/24   23.0.0.2                              0         65002 100 i
*> 22.0.1.0/24   23.0.0.2       0                      0         65002 i
*> 22.0.2.0/24   23.0.0.2       0                      0         65002 i
*> 22.0.3.0/24   23.0.0.2       0                      0         65002 i
*> 33.0.1.0/24   0.0.0.0        0                     32768      i
*> 33.0.2.0/24   0.0.0.0        0                     32768      i
*> 33.0.3.0/24   0.0.0.0        0                     32768      i
*>i 44.0.1.0/24  34.0.0.4       0          100         0         i
*>i 44.0.2.0/24  34.0.0.4       0          100         0         i
*>i 44.0.3.0/24  34.0.0.4       0          100         0         i
R4#show ip bgp
BGP table version is 13, 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
*>i 11.0.1.0/24 23.0.0.2 0 100 0 65002 100 i
 *>i 11.0.2.0/24 23.0.0.2 0 100 0 65002 100 i
 *>i 11.0.3.0/24 23.0.0.2 0 100 0 65002 100 i
 *>i 22.0.1.0/24 23.0.0.2 0 100 0 65002 i
 *>i 22.0.2.0/24 23.0.0.2 0 100 0 65002 i
 *>i 22.0.3.0/24 23.0.0.2 0 100 0 65002 i
 *>i 33.0.1.0/24 34.0.0.3 0 100 0 i
 *>i 33.0.2.0/24 34.0.0.3 0 100 0 i
 *>i 33.0.3.0/24 34.0.0.3 0 100 0 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 

Task 2: Configure IPv4 BGP Confederation

Step 1: In the configuration mode of router configure IPv4 BGP confederation by following command:

R1:
router bgp 100
neighbor 12.0.0.2 remote-as 200
exit 
R2:
router bgp 65002
bgp confederation identifier 200
bgp confederation peers 65001
exit
R3:
router bgp 65001
bgp confederation identifier 200
bgp confederation peers 65002
exit
R4:
router bgp 65001
bgp confederation identifier 200
exit 

Step 2: Verify IPv4 BGP routes by following command:

R1#show ip bgp
BGP table version is 13, local router ID is 11.0.3.1
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.1.0/24   0.0.0.0        0                    32768      i
*> 11.0.2.0/24   0.0.0.0        0                    32768      i
*> 11.0.3.0/24   0.0.0.0        0                    32768      i
*> 22.0.1.0/24   12.0.0.2       0                     0        200 i
*> 22.0.2.0/24   12.0.0.2       0                     0        200 i
*> 22.0.3.0/24   12.0.0.2       0                     0        200 i
*> 33.0.1.0/24   12.0.0.2                             0        200 i
*> 33.0.2.0/24   12.0.0.2                             0        200 i
*> 33.0.3.0/24   12.0.0.2                             0        200 i
*> 44.0.1.0/24   12.0.0.2                             0        200 i
*> 44.0.2.0/24   12.0.0.2                             0        200 i
*> 44.0.3.0/24   12.0.0.2                             0        200 i 
R2#show ip bgp
BGP table version is 13, 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, 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.1.0/24    12.0.0.1       0                     0         100 i
*> 11.0.2.0/24    12.0.0.1       0                     0         100 i
*> 11.0.3.0/24    12.0.0.1       0                     0         100 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
*> 33.0.1.0/24    23.0.0.3       0          100        0         (65001) i
*> 33.0.2.0/24    23.0.0.3       0          100        0         (65001) i
*> 33.0.3.0/24    23.0.0.3       0          100        0         (65001) i
*> 44.0.1.0/24    34.0.0.4       0          100        0         (65001) i
*> 44.0.2.0/24    34.0.0.4       0          100        0         (65001) i
*> 44.0.3.0/24    34.0.0.4       0          100        0         (65001) i 
R3#show ip bgp
BGP table version is 25, local router ID is 33.0.3.3
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.1.0/24    12.0.0.1       0            100         0           (65002) 100 i
*> 11.0.2.0/24    12.0.0.1       0            100         0           (65002) 100 i
*> 11.0.3.0/24    12.0.0.1       0            100         0           (65002) 100 i
*> 22.0.1.0/24    23.0.0.2       0            100         0           (65002) i
*> 22.0.2.0/24    23.0.0.2       0            100         0           (65002) i
*> 22.0.3.0/24    23.0.0.2       0            100         0           (65002) i
*> 33.0.1.0/24    0.0.0.0        0                        32768        i
*> 33.0.2.0/24    0.0.0.0        0                        32768        i
*> 33.0.3.0/24    0.0.0.0        0                        32768        i
*>i 44.0.1.0/24   34.0.0.4       0            100         0            i
*>i 44.0.2.0/24   34.0.0.4       0            100         0            i
*>i 44.0.3.0/24   34.0.0.4       0            100         0            i 
R4#show ip bgp
BGP table version is 25, 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
*>i 11.0.1.0/24    12.0.0.1          0            100          0        (65002) 100 i
*>i 11.0.2.0/24    12.0.0.1          0            100          0        (65002) 100 i
*>i 11.0.3.0/24    12.0.0.1          0            100          0        (65002) 100 i
*>i 22.0.1.0/24    23.0.0.2          0            100          0        (65002) i
*>i 22.0.2.0/24    23.0.0.2          0            100          0        (65002) i
*>i 22.0.3.0/24    23.0.0.2          0            100          0        (65002) i
*>i 33.0.1.0/24    34.0.0.3          0            100          0          i
*>i 33.0.2.0/24    34.0.0.3          0            100          0          i
*>i 33.0.3.0/24    34.0.0.3          0            100          0          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

Task 3: Verify BGP Path Selection in BGP confederation

Step 1: In the configuration mode of router configure redundant path by following command:

R1:
interface ethernet 0/0
ip address 14.0.0.1 255.255.255.0
no shutdown
exit 

router bgp 100
neighbor 14.0.0.4 remote-as 200
neighbor 14.0.0.4 soft-reconfiguration inbound
exit
R4:
interface ethernet 0/0
ip address 14.0.0.4 255.255.255.0
no shutdown
exit

router bgp 65001
neighbor 14.0.0.1 remote-as 100
neighbor 14.0.0.1 soft-reconfiguration inbound
exit 

Step 2: Verify IPv4 BGP routes by following command:

R1#show ip bgp
BGP table version is 37, local router ID is 11.0.3.1
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.1.0/24     0.0.0.0            0                      32768        i
*> 11.0.2.0/24     0.0.0.0            0                      32768        i
*> 11.0.3.0/24     0.0.0.0            0                      32768        i
 * 22.0.1.0/24     14.0.0.4                                   0          200 i
*>                 12.0.0.2           0                       0          200 i
 * 22.0.2.0/24     14.0.0.4                                   0          200 i
*>                 12.0.0.2           0                       0          200 i
 * 22.0.3.0/24     14.0.0.4                                   0          200 i
*>                 12.0.0.2           0                       0          200 i
 * 33.0.1.0/24     14.0.0.4                                   0          200 i
*>                 12.0.0.2                                   0          200 i
 * 33.0.2.0/24     14.0.0.4                                   0          200 i
*>                 12.0.0.2                                   0          200 i
 * 33.0.3.0/24     14.0.0.4                                   0          200 i
*>                 12.0.0.2                                   0          200 i
 * 44.0.1.0/24     14.0.0.4           0                       0          200 i
*>                 12.0.0.2                                   0          200 i
 * 44.0.2.0/24     14.0.0.4           0                       0          200 i
*>                 12.0.0.2                                   0          200 i
 * 44.0.3.0/24     14.0.0.4           0                       0          200 i
*>                 12.0.0.2                                   0          200 i 

R1 is choosing 12.0.0.2 via R2 as best path instead of 14.0.0.4 to R4, R1 is choosing longest path as best path instead of choosing shortest path.

R1#traceroute 44.0.3.0
Type escape sequence to abort.
Tracing the route to 44.0.3.0
VRF info: (vrf in name/id, vrf out name/id)
1 12.0.0.2 8 msec 8 msec 9 msec
2 23.0.0.3 8 msec 9 msec 8 msec