HSRP (Hot Standby Router Protocol) – In-Depth Guide

1. HSRP Overview

HSRP is a Cisco proprietary First Hop Redundancy Protocol (FHRP) that provides gateway redundancy. If the active router fails, a standby router takes over automatically, ensuring network continuity.

  • Multiple routers form an HSRP group sharing a virtual IP address.
  • One router is Active, others remain in Standby.
  • Hosts configure the virtual IP as their default gateway.

Example Scenario:

Two routers (R1 & R2) form HSRP Group 1 with virtual IP 192.168.1.254. Hosts point their default gateway to this virtual IP.

2. HSRP Versions

VersionKey DifferencesWhen to Use
HSRP v1 Group numbers 0–255, IPv4 only, MAC 00:00:0c:07:ac:XX Legacy setups, IPv4-only networks
HSRP v2 Group numbers 0–4095, IPv6 support, MAC 00:00:0c:9f:fX:XX Modern networks, IPv6 required, multiple groups

3. HSRP States and State Machine

StateDescription
InitialStartup, no HSRP activity yet
LearnLearns virtual IP
ListenListening for hello messages
SpeakExchanges hello messages, election process starts
StandbyReady to take over if Active fails
ActiveCurrently forwarding packets

Timers: Hello (default 3s), Hold (default 10s).

4. HSRP Priority and Preemption

  • Default Priority: 100
  • Higher priority routers become Active

Configuring Priority and Preemption:

standby [group] priority [value]
standby [group] preempt

5. HSRP Group and Virtual MAC/IP

Group Number: Identifies HSRP instance.

Virtual MAC Address Format:

  • HSRP v1: 00:00:0c:07:ac:XX
  • HSRP v2: 00:00:0c:9f:fX:XX

Example Configuration:

interface g0/1
 standby 1 ip 192.168.1.254
 standby 1 priority 110
 standby 1 preempt

6. Timers and Convergence

  • Hello Timer: Interval for hello messages (3s default).
  • Hold Timer: Wait before declaring router down (10s default).

Adjust timers carefully to balance fast convergence and network load:

standby [group] timers [hello] [hold]

7. HSRP Interface Tracking

Decreases priority if a key interface fails:

standby [group] track [interface] [decrement value]

8. Authentication

Secures HSRP traffic between routers.

  • Plain-text: standby [group] authentication [string]
  • MD5: More secure:
    standby [group] authentication md5 key-string [string]

9. Load Sharing Techniques

Use multiple HSRP groups with different virtual IPs for load distribution.

10. Integration with Other Protocols

ProtocolDescription
VRRPStandard-based alternative to HSRP
GLBPCisco protocol supporting load balancing with one virtual IP

11. HSRP over NBMA and Point-to-Point Links

  • NBMA: Ensure broadcast mapping or static configuration.
  • Point-to-Point: Usually not needed due to direct links.

12. Show and Debug Commands

  • show standby: Detailed HSRP status
  • show standby brief: Brief status
  • debug standby events: Monitor state transitions
  • debug standby packets: Inspect HSRP traffic

13. Troubleshooting HSRP

IssuePossible CauseSolution
Split-brain Both routers Active Check timers, priority, preemption
No failover Priority/preempt misconfigured Verify priority and preempt settings
State inconsistencies HSRP version mismatch, interface down Check configuration and interfaces

14. Advanced Topics

  • BFD integration: Faster failure detection.
  • Graceful Restart: Minimal disruption during failover.

Sample Configuration:

interface GigabitEthernet0/1
 ip address 192.168.10.2 255.255.255.0
 standby 10 ip 192.168.10.254
 standby 10 priority 110
 standby 10 preempt

When to Use HSRP

  • Enterprise networks
  • Data centers
  • Multi-router campuses

HSRP (Hot Standby Router Protocol) Quiz

1. What is the main purpose of HSRP?

Correct answer is A. HSRP provides gateway redundancy by electing an Active and Standby router to maintain network availability.

2. Which of the following is TRUE about HSRP versions?

Correct answer is D. HSRP v2 supports IPv6 and a larger range of group numbers for modern network deployments.

3. What is the default priority value for HSRP routers?

Correct answer is B. The default priority in HSRP is 100, used in the election of Active routers.

4. Which HSRP state indicates the router is currently forwarding packets as the default gateway?

Correct answer is C. The Active state means the router is forwarding packets as the current default gateway.

5. What command enables a router interface to participate in HSRP group 10 with virtual IP 192.168.10.254?

Correct answer is A. The 'standby [group] ip [virtual-ip]' command configures the virtual IP address for HSRP group participation.

6. What effect does the 'standby [group] preempt' command have?

Correct answer is D. Preemption enables a router with higher priority to take over the Active role when it becomes available.

7. Which timers control HSRP failover detection?

Correct answer is B. HSRP uses Hello (default 3 seconds) and Hold (default 10 seconds) timers to detect failures and trigger failover.

8. What is the purpose of HSRP interface tracking?

Correct answer is C. Interface tracking reduces the router's priority if the tracked interface fails, enabling failover.

9. Which of the following is a Cisco proprietary alternative to HSRP that supports true load balancing?

Correct answer is A. GLBP supports true load balancing by allowing multiple routers to share a single virtual IP.

10. What show command gives detailed HSRP status on an interface?

Correct answer is B. 'show standby' provides detailed HSRP status for interfaces.

← Back to Home