Virtual Router Redundancy Protocol (VRRP) is the open standard version of Cisco proprietary protocol called HSRP, so it can support products from different vendors. VRRP 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 on two Cisco routers.
In this article, it is supposed that:
a. You have two Cisco routers hardware.
b. You have a direct console access to both Cisco routers
3. Network Diagram
We will set up the VRRP on two Cisco 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.
4. Configure R1
The following are the commands to be executed on R1.
# conf t # int f0/0 no sh ip add 10.0.0.1 255.255.255.0 vrrp 10 ip 10.0.0.3 vrrp 10 preempt vrrp 10 priority 110
The command vrrp 10 ip 10.0.0.3 add R1 to VRRP group number 10 using IP address of 10.0.0.3 as the the virtual IP.
The command vrrp 10 priority 110 will set the priority number on R1 to 110. 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 10 preempt 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 f0/0 no sh ip add 10.0.0.2 255.255.255.0 vrrp 10 ip 10.0.0.3 vrrp 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.
# sh vrrp brief Interface Grp Pri Time Own Pre State Master addr Group addr Fa0/0 10 110 3570 Y Master 10.0.0.1 10.0.0.3
And below the out put on R2.
# sh vrrp brief Interface Grp Pri Time Own Pre State Master addr Group addr Fa0/0 10 90 3648 Y Backup 10.0.0.1 10.0.0.3
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.
C:\Users\techspacekh>ping 10.0.0.3 Pinging 10.0.0.3 with 32 bytes of data: Reply from 10.0.0.3: bytes=32 time=4ms TTL=64 Reply from 10.0.0.3: bytes=32 time=3ms TTL=64 Reply from 10.0.0.3: bytes=32 time=4ms TTL=64 Reply from 10.0.0.3: bytes=32 time=10ms TTL=64 Ping statistics for 10.0.0.3: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 3ms, Maximum = 10ms, Average = 5ms
Now you should be able configure VRRP on Cisco router. 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.