Cisco IOS cheat sheet for First Hop Redundancy Protocols: HSRP (Cisco-proprietary), VRRP (open standard), and GLBP (Cisco-proprietary with load balancing). Supported on both routers and L3 switches.
Protocol Comparison
| Feature | HSRP | VRRP | GLBP |
|---|---|---|---|
| Standard | Cisco proprietary | Open (RFC 5798) | Cisco proprietary |
| Preempt default | Off | On | On |
| Load balancing | No | No | Yes (AVF) |
| Hello / Hold timers | 3 s / 10 s | 1 s / 3 s | 3 s / 10 s |
| Virtual IP = physical IP | No (must differ) | Yes (allowed) | No |
| Multicast address | 224.0.0.2 (v1) ยท 224.0.0.102 (v2) | 224.0.0.18 | 224.0.0.102 |
| Authentication | MD5 supported | Removed from RFC; supported on Cisco HW | MD5 supported |
| Interface tracking | Yes | Yes | Yes (via weighting) |
HSRP โ Hot Standby Router Protocol
HSRP โ Router 1 (Active)
| Command | Description |
|---|---|
| int fa0/1 | Interface facing the LAN |
| ip address 192.168.1.2 255.255.255.0 | Physical IP of this router |
| standby 1 ip 192.168.1.1 | Virtual IP (same on both routers) โ default gateway for hosts |
| standby 1 priority 110 | Set priority (default 100; higher = preferred active) |
| standby 1 preempt | Take over active role when priority is higher |
| standby 1 preempt delay minimum 300 | Wait 300 s before preempting (let routing protocols converge) |
| standby 1 authentication md5 key-string MyPassword | MD5 authentication (optional) |
| standby 1 timers 200 750 | Hello interval / hold interval in seconds (optional tuning) |
HSRP โ Router 2 (Standby) with Interface Tracking
| Command | Description |
|---|---|
| ip address 192.168.1.3 255.255.255.0 | Physical IP of standby router |
| standby 1 ip 192.168.1.1 | Same virtual IP as router 1 |
| standby 1 preempt | Enable preemption |
| track 1 interface fa0/1 line-protocol | Create tracking object for interface fa0/1 |
| standby 1 track 1 decrement 20 | Decrease priority by 20 if track object 1 fails |
| standby 1 track 1 fa0/1 20 | HSRP shorthand: track interface directly without separate track object |
VRRP โ Virtual Router Redundancy Protocol
Same commands as HSRP but replace standby with vrrp. Preemption is on by default in VRRP.
VRRP Setup
| Command | Description |
|---|---|
| vrrp 1 ip 192.168.1.1 | Enable VRRP group 1 with virtual IP |
Priority, preempt, authentication, and timer commands follow the same pattern as HSRP but use
vrrpkeyword.
GLBP โ Gateway Load Balancing Protocol
GLBP elects one AVG (Active Virtual Gateway) and multiple AVF (Active Virtual Forwarder). Each AVF serves a subset of hosts โ actual load balancing.
GLBP Configuration
| Command | Description |
|---|---|
| glbp 1 ip 192.168.1.1 | Enable GLBP group 1 with virtual IP |
| glbp 1 priority 110 | Set AVG priority (higher = preferred AVG) |
| glbp 1 preempt | Enable preemption for AVG |
| glbp 1 weighting 130 | Set AVF weight (higher = more traffic forwarded) |
| glbp 1 weighting 130 lower 20 upper 50 | Weight with thresholds: stop forwarding below 20, resume above 50 |
| track 1 interface fa0/1 line-protocol | Track uplink interface |
| glbp 1 weighting track 1 decrement 50 | Decrease weight by 50 if fa0/1 fails |
| glbp 1 load-balancing round-robin | Load-balancing method: round-robin, host-dependent, or weighted |
Diagnostics
show commands
| Command | Description |
|---|---|
| show standby | Detailed HSRP status (use `vrrp` or `glbp` for other protocols) |
| show standby brief | Compact FHRP status table |
Cisco IOS Command Reference | FHRP