VRRP Configuration Example On Cisco Router [Gns3 Lab]
VRRP (Virtual Router Redundancy Protocol) Configuration
First, we will configure the gateway of the network 172.16.1.0/24 on R1 and R2 with the following IP addresses:
- On Router R1: 172.16.1.252/24
- On Router R2: 172.16.1.253/24
Later, we define a VRRP (Virtual Router Redundancy Protocol) VIP: 172.16.1.254 with:
- Router R1 as the Master Router.
- Router R2 as the Backup Router.
conf t hostname R1 interface Ethernet0/0 ip address 172.16.1.252 255.255.255.0 half-duplex vrrp 10 ip 172.16.1.254 vrrp 10 priority 150
conf t hostname R2 interface Ethernet0/0 ip address 172.16.1.253 255.255.255.0 half-duplex vrrp 10 ip 172.16.1.254
The Default VRRP priority is 100, so R1 with Priority 150 and R2 with default priority 100.
As a result, R1 will claim the VRRP Master Role:
- Verification on Router R1:
R1#show vrrp brief Interface Grp Pri Time Own Pre State Master addr Group addr Et0/0 10 150 3414 Y Master 172.16.1.252 172.16.1.254 R1#show vrrp Ethernet0/0 - Group 10 State is Master Virtual IP address is 172.16.1.254 Virtual MAC address is 0000.5e00.010a Advertisement interval is 1.000 sec Preemption enabled Priority is 150 Master Router is 172.16.1.252 (local), priority is 150 Master Advertisement interval is 1.000 sec Master Down interval is 3.414 sec
- Verification on Router R2:
R2#show vrrp brief Interface Grp Pri Time Own Pre State Master addr Group addr Et0/0 10 100 3609 Y Backup 172.16.1.252 172.16.1.254 R2#show vrrp Ethernet0/0 - Group 10 State is Backup Virtual IP address is 172.16.1.254 Virtual MAC address is 0000.5e00.010a Advertisement interval is 1.000 sec Preemption enabled Priority is 100 Master Router is 172.16.1.252, priority is 150 Master Advertisement interval is 1.000 sec Master Down interval is 3.609 sec (expires in 3.145 sec)
VRRP Wireshark Capture Analysis
VRRP Annoucement packet:
For the Master Backup role election, VRRP Routers on the segment will listen for VRRP announcement packets sent to VRRP Multicast Address 220.127.116.11.
VRRP Packet Flow from PC:
When a ping is started from the PC to VRRP gateway 172.16.1.254 (VIP):
- First of All, an ARP request packet is sent to both R1 and R2.
- Only the Master will respond to this ARP request and associate the VIP with the VRRP MAC address in the ARP reply.
Note: the VRRP MAC of the Groupe is 0000.5e00.010a and it’s only active on the VRRP Master (R1 in our case)
ARP request Wireshark capture on Router R1 interface:
We also can see the ARP request received on R2 Interface:
But the ARP reply is sent only from Router R1 (VRRP Master):
Echo Request to the VRRP IP address:
Note: We can see that the PC device has arp associating the IP 172.16.1.254 to the VRRP MAC 0000.5e00.010a and the Master VRRP will listen (active) to this MAC.