First-Hop Redundancy Cheat Sheet

MAG212 CYBERNETWORK ENGINEERING · PROFESSIONAL FIELD GUIDE · 2026

ULTIMATE CHEAT SHEET / CCNA · CCNP · NETWORK ENGINEERS

First-Hop Redundancy Ultimate Cheat Sheet

HSRP • VRRP • GLBP — virtual gateways, priority and preemption, object tracking, Cisco IOS XE configurations, verification, security and troubleshooting.

Published by MAG212 CYBER · Technical education edition

⬇ Download the PDF edition
First-hop redundancy lab topologyCORE router connects to two Layer 3 distribution switches, DIST-A and DIST-B, over tracked uplinks Gi1/0/48. DIST-A is HSRP active with priority 120 and Vlan20 address 10.20.20.2; DIST-B is standby with priority 100 and address 10.20.20.3. The two switches share VLAN 20 over an inter-switch trunk and both trunk down to ACCESS SW-1. Hosts in 10.20.20.0/24 use the virtual gateway 10.20.20.1.MAG212 CYBER· FIRST-HOP REDUNDANCY LABVLAN 20 · 10.20.20.0/24 · two Layer 3 gateways share one virtual IP · HSRPv2 shown (VRRP / GLBP are alternatives)CORE / WANUplink Gi1/0/48 → COREtrack 10 · line-protocolUplink Gi1/0/48 → CORErouted upstream pathL3L3DIST-AACTIVE · priority 120Vlan20 10.20.20.2/24DIST-BSTANDBY · priority 100Vlan20 10.20.20.3/24L2 trunk · VLAN 20HSRP hellos · 224.0.0.102 UDP 1985VIRTUAL GATEWAY 10.20.20.1vMAC 0000.0c9f.f014 (HSRPv2 group 20)owned by whichever gateway is active802.1Q trunk · VLAN 20802.1Q trunk · VLAN 20ACCESS SW-1VLAN 20 hosts · 10.20.20.0/24default gateway 10.20.20.1 (the virtual IP, not .2 or .3)FAILOVERDIST-A uplink down → track 10 → priority 120 − 40 = 80 < 100 → DIST-B (preempt) becomes active.Design tip: make DIST-A the STP root for VLAN 20 too, so Layer 2 and Layer 3 paths line up.
Lab used throughout: VLAN 20, 10.20.20.0/24. Virtual gateway 10.20.20.1, DIST-A 10.20.20.2, DIST-B 10.20.20.3. Both SVIs must sit in the same Layer 2 VLAN so the gateways can hear each other’s hellos. Run one protocol at a time on a given virtual IP — HSRP, VRRP and GLBP are alternatives, not layers.

01 / Why first-hop redundancy?

Hosts usually have one static default gateway. If that router or switch fails, the host loses everything off-subnet even though another router is sitting on the same VLAN. A first-hop redundancy protocol (FHRP) lets two or more gateways share a virtual IP and virtual MAC. One of them forwards for the virtual address; if it fails, a peer takes over the same IP and MAC, so hosts need no reconfiguration and their ARP caches stay valid (the new owner sends gratuitous ARP to update switch MAC tables).

FHRPs protect the first hop only. They do not make the upstream WAN, NAT or firewall path redundant — track the path that matters and design redundant uplinks.

02 / Protocol comparison

HSRPVRRPGLBP
StandardCisco proprietary (v1 described in RFC 2281)IETF: VRRPv2 RFC 3768; VRRPv3 RFC 9568 (obsoletes RFC 5798)Cisco proprietary
RolesActive, Standby, ListenActive (called Master before RFC 9568), BackupAVG answers ARP; up to 4 AVFs forward
Forwarders per group11Up to 4 (load sharing)
Default priority100100 (255 = address owner)100 (AVG election)
Preemption defaultDisabledEnabledAVG disabled; AVF enabled
Default timersHello 3 s / hold 10 sAdvertisement 1 sHello 3 s / hold 10 s
TransportUDP 1985IP protocol 112UDP 3222
IPv4 multicastv1 224.0.0.2 · v2 224.0.0.102224.0.0.18 (IPv6 ff02::12)224.0.0.102
Virtual MACv1 0000.0c07.acXX · v2 0000.0c9f.fXXX0000.5e00.01XX (IPv6 0000.5e00.02XX)0007.b400.XXYY (group, AVF)
Group rangev1 0–255 · v2 0–4095VRID 1–2550–1023
IPv6HSRPv2 onlyVRRPv3Platform-dependent
Verifyshow standby briefshow vrrp briefshow glbp brief

Rule of thumb: HSRP for all-Cisco campus designs, VRRP for mixed vendors or firewalls, GLBP only where you need several active gateways in one VLAN and the platform supports it — many Catalyst switching platforms do not.

