Virtual Router Redundancy Protocol (VRRP) Basic Configuration on Huawei Routers

Virtual Router Redundancy Protocol (VRRP) Basic Configuration on Huawei Routers

VRRP is a fault-tolerant protocol that groups several physical routing devices into a virtual one. The virtual devices switch traffic from the master device to the backup devices when there is a failure, thereby ensuring service continuity and reliability. The master device is selected based on VRRP priority, the device with a higher priority is selected as the master.

Lab Topology

Configure system names and IP Addresses on GW1, GW2, and IGW routers

*********************************GW01
sys
sysname GW01
#
interface GigabitEthernet0/0/0
 ip address 20.20.20.1 255.255.255.0

#
interface GigabitEthernet0/0/1
 ip address 10.10.10.1 255.255.255.254
#
commit
**********************************GW02
sys
sysname GW02
#
interface GigabitEthernet0/0/0
 ip address 20.20.20.2 255.255.255.0

#
interface GigabitEthernet0/0/1
 ip address 10.10.10.3 255.255.255.254
#
commit
**********************************IGW
sys
sysname IGW
#
interface GigabitEthernet0/0/0
 ip address 10.10.10.0 255.255.255.254
#
interface GigabitEthernet0/0/1
 ip address 10.10.10.2 255.255.255.254
#
interface GigabitEthernet0/0/2
 ip address 172.200.200.0 255.255.255.254
#
commit
***********************************Internet
sys
sysname Internet
#
#
interface GigabitEthernet0/0/0
 ip address 172.200.200.1 255.255.255.254
#
commit

Configure OSPF process 10 on GW01, GW02, and the Internet routers and advertise the required networks.

*********************************GW01
ospf 10
 area 0.0.0.0
  network 10.10.10.0 0.0.0.1
  network 20.20.20.0 0.0.0.255
#
commit
*********************************GW02
#
ospf 10
 area 0.0.0.0
  network 20.20.20.0 0.0.0.255
  network 10.10.10.2 0.0.0.1
#
*******************************IGW
ospf 10
 area 0.0.0.0
  network 10.10.10.0 0.0.0.1
  network 10.10.10.2 0.0.0.1
  network 172.200.200.0 0.0.0.1
#
commit

Verify OSPF adjacency status on GW01, GW02, and IGW. Ensure you are learning the routes. As shown below, the peering status is UP and routes are learned through OSPF on all the routers.

Configure VRRP on GW01 and GW02. We configure a higher priority on GW01 to make it the master, GW02 acts as the backup router. We enable preempt on GW01 so that GW01 becomes the master when it recovers from failure.

************************************GW01
interface GigabitEthernet0/0/0

 vrrp vrid 10 virtual-ip 20.20.20.254
 vrrp vrid 10 priority 120
 vrrp vrid 10 preempt-mode timer delay 20
#
commit
**********************************GW02
interface GigabitEthernet0/0/0

 vrrp vrid 10 virtual-ip 20.20.20.254
#
commit

Configure CE device and assign IP of 20.20.20.100/24 to the PC, set the default Gateway to the VRRP Virtual IP.

********************************CE
sys
sysname CE
#
vlan 10
#
interface GigabitEthernet0/0/0
 portswitch
 port link-type access
 port default vlan 10
#
interface GigabitEthernet0/0/1
 portswitch
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/0
 portswitch
 port link-type access
 port default vlan 10
#
commit

Verify VRRP status on GW01 and GW02.

You can check more details about VRRP status as shown below using the command ” display vrrp 10″

We can ping the Internet IP and the trace from PC show the traffic goes through GW01

Simulate Primary link failure and check VRRP status on GW01 and GW02.

When we shut down GE/0/0/0 on GW01, GW02 waits VRRP timer to expire and becomes the master as shown.

The PC can reach the internet Via GW02

Please leave your comments in our comment section.

Related Posts



Leave a Reply

This website uses cookies and asks your personal data to enhance your browsing experience.