Configuring VRRP on Huawei Routers

1. Overview

 

Virtual Router Redundancy Protocol (VRRP) is the open standard version of Cisco proprietary protocol called HSRP, so it can support products from different vendors including Huawei devices. The VRRP protocol works exactly the same as HSRP in providing a gateway using one virtual IP address. One of the routers will work as the active gateway, and in case the active router becomes unreachable, other routers will become active gateway instead.

In this article will show you how to configure VRRP active/standby on two Huawei routers to achieve gateway high availability purpose.

2. Prerequisites

 

In this article, it is supposed that:

a. You have two Huawei routers hardware in place.
b. You have a direct console access to both Huawei routers to performs the VRRP configuration.

3. Network Diagram

 

We will set up the VRRP on two Huawei routers using the following diagram. The virtual IP, 10.0.0.3, which is the gateway for network 10.0.0.0/24 is active on R1 and in case that R1 fails for some reason, R2 will becomes the active gateway automatically without any downtime.

Configuring VRRP on Huawei Routers

4. Configure R1

 

The following are the commands to be executed on R1.

] int g0/0/0
      ip address 10.0.0.1 24
      vrrp vrid 10 virtual-ip 10.0.0.3
      vrrp vrid 10 priority 120
      vrrp vrid 10 preempt-mode timer delay 20

The command vrrp vrid 10 virtual-ip 10.1.1.111 will adds R1 to VRRP group number 10 using IP address of 10.0.0.3 as the the virtual IP.


The command vrrp vrid 10 priority 120 will set the priority number on R1 to 120. If we do not specify a priority the default priority number is 100. The router with a higher priority number will become the active router. For our case now, we want R1 the active gateway router.

The command vrrp vrid 10 preempt-mode timer delay 20 ensuring that R1 will take back the active gateway role from R2 when it comes back alive after an event that triggers VRRP failover.

5. Configure R2

 

The following are the commands to be executed on R2.

] int g0/0/0
      ip address 10.0.0.2 24
      vrrp vrid 10 virtual-ip 10.0.0.3
      vrrp vrid 10 priority 90

On R2 we set the priority number to 90 which is lower then priority number that we set on R1, so R2 is the standby gateway.

6. Verify the Configuration

 

We can use the following command to verify VRRP configuration and below the out put on R1.

] dis vrrp
 GigabitEthernet0/0/0 | Virtual Router 10
 State : Master
 Virtual IP : 10.0.0.3
 Master IP : 10.0.0.1
 PriorityRun : 120
 PriorityConfig : 120
 MasterPriority : 120
 Preempt : YES Delay Time : 20 s
 TimerRun : 1 s
 TimerConfig : 1 s
 Auth type : NONE
 Virtual MAC : 0000-5e00-010a
 Check TTL : YES
 Config type : normal-vrrp
 Backup-forward : disabled
 Create time : 2018-06-10 22:24:29 UTC-08:00
 Last change time : 2018-06-10 22:26:50 UTC-08:00

And below the out put on R2.

] dis vrrp
 GigabitEthernet0/0/0 | Virtual Router 10
 State : Backup
 Virtual IP : 10.0.0.3
 Master IP : 10.0.0.1
 PriorityRun : 90
 PriorityConfig : 90
 MasterPriority : 120
 Preempt : YES Delay Time : 0 s
 TimerRun : 1 s
 TimerConfig : 1 s
 Auth type : NONE
 Virtual MAC : 0000-5e00-010a
 Check TTL : YES
 Config type : normal-vrrp
 Backup-forward : disabled
 Create time : 2018-06-10 22:25:26 UTC-08:00
 Last change time : 2018-06-10 22:27:18 UTC-08:00

We can test ping from computer client to the virtual IP of the VRRP group number 10 and we should get a successful result as the following.

PC>ping 10.0.0.3

Ping 10.0.0.3: 32 data bytes, Press Ctrl_C to break
From 10.0.0.3: bytes=32 seq=1 ttl=255 time=125 ms
From 10.0.0.3: bytes=32 seq=2 ttl=255 time=31 ms
From 10.0.0.3: bytes=32 seq=3 ttl=255 time=47 ms
From 10.0.0.3: bytes=32 seq=4 ttl=255 time=31 ms
From 10.0.0.3: bytes=32 seq=5 ttl=255 time=47 ms

--- 10.0.0.3 ping statistics ---
 5 packet(s) transmitted
 5 packet(s) received
 0.00% packet loss
 round-trip min/avg/max = 31/56/125 ms

7. Conclusion

 

Now you should be able configure VRRP on Huawei routers. I hope that you can find this instruction informative. If you have any questions or suggestions you can always leave your comments below. I will try all of my best to review and reply them.

Comments

comments