03 / HSRP version 2: complete paired lab

Both Layer 3 switches carry VLAN 20. DIST-A starts active because priority 120 beats DIST-B’s 100. Both enable preemption with a 30-second delay so a rebooting switch finishes building its routing and ARP tables before it reclaims the role. Object tracking lowers DIST-A’s priority by 40 if its uplink fails.

DIST-A (intended active)

ip routing
vlan 20
 name USERS
track 10 interface GigabitEthernet1/0/48 line-protocol
!
interface Vlan20
 ip address 10.20.20.2 255.255.255.0
 standby version 2
 standby 20 ip 10.20.20.1
 standby 20 priority 120
 standby 20 preempt delay minimum 30
 standby 20 track 10 decrement 40
 no shutdown

DIST-B (standby)

ip routing
vlan 20
 name USERS
!
interface Vlan20
 ip address 10.20.20.3 255.255.255.0
 standby version 2
 standby 20 ip 10.20.20.1
 standby 20 priority 100
 standby 20 preempt delay minimum 30
 no shutdown

Expected: DIST-A Active, DIST-B Standby. If Gi1/0/48 goes down, DIST-A drops to 120 − 40 = 80. Because DIST-B has preempt and a higher priority (100), it takes over. When the uplink returns, DIST-A goes back to 120 and, after the 30-second delay, preempts back to Active.

Without preempt on DIST-B, tracking only lowers DIST-A’s priority — DIST-B will not take over while DIST-A is still sending hellos. Both peers must use the same HSRP version and group number; v1 and v2 are not compatible.

Optional faster detection: standby 20 timers msec 250 msec 750 on both peers. Sub-second timers add control-plane load; on most campus designs BFD or default timers plus tracking are enough.

04 / VRRP: the standards-based alternative

VRRP uses IP protocol 112 (not TCP or UDP). Preemption is on by default. If a router’s real interface address is the virtual IP, it becomes the address owner with priority 255. Cisco IOS XE supports two syntaxes; use the one your release offers.

Classic VRRPv2 syntax (DIST-A)

track 10 interface GigabitEthernet1/0/48 line-protocol
interface Vlan20
 ip address 10.20.20.2 255.255.255.0
 vrrp 20 ip 10.20.20.1
 vrrp 20 priority 120
 vrrp 20 track 10 decrement 40

VRRPv3 syntax, IOS XE (DIST-A)

fhrp version vrrp v3
track 10 interface GigabitEthernet1/0/48 line-protocol
interface Vlan20
 ip address 10.20.20.2 255.255.255.0
 vrrp 20 address-family ipv4
  address 10.20.20.1 primary
  priority 120
  track 10 decrement 40

DIST-B uses the same group with its own address 10.20.20.3 and the default priority 100. VRRPv3 (RFC 9568) supports both IPv4 and IPv6; IPv6 is a separate address-family ipv6 instance. Older guides that say “VRRP has no IPv6” describe VRRPv2. RFC 9568 renamed the forwarding role from Master to Active; many CLIs still print MASTER.

VRRPv2 and VRRPv3 do not interoperate by default. When migrating, enable v3 on every peer in the group during the same window.

05 / GLBP: redundancy with gateway load sharing

One router is elected Active Virtual Gateway (AVG). It answers every ARP request for the virtual IP but hands out different virtual MACs — one per Active Virtual Forwarder (AVF), up to four per group. Different hosts therefore send traffic to different gateways while sharing one default-gateway IP.

DIST-A

interface Vlan20
 ip address 10.20.20.2 255.255.255.0
 glbp 20 ip 10.20.20.1
 glbp 20 priority 120
 glbp 20 preempt
 glbp 20 load-balancing round-robin
 glbp 20 weighting 100 lower 70 upper 90
 glbp 20 weighting track 10 decrement 40

DIST-B

interface Vlan20
 ip address 10.20.20.3 255.255.255.0
 glbp 20 ip 10.20.20.1
 glbp 20 priority 100
 glbp 20 preempt
 glbp 20 load-balancing round-robin

Priority vs weighting: priority (with preempt) decides which router is AVG. Weighting decides whether a router keeps forwarding as an AVF: in the example, losing the uplink drops DIST-A’s weight from 100 to 60, below the lower threshold of 70, so it stops forwarding and DIST-B takes over its virtual MAC. It resumes when the weight climbs back above 90.

GLBP shares load per host through ARP replies, not per packet or per flow. Load-balancing modes: round-robin (default), weighted and host-dependent (the same host always gets the same MAC).

06 / Failover and validation

