The situation
VLAN 20 (192.168.20.0/24) has two routers to the internet. Users must keep working if either router or either uplink fails. R1 has the faster uplink, so it should forward whenever it can. Both routers are addressed (R1 .2, R2 .3); HSRP isn't configured yet.
Task 1: plan it
Choose the virtual IP, the group, the version, the priorities and which routers need preempt. Then work out the virtual MAC for HSRPv2 group 20 before opening the answer.
Show the plan
| Setting | Value | Why |
|---|---|---|
| Virtual IP | 192.168.20.1 | An unused address in the subnet; it becomes every host's gateway. |
| Group, version | 20, HSRPv2 | Matching the VLAN number makes the group easy to recognise. Both routers must use the same. |
| Virtual MAC | 0000.0c9f.f014 | HSRPv2 is 0000.0c9f.fXXX with the group in hex: 20 = 0x014. |
| Priorities | R1 110, R2 100 (default) | The higher priority becomes active. |
| Preempt | On both | R1 takes the role back after it recovers; R2 can take over when tracking lowers R1's priority. |
| Tracking | R1 tracks Gi0/1, decrement 20 | If R1's uplink fails, 110 − 20 = 90, below R2's 100. |
Task 2: configure both routers
Show the configuration
track 1 interface GigabitEthernet0/1 line-protocol
!
interface GigabitEthernet0/0
ip address 192.168.20.2 255.255.255.0
standby version 2
standby 20 ip 192.168.20.1
standby 20 priority 110
standby 20 preempt
standby 20 track 1 decrement 20R1: active while its uplink is up.
interface GigabitEthernet0/0
ip address 192.168.20.3 255.255.255.0
standby version 2
standby 20 ip 192.168.20.1
standby 20 preemptR2: standby, default priority 100, with preempt so it can take over when R1's priority drops.
DHCP for VLAN 20 hands out default-router 192.168.20.1, the virtual IP, not .2 or .3.
Task 3: verify
R2#show standby brief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Gi0/0 20 100 P Standby 192.168.20.2 local 192.168.20.1
.2) is active, this router is standby, both share 192.168.20.1.What would R1's line show?
Gi0/0 20 110 P Active local 192.168.20.3 192.168.20.1: priority 110, Active, "local" in the Active column and R2's address as standby.
Task 4: predict each failure
Pick a failure and decide which router forwards PC1's traffic before you watch. The panel shows the frame PC1 sends: its destination MAC is the virtual MAC in every case.
- 1. R1 is active: PC1 sends to the virtual MAC, which SW1 has learned on R1's port.
- 2. R1 forwards: R2 hears R1's Hellos every 3 seconds and stays standby.
Task 5: find the fault
After a change, R2 shows:
R2#show standby brief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IP Gi0/0 21 100 P Active local unknown 192.168.20.1
From the output above, what is wrong?
R1 recovers after a reboot. R1 has preempt, R2 is active. What happens?