Association between VRRP and STP Implementation on Huawei routers.
- January 19, 2025
- Posted by: James Majani
- Categories: Huawei, Networking
VRRP basic concepts.
VRRP groups several routers into a virtual router. If one of routers fails, traffic can be switched to another router, ensuring service continuity and reliability.
In the scenario where multiple virtual routers (VRRP groups) are created and each physical router plays different roles in different VRRP groups, the virtual IP addresses of different virtual routers function as different intranet gateway addresses to implement load balancing.
MST maps one or more VLANs to an MSTI. Multiple VLANs share a spanning tree, and MSTP implements load balancing.
The VRRP-enabled gateway can be automatically switched based on network topology changes, improving network reliability.
VRRP + MSTP can implement load balancing while ensuring network redundancy.
Networking description.
An enterprise LAN has two egress Core switches . Users are connected to access switches and access switches aggregate to the Aggregation/Distribution switch which has uplinks to the Core. Gateway of LAN services is on the Core switches. VRRP is implemented to enhance gateway reliability, multiple gateways are deployed to prevent a single point of failure. VRRP + MSTP can implement load balancing for OA and R&D traffic while ensuring network redundancy.
Step 1: Configure the Access switches.
*******************************************R&D-ACC-01
system-view
sysname R&D-ACC-01
#
vlan batch 10
#
interface Ethernet0/0/1
port link-type access
port default vlan 10
#
interface Ethernet0/0/2
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
*******************************************OA-ACC-01
system-view
sysname OA-ACC-01
#
vlan batch 20
#
interface Ethernet0/0/1
port link-type access
port default vlan 20
#
interface Ethernet0/0/2
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20
Step 2: Configure the Aggregation and Core switch.
*******************************************AGG-01
system-view
sysname AGG-01
#
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10
#
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 20
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
#
interface GigabitEthernet0/0/4
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
*******************************************CORE-01
system-view
sysname CORE-01
#
vlan batch 10 20
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
*******************************************CORE-02
sysname CORE-01
#
vlan batch 10 20
#
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 20
Step 3: Configure MSTP Load Balancing.
*******************************************CORE-01
system-view
stp region-configuration
region-name RG-01
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
#
stp instance 1 root primary
stp instance 2 root secondary
*******************************************CORE-02
system-view
stp region-configuration
region-name RG-01
instance 1 vlan 10
instance 2 vlan 20
active region-configuration
#
stp instance 1 root secondary
stp instance 2 root primary
Step 4: Configure VRRP Load Balancing in association with MSTP Load Balancing.
*******************************************CORE-01
system-view
#
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.10.3
vrrp vrid 1 priority 150
vrrp vrid 1 preempt-mode timer delay 10
#
interface Vlanif20
ip address 192.168.20.1 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.3
*******************************************CORE-02
system-view
#
interface Vlanif10
ip address 192.168.10.2 255.255.255.0
vrrp vrid 1 virtual-ip 192.168.10.3
#
interface Vlanif20
ip address 192.168.20.2 255.255.255.0
vrrp vrid 2 virtual-ip 192.168.20.3
vrrp vrid 2 priority 150
vrrp vrid 2 preempt-mode timer delay 10
Step 5: Configure DHCP service on the GWs.
*******************************************CORE-01
system-view
#
dhcp enable
#
#
ip pool oa
gateway-list 192.168.20.3
network 192.168.20.0 mask 255.255.255.0
excluded-ip-address 192.168.20.1 192.168.20.2
#
ip pool rd
gateway-list 192.168.10.3
network 192.168.10.0 mask 255.255.255.0
excluded-ip-address 192.168.10.1 192.168.10.2
#
interface Vlanif10
dhcp select global
#
interface Vlanif20
dhcp select global
*******************************************CORE-02
system-view
#
dhcp enable
#
#
ip pool oa
gateway-list 192.168.20.3
network 192.168.20.0 mask 255.255.255.0
excluded-ip-address 192.168.20.1 192.168.20.2
#
ip pool rd
gateway-list 192.168.10.3
network 192.168.10.0 mask 255.255.255.0
excluded-ip-address 192.168.10.1 192.168.10.2
#
interface Vlanif10
dhcp select global
#
interface Vlanif20
dhcp select global
Step6: Result confirmation.
Traffic from R&D is forwarded through CORE-01 while traffic from OA is forwarded through CORE-02 after correctly associating MSTP and VRRP load balancing implementing GW redundancy and traffic load balancing.