HSRP
Hot Standby Router Protocol group configuration, preemption, and object tracking for gateway redundancy.
HSRP Configuration
HSRPv2 basic config — virtual IP shared between two routers; highest priority is active
configure terminal
interface GigabitEthernet0/0/0
ip address 10.50.1.2 255.255.255.0
standby version 2
standby 1 ip 10.50.1.1
standby 1 priority 110
standby 1 preempt
end
Standby router (lower priority) — same group number and virtual IP
configure terminal
interface GigabitEthernet0/0/0
ip address 10.50.1.3 255.255.255.0
standby version 2
standby 1 ip 10.50.1.1
standby 1 priority 100
standby 1 preempt
end
HSRPv2 vs HSRPv1
HSRPv2 — extended group range (0-4095), uses 224.0.0.102, millisecond timers, different virtual MAC format
! HSRPv1: group range 0-255, MAC 0000.0c07.acXX
! HSRPv2: group range 0-4095, MAC 0000.0c9f.fXXX
! Always use HSRPv2 — HSRPv1 is legacy
configure terminal
interface GigabitEthernet0/0/0
standby version 2
end
HSRP Preempt
Preempt — allows higher priority router to take over active role; disabled by default
configure terminal
interface GigabitEthernet0/0/0
standby 1 preempt
standby 1 preempt delay minimum 30
end
HSRP Timers
Adjust hello and hold timers — default hello 3s, hold 10s; millisecond timers for fast failover
configure terminal
interface GigabitEthernet0/0/0
standby 1 timers 1 3
end
! Millisecond timers — 200ms hello, 700ms hold
configure terminal
interface GigabitEthernet0/0/0
standby 1 timers msec 200 msec 700
end
HSRP Interface Tracking
Track an upstream interface — decrement priority when tracked interface goes down; triggers preempt failover
configure terminal
track 1 interface GigabitEthernet0/0/1 line-protocol
!
interface GigabitEthernet0/0/0
standby 1 track 1 decrement 20
end
Track an IP route — more flexible than interface tracking; monitors reachability
configure terminal
track 10 ip route 0.0.0.0/0 reachability
!
interface GigabitEthernet0/0/0
standby 1 track 10 decrement 20
end
HSRP Verification
Show HSRP state — active/standby role, virtual IP, priority, preempt status, timers
show standby
show standby brief
show standby GigabitEthernet0/0/0
Key fields in show standby output
! State: Active / Standby / Init / Learn / Speak
! Priority: 110 (configured) - 20 (decrement) = 90 (effective)
! Preempt: enabled / disabled
! Virtual IP: 10.50.1.1
! Active: local / 10.50.1.3
VRRP Configuration
VRRP — IETF standard (RFC 5798); master owns the virtual IP if it matches a real interface IP
configure terminal
interface GigabitEthernet0/0/0
ip address 10.50.1.2 255.255.255.0
vrrp 1 address-family ipv4
address 10.50.1.1 primary
priority 110
preempt delay minimum 30
track 1 decrement 20
exit-vrrp
end
VRRP vs HSRP comparison
! VRRP: IETF standard, master/backup, multicast 224.0.0.18
! - Master can own the virtual IP (no phantom IP needed)
! - Preempt enabled by default
! - Default priority 100, range 1-254
!
! HSRP: Cisco proprietary, active/standby, multicast 224.0.0.102
! - Virtual IP is always phantom (not owned by any interface)
! - Preempt disabled by default
! - Default priority 100, range 0-255
GLBP Configuration
GLBP — Cisco proprietary; provides load balancing across multiple forwarders using single virtual IP
configure terminal
interface GigabitEthernet0/0/0
ip address 10.50.1.2 255.255.255.0
glbp 1 ip 10.50.1.1
glbp 1 priority 110
glbp 1 preempt
glbp 1 load-balancing round-robin
end
GLBP roles — AVG (Active Virtual Gateway) assigns AVF (Active Virtual Forwarder) roles; each AVF has a unique virtual MAC
! AVG: Answers ARP for virtual IP, assigns virtual MACs to AVFs
! AVF: Each gateway forwards traffic for its assigned virtual MAC
! Load-balancing methods:
! round-robin — distributes MACs to hosts sequentially (default)
! weighted — proportional to configured weight
! host-dependent — consistent MAC per host (based on source MAC)
GLBP with tracking
configure terminal
interface GigabitEthernet0/0/0
glbp 1 weighting 110 lower 95 upper 105
glbp 1 weighting track 1 decrement 20
end
GLBP verification
show glbp
show glbp brief
Verification Summary
Key show commands for FHRP troubleshooting
show standby
show standby brief
show vrrp
show vrrp brief
show glbp
show glbp brief
show track