Hot Standby Router protocol

Cisco HSRP Configuration Guide with Examples

Master Cisco Hot Standby Routing Protocol (HSRP) with step-by-step configuration examples. Learn Active and Standby router roles, virtual IP addresses, HSRP priorities, preemption, interface tracking, failover operations, and verification commands used in real-world enterprise networks.

Cisco HSRP Configuration

Introduction

In enterprise networks, gateway availability is critical. If the default gateway router fails, users may lose access to resources outside their local network even though the LAN remains operational.

To overcome this problem, Cisco introduced Hot Standby Routing Protocol (HSRP), a First Hop Redundancy Protocol (FHRP) that provides gateway redundancy and high availability.

HSRP allows multiple routers to work together and present a single virtual gateway IP address to end devices. If the active router fails, another router automatically takes over, ensuring minimal disruption to network traffic.

What is HSRP?

HSRP stands for Hot Standby Routing Protocol. It is a Cisco proprietary redundancy protocol designed to provide continuous gateway availability.

Instead of configuring hosts with the physical IP address of a router, hosts use a virtual IP address. Multiple routers participate in an HSRP group and share responsibility for maintaining that virtual gateway.

Only one router forwards traffic at a time, while another router remains ready to take over during a failure.

How HSRP Works

HSRP operates by electing routers into different roles.

The routers exchange hello packets to monitor each other's availability.

If hello packets stop arriving from the active router, the standby router assumes control of the virtual IP address and virtual MAC address.

HSRP Topology Example

Consider the following scenario:

Clients never know which router is active because they always communicate with the virtual gateway address.

HSRP States

A router participating in HSRP transitions through several states:

The Active state forwards traffic, while the Standby state waits to take over during a failure.

Basic HSRP Configuration

The following example configures HSRP Group 10 on Router R1.

interface GigabitEthernet0/0

 ip address 192.168.10.1 255.255.255.0

 standby 10 ip 192.168.10.254

 standby 10 priority 110

 standby 10 preempt

The higher priority value makes Router R1 the preferred active router.

Configure Standby Router

Configure Router R2 as follows:

interface GigabitEthernet0/0

 ip address 192.168.10.2 255.255.255.0

 standby 10 ip 192.168.10.254

 standby 10 priority 100

 standby 10 preempt

Since Router R2 has a lower priority, it becomes the standby router.

HSRP Priority

Priority determines which router becomes the active router.

The default HSRP priority is 100.

The router with the highest priority becomes active.

Router Priority Role
R1 110 Active
R2 100 Standby

What is Preemption?

By default, if the active router fails and later comes back online, it does not automatically regain the active role.

The preempt command allows the higher-priority router to reclaim the active role when it becomes available again.

standby 10 preempt

HSRP Tracking

Interface tracking allows HSRP to react to WAN failures.

If an important uplink fails, the router can reduce its priority and allow another router to become active.

interface GigabitEthernet0/0

 standby 10 track GigabitEthernet0/1 20

If GigabitEthernet0/1 goes down, the HSRP priority decreases by 20 points.

Verification Commands

Use the following commands to verify HSRP operation:

show standby

show standby brief

show standby all

The output displays the active router, standby router, virtual IP address, and current HSRP state.

Sample Verification Output

R1# show standby brief

Interface   Grp Pri State    Active      Standby     Virtual IP

Gi0/0       10  110 Active   local       192.168.10.2 192.168.10.254

HSRP Version 1 vs Version 2

Feature Version 1 Version 2
Group Range 0-255 0-4095
Multicast Address 224.0.0.2 224.0.0.102
Scalability Limited Higher

Troubleshooting HSRP

If HSRP is not functioning correctly, verify the following:

Benefits of HSRP

Conclusion

HSRP is one of the most widely deployed First Hop Redundancy Protocols in Cisco environments. By providing a virtual default gateway, HSRP ensures continuous network availability and protects users from gateway failures.

Ask Your Doubt

Free Career Guidance

Need Help Choosing the Right Networking Course?

Speak with our expert trainers and get personalized guidance for CCNA, CCNP, Firewall Security, SD-WAN and Data Center training.

  • ✔ Real-Time Lab Training
  • ✔ Interview Preparation
  • ✔ Flexible Batch Timings
  • ✔ Lifetime Technical Support
  • ✔ Enterprise-Level Labs

Book Free Counselling

Need Immediate Assistance?

Chat directly with our networking experts and get information about upcoming batches, fees, and course details.

Chat on WhatsApp