Implementation of BGP Peer Groups on Huawei Routers
- March 22, 2024
- Posted by: Lyfey Technologies
- Categories: Huawei, Networking
A BGP peer group is a set of BGP peers with the same policies, the peer inherits all the configurations of the group when it is added to the peer group. In a large network where there are many BGP peers with the same policies, you need to run some commands repeatedly for each peer increasing the maintenance workload and possibility of configuration errors.
BGP peer groups can be used to combine the configuration of BGP neighbors using a template, common commands are applied to the group once and apply to all peers in the group. A BGP peer group reduces the load on system resources by allowing the routing table to be checked only once, and updates to be replicated to all peer group members instead of being done individually for each peer in the peer group.
In our HoVPN solution, we apply route import and export policies on BGP groups which simplifies the configuration. Check it out from this link: IPRAN HoVPN Configuration on Huawei
Topology Description
R1, R2, R3, and R4 are in AS 200 and we configure OSPF as the IGP. R5 is configured in AS 300. We configure a group ” INTERNAL” for iBGP peering on R1, R2 R3, and R4 with R4 as the RR. A group “EXTERNAL” is configured on R4 and R5 for EBGP peering. IP addresses of interfaces are assigned as shown in the topology above.
Configuration Steps
Step 1: Configure IP addresses on all the routers.
***********************************R1
interface GigabitEthernet0/0/0
ip address 10.10.10.1 255.255.255.254
#
interface GigabitEthernet0/0/1
ip address 10.10.10.4 255.255.255.254
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
*****************************R2
interface GigabitEthernet0/0/0
ip address 10.10.10.7 255.255.255.254
#
interface GigabitEthernet0/0/1
ip address 10.10.10.5 255.255.255.254
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
********************************R3
interface GigabitEthernet0/0/0
ip address 10.10.10.6 255.255.255.254
#
interface GigabitEthernet0/0/1
ip address 10.10.10.3 255.255.255.254
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
******************************R4
interface GigabitEthernet0/0/0
ip address 10.10.10.2 255.255.255.254
#
interface GigabitEthernet0/0/1
ip address 10.10.10.0 255.255.255.254
#
interface GigabitEthernet0/0/2
ip address 172.200.200.0 255.255.255.254
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.255
#
*****************************R5
interface GigabitEthernet0/0/1
ip address 172.200.200.1 255.255.255.254
#
interface LoopBack0
ip address 7.7.7.7 255.255.255.255
#
Step 2: Configure OSPF in AS 200 and verify adjacency status on routers in AS 200.
*******************************R1
ospf 10 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.10.10.0 0.0.0.1
network 10.10.10.4 0.0.0.1
#
*****************************R2
ospf 10 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.10.10.6 0.0.0.1
network 10.10.10.4 0.0.0.1
#
*****************************R3
ospf 10 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.10.10.2 0.0.0.1
network 10.10.10.6 0.0.0.1
#
****************************R4
ospf 10 router-id 6.6.6.6
area 0.0.0.0
network 6.6.6.6 0.0.0.0
network 10.10.10.0 0.0.0.1
network 10.10.10.2 0.0.0.1
#
Step 3: Configure BGP peering on all the routers. We configure a group for iBGP for peering among R1, R2, R3, and R4 and another group for eBGP for peering between R4 and R5.
***********************************R1
bgp 200
router-id 1.1.1.1
group INTERNAL internal
peer INTERNAL connect-interface LoopBack0
peer 6.6.6.6 as-number 200
peer 6.6.6.6 group INTERNAL
#
ipv4-family unicast
undo synchronization
peer INTERNAL enable
peer 6.6.6.6 enable
peer 6.6.6.6 group INTERNAL
#
**************************************R2
bgp 200
router-id 2.2.2.2
group INTERNAL internal
peer INTERNAL connect-interface LoopBack0
peer 6.6.6.6 as-number 200
peer 6.6.6.6 group INTERNAL
#
ipv4-family unicast
undo synchronization
peer INTERNAL enable
peer 6.6.6.6 enable
peer 6.6.6.6 group INTERNAL
#
************************************R3
bgp 200
router-id 3.3.3.3
group INTERNAL internal
peer INTERNAL connect-interface LoopBack0
peer 6.6.6.6 as-number 200
peer 6.6.6.6 group INTERNAL
#
ipv4-family unicast
undo synchronization
peer INTERNAL enable
peer 6.6.6.6 enable
peer 6.6.6.6 group INTERNAL
#
****************************R4
bgp 200
router-id 6.6.6.6
group EXTERNAL external
peer 172.200.200.1 as-number 300
peer 172.200.200.1 group EXTERNAL
group INTERNAL internal
peer INTERNAL connect-interface LoopBack0
peer 1.1.1.1 as-number 200
peer 1.1.1.1 group INTERNAL
peer 2.2.2.2 as-number 200
peer 2.2.2.2 group INTERNAL
peer 3.3.3.3 as-number 200
peer 3.3.3.3 group INTERNAL
#
ipv4-family unicast
undo synchronization
peer EXTERNAL enable
peer 172.200.200.1 enable
peer 172.200.200.1 group EXTERNAL
peer INTERNAL enable
peer INTERNAL reflect-client
peer INTERNAL next-hop-local
peer 1.1.1.1 enable
peer 1.1.1.1 group INTERNAL
peer 2.2.2.2 enable
peer 2.2.2.2 group INTERNAL
peer 3.3.3.3 enable
peer 3.3.3.3 group INTERNAL
#
*****************************R5
bgp 300
router-id 7.7.7.7
group EXTERNAL external
peer 172.200.200.0 as-number 200
peer 172.200.200.0 group EXTERNAL
#
ipv4-family unicast
undo synchronization
peer EXTERNAL enable
peer 172.200.200.0 enable
peer 172.200.200.0 group EXTERNAL
#
Step 4: Verify BGP peering status.
[…] Check out similar implementations on Huawei routers from this link: Implementation of BGP Peer Groups on Huawei Routers […]