Implementing BGP confederation on Huawei routers.
- September 1, 2024
- Posted by: James Majani
- Categories: Huawei, Networking
Based on the idea that an autonomous system (AS) can be split into multiple, more manageable sub-autonomous systems (sub-ASs), each of which has its own AS number, BGP confederation enables you to apply a scalable approach when it comes to BGP deployment and controlling your large autonomous system. Implementing BGP confederation significantly reduces the total number of BGP connections within an autonomous system, that is, the number of iBGP peering sessions per router within that autonomous system. Large number of iBGP sessions might consume a significant amount of bandwidth, as well as cause high CPU utilization, and can therefore negatively affect the performance of the overall network.
An eBGP connection between sub-ASs also serves as kind of a loop-avoidance mechanism, AS path list that is exchanged between eBGP peers within confederation is used to detect if routing update leaving one sub-AS returns to that same sub-AS. If it sees its own sub-AS number in AS path list, sub-AS will not accept that routing update.
Even when divided into several sub-ASs, your network confederation is identified by AS Confederation Identifier and appears as a single AS to the outside world, that is, to BGP peers external to the confederation.
Networking Description.
The enterprise requires reduced number of BGP connections so as to save on device resource usage in the internal low end routers. In this environment, BGP confederation is configured in AS 65535 to in order to reduce the number of BGP connections within an AS..
Step 1: Basic configurations.
*******************************************RZ
system-view
sysname RZ
#
interface GigabitEthernet0/0/0
ip address 11.1.2.0 255.255.255.254
#
interface LoopBack1
ip address 192.168.2.1 255.255.255.0
#
interface LoopBack2
ip address 192.168.22.1 255.255.255.0
*******************************************R1
system-view
sysname R1
#
interface GigabitEthernet0/0/0
description ***TO_RZ***
ip address 11.1.2.1 255.255.255.254
#
interface GigabitEthernet0/0/1
description ***TO_R2***
ip address 10.1.0.1 255.255.255.252
#
interface GigabitEthernet0/0/2
description ***TO_R3***
ip address 10.1.0.5 255.255.255.252
#
interface GigabitEthernet0/0/3
description ***TO_R4***
ip address 10.1.0.9 255.255.255.252
#
interface Ethernet0/0/0
description ***TO_R5***
ip address 10.1.0.13 255.255.255.252
#
interface LoopBack0
ip address 1.1.1.1 32
#
interface LoopBack1
ip address 172.16.1.1 24
*******************************************R2
system-view
sysname R2
#
interface GigabitEthernet0/0/0
description ***TO_R3***
ip address 10.2.0.2 255.255.255.254
#
interface GigabitEthernet0/0/1
description ***TO_R1***
ip address 10.1.0.2 255.255.255.252
#
interface LoopBack0
ip address 1.1.1.1 32
#
interface LoopBack1
ip address 172.16.2.2 24
*******************************************R3
system-view
sysname R3
#
interface GigabitEthernet0/0/0
description ***TO_R2***
ip address 10.2.0.3 255.255.255.254
#
interface GigabitEthernet0/0/2
description ***TO_R1***
ip address 10.1.0.6 255.255.255.252
#
interface LoopBack0
ip address 3.3.3.3 32
#
interface LoopBack1
ip address 172.16.3.3 24
*******************************************R4
system-view
sysname R4
#
interface GigabitEthernet0/0/3
description ***TO_R1***
ip address 10.1.0.10 255.255.255.252
#
interface LoopBack0
ip address 4.4.4.4 32
#
interface LoopBack1
ip address 172.16.4.4 24
*******************************************R5
system-view
sysname R5
#
interface Ethernet0/0/0
description ***TO_R1***
ip address 10.1.0.14 255.255.255.252
#
interface LoopBack0
ip address 5.5.5.5 32
#
interface LoopBack1
ip address 172.16.5.5 24
Step 2: Configure BGP.
*******************************************RZ
system-view
bgp 64512
peer 11.1.2.1 as-number 65535
#
ipv4-family unicast
undo synchronization
network 192.168.2.0
network 192.168.22.0
peer 10.1.2.1 enable
*******************************************R1
system-view
bgp 100
router-id 1.1.1.1
confederation id 65535
confederation peer-as 400 500
peer 10.1.0.2 as-number 100
peer 10.1.0.6 as-number 100
peer 10.1.0.10 as-number 400
peer 10.1.0.14 as-number 500
peer 11.1.2.0 as-number 64512
#
ipv4-family unicast
undo synchronization
network 10.1.0.0 255.255.255.252
network 10.1.0.4 255.255.255.252
network 10.1.0.8 255.255.255.252
network 10.1.0.12 255.255.255.252
network 172.16.1.0 255.255.255.0
peer 10.1.0.2 enable
peer 10.1.0.2 next-hop-local
peer 10.1.0.6 enable
peer 10.1.0.6 next-hop-local
peer 10.1.0.10 enable
peer 10.1.0.10 next-hop-local
peer 10.1.0.14 enable
peer 10.1.0.14 next-hop-local
peer 11.1.2.0 enable
*******************************************R2
system-view
bgp 100
router-id 2.2.2.2
peer 10.1.0.1 as-number 100
peer 10.2.0.3 as-number 100
#
ipv4-family unicast
undo synchronization
network 10.1.0.0 255.255.255.252
network 172.16.2.0 255.255.255.0
peer 10.1.0.1 enable
peer 10.2.0.3 enable
*******************************************R3
system-view
#
bgp 100
router-id 3.3.3.3
peer 10.1.0.5 as-number 100
peer 10.2.0.2 as-number 100
#
ipv4-family unicast
undo synchronization
network 10.1.0.4 255.255.255.252
network 172.16.3.0 255.255.255.0
peer 10.1.0.5 enable
peer 10.2.0.2 enable
*******************************************R4
system-view
bgp 400
router-id 4.4.4.4
confederation id 65535
confederation peer-as 100 500
peer 10.1.0.9 as-number 100
#
ipv4-family unicast
undo synchronization
network 10.1.0.8 255.255.255.252
network 172.16.4.0 255.255.255.0
peer 10.1.0.9 enable
*******************************************R5
system-view
bgp 500
router-id 5.5.5.5
confederation id 65535
confederation peer-as 100 400
peer 10.1.0.13 as-number 100
#
ipv4-family unicast
undo synchronization
network 10.1.0.12 255.255.255.252
network 172.16.5.0 255.255.255.0
peer 10.1.0.13 enable
When advertising a route learnt from an EBGP peer, the next hop attribute doesn’t change. On R1 configure “next hop local” for neighbors in the same AS to achieve reachability.
Step 3: Results confirmation.