EventExpected resultCheck
Normal operationDIST-A Active, DIST-B Standbyshow standby brief
DIST-A uplink failsTracked priority 120 → 80; DIST-B (100, preempt) becomes Activeshow track 10, show standby vlan 20
DIST-A reloadsDIST-B stops hearing hellos; Active after hold time (10 s default)show logging | include HSRP
DIST-A recoversAfter the 30 s preempt delay, DIST-A reclaims Activeshow standby vlan 20
VLAN 20 missing on a trunkPeers cannot hear each other → both Active (split brain)show interfaces trunk

Test in a lab or maintenance window: confirm the state change, that hosts keep forwarding, that remote applications stay reachable, and that failback works. A stable virtual IP does not preserve sessions if NAT, firewall state or asymmetric routing breaks the flow.

07 / Command field reference

FHRP state

show standby brief
show standby vlan 20
show vrrp brief
show vrrp detail
show glbp brief
show glbp detail
show track brief
show logging | include HSRP|VRRP|GLBP

Layer 2 / Layer 3 path

show ip interface brief
show interfaces trunk
show vlan brief
show spanning-tree vlan 20
show ip route
show ip arp 10.20.20.1
ping 10.20.20.1 source vlan 20
traceroute 8.8.8.8

Read the group number, state (Active/Standby/Listen or Active/Backup), priority, virtual IP, virtual MAC, timers and the “last state change” counter. A ping to the virtual IP is only a first test — also test a remote destination from a VLAN 20 host.

08 / Troubleshooting decision tree

  1. Hosts cannot reach the virtual IP: check VLAN membership, the host’s gateway and mask, and that at least one SVI is up/up.
  2. Both peers show Active: hellos are not getting through. Check allowed VLANs on every trunk, STP blocking, ACLs or control-plane policies dropping 224.0.0.102 / 224.0.0.18, mismatched group numbers, HSRP version or authentication.
  3. Failover does not happen: check show track, the priority after decrement, and that the peer has preempt.
  4. Gateway answers but the internet fails: check default routes, upstream reachability, ACLs, NAT and firewall state — not only the FHRP.
  5. State keeps flapping: correlate interface logs, err-disable events, STP topology changes, CPU load, timers and an oscillating tracked object.

09 / Security and design hardening

  • Authenticate the protocol where supported: standby 20 authentication md5 key-chain FHRP-KEYS (HSRP) or the platform’s VRRP authentication options. Plain-text keys stop accidents, not attackers.
  • An attacker on the VLAN can send hellos with priority 255 and become the gateway (man-in-the-middle). Restrict who can reach infrastructure VLANs, and filter FHRP traffic arriving on host ports with port ACLs where your platform allows.
  • Use BPDU Guard on host ports, prune allowed VLANs on trunks and protect management with AAA and SSH.
  • Align the STP root (and HSRP active) for each VLAN on the same distribution switch so traffic does not cross the inter-switch link unnecessarily.
  • Document priorities, monitor state changes in syslog/SNMP, and test both failover and failback.
  • Consider whether StackWise Virtual, VSS, vPC or anycast gateways in an EVPN fabric fit better than a classic FHRP.

10 / Practice exam: eight explained answers

  1. Why use a virtual IP? Hosts keep one gateway address even when the device doing the forwarding changes.
  2. What does HSRP preemption do? Lets a higher-priority peer take the Active role from a lower-priority one. It is off by default in HSRP.
  3. Does VRRP use UDP 112? No — it is IP protocol 112. HSRP uses UDP 1985 and GLBP UDP 3222.
  4. DIST-A priority 120 tracks its uplink with decrement 15. DIST-B is 100 with preempt. Does DIST-B take over when the uplink fails? No. 120 − 15 = 105, still higher than 100. The decrement must push the active below the standby.
  5. Why could both routers show Active? They are not hearing each other’s hellos, usually because of a trunk, VLAN or filtering problem.
  6. Does GLBP load-balance every packet? No. The AVG gives different hosts different virtual MACs, so the split is per host.
  7. What is the HSRPv2 virtual MAC for group 20? 0000.0c9f.f014 (20 = 0x014).
  8. What must a failover test include? The state change, host forwarding, reachability to upstream applications, and a planned failback.

11 / Sources & further reading

This is an original MAG212 CYBER guide. The lab, diagram, configurations and troubleshooting cases were written independently and checked against current Cisco documentation and IETF standards.

CLI syntax varies by IOS XE release and hardware. Check support with ? and your platform’s configuration guide, and validate through change control before production use.

MAG212 CYBER • Learn / Cheat Sheets • First-Hop Redundancy Ultimate Cheat Sheet • Original illustrations and configuration examples
More guides in Learn · VLANs · Spanning Tree · Network consulting & seminars