Lab Objective
Configure VRRP on two routers sharing a virtual IP address, verify Master and Backup roles form correctly, and confirm automatic failover occurs when the Master router fails.
Lab Purpose
VRRP serves the same purpose as HSRP, covered in an earlier lab, but as a vendor-neutral open standard, making it the correct choice whenever a redundancy group needs to include non-Cisco equipment. This lab highlights the terminology differences engineers must recognize when moving between the two protocols.
Lab Topology
R1 (intended Master) ---- Gi0/1 ---- Switch1
R2 (intended Backup) ---- Gi0/1 ---- Switch1
R1: 192.168.17.1/24 (this address will
also serve as the virtual IP)
R2: 192.168.17.3/24
PC: 192.168.17.10/24, gateway 192.168.17.1Task 1: Configure Basic Addressing
Configure both routers' interfaces on the shared segment.
Task 2: Configure VRRP on Both Routers
Configure VRRP group 1 on both routers, using R1's own real interface address (192.168.17.1) directly as the virtual IP.
Task 3: Set Priority on R1
Set R1's VRRP priority higher than the default so it becomes Master.
Task 4: Verify Master and Backup Roles
Confirm R1 shows as Master and R2 as Backup.
Task 5: Simulate a Failure and Verify Failover
Shut down R1's interface and confirm R2 automatically becomes Master.
Solution and Verification
R1(config)# interface gigabitethernet0/1
R1(config-if)# ip address 192.168.17.1 255.255.255.0
R1(config-if)# no shutdownR2(config)# interface gigabitethernet0/1
R2(config-if)# ip address 192.168.17.3 255.255.255.0
R2(config-if)# no shutdownR1(config)# interface gigabitethernet0/1
R1(config-if)# vrrp 1 ip 192.168.17.1
R1(config-if)# vrrp 1 priority 150
-- Notice the virtual IP matches R1's own
-- real interface address exactly -- a
-- capability unique to VRRP, distinct from
-- HSRP which always requires a separate
-- dedicated virtual addressR2(config)# interface gigabitethernet0/1
R2(config-if)# vrrp 1 ip 192.168.17.1R1# show vrrp brief
Interface Grp Pri Time Own Pre State Master addr Group addr
Gi0/1 1 150 3609 Y Y Master 192.168.17.1 192.168.17.1
-- The "Own" column shows "Y", confirming R1
-- owns the actual IP address being used as
-- the virtual address
R2# show vrrp brief
Interface Grp Pri Time Own Pre State Master addr Group addr
Gi0/1 1 100 3609 N Y Backup 192.168.17.1 192.168.17.1R1(config)# interface gigabitethernet0/1
R1(config-if)# shutdown
R2# show vrrp brief
Interface Grp Pri Time Own Pre State Master addr Group addr
Gi0/1 1 100 3609 N Y Master 192.168.17.3 192.168.17.1
-- R2 automatically became MasterKey Takeaway
VRRP uses "Master" and "Backup" instead of HSRP's "Active" and "Standby" terminology, and its preempt behavior is enabled by default (unlike HSRP, which requires the preempt keyword to be explicitly configured) — both are worth remembering when moving between protocols, since assuming identical default behavior between HSRP and VRRP is a common source of unexpected configuration results.