What Is HSRP? Hot Standby Router Protocol Explained

What Is HSRP? Hot Standby Router Protocol Explained
Networking ATN Campus September 22, 2026 2 views

What Is HSRP? Hot Standby Router Protocol Explained

In a network, computers normally need a default gateway to communicate with devices outside their local subnet. But what happens if that gateway router fails?

This is where HSRP can help. HSRP allows multiple Cisco routers to participate in a first-hop redundancy design and provide a virtual gateway for hosts.

In this guide, we'll learn what HSRP is, how it works, its roles, virtual IP address, priority, preemption, failover process, and practical Cisco configuration examples.


What Does HSRP Stand For?

HSRP stands for Hot Standby Router Protocol.

It is a Cisco first-hop redundancy protocol designed to provide a resilient default gateway for hosts on a LAN.

      HSRP
       |
       ↓
```

First-Hop Redundancy
|
↓
Virtual Gateway
|
+-----+-----+
|           |
Router 1    Router 2
Active      Standby 
```

Why Do We Need HSRP?

Consider a simple network where all computers use one router as their default gateway.

   PC 1 ----\
   PC 2 -----+---- Router 1 ---- Internet
   PC 3 ----/
                |
             Gateway
         192.168.10.1
    

If Router 1 fails, the hosts may lose their path to external networks.

Now introduce HSRP:

                  LAN
                   |
            Virtual Gateway
             192.168.10.1
                   |
          +--------+--------+
          |                 |
       Router 1          Router 2
        ACTIVE            STANDBY
          |                 |
          +--------+--------+
                   |
                Upstream
    

The hosts use the virtual gateway address. HSRP manages which router is currently responsible for forwarding traffic for that virtual gateway.

HSRP Roles

HSRP routers can have different roles within an HSRP group.

Active Router

The Active router is the router currently forwarding traffic for the HSRP virtual gateway.

Standby Router

The Standby router is prepared to take over if the active router becomes unavailable.

             HSRP Group 1

         Virtual IP
         192.168.10.1
                |
      +---------+---------+
      |                   |
  Router 1             Router 2
   ACTIVE              STANDBY
   Priority 110        Priority 100
      |                   |
      +---------+---------+
                |
               LAN
    

What Is the HSRP Virtual IP?

The virtual IP address is an address representing the HSRP gateway rather than one physical router interface.

For example:

```

Router 1 physical IP: 192.168.10.2
Router 2 physical IP: 192.168.10.3

HSRP Virtual IP:       192.168.10.1 
```

Hosts can use 192.168.10.1 as their default gateway.

```

PC
|
| Default Gateway
| 192.168.10.1
|
+----------+
|
HSRP Virtual
IP
|
+-----+-----+
|           |
Router 1    Router 2
Active      Standby 
```

What Is HSRP Priority?

HSRP uses a priority value to help determine which router should become active.

By default, HSRP priority is commonly 100. A higher priority is preferred during the election.

```

Router 1
Priority = 110
|
↓
Preferred Active Router

Router 2
Priority = 100
|
↓
Standby Router 
```

Priority is only one part of the behavior. Interface tracking and other configuration can affect which router should be active in a real design.

What Is HSRP Preemption?

Preemption allows a router with the preferred priority to reclaim the active role after it becomes available again, when preemption is configured.

   Normal Operation

   Router 1
   ACTIVE
      |
   Router 2
   STANDBY


   Router 1 fails

   Router 2
   ACTIVE


   Router 1 returns

   With preemption:
   Router 1 can become
   ACTIVE again if it has
   the preferred priority.
    

A common Cisco configuration command is:

```

standby 1 preempt 
```

Basic HSRP Configuration Example

Assume the LAN uses the following addressing:

Device Address
Router 1 192.168.10.2
Router 2 192.168.10.3
HSRP Virtual IP 192.168.10.1
Subnet 192.168.10.0/24

Router 1

```

Router1(config)# interface GigabitEthernet0/1
Router1(config-if)# ip address 192.168.10.2 255.255.255.0
Router1(config-if)# standby 1 ip 192.168.10.1
Router1(config-if)# standby 1 priority 110
Router1(config-if)# standby 1 preempt 
```

Router 2

```

Router2(config)# interface GigabitEthernet0/1
Router2(config-if)# ip address 192.168.10.3 255.255.255.0
Router2(config-if)# standby 1 ip 192.168.10.1
Router2(config-if)# standby 1 priority 100
Router2(config-if)# standby 1 preempt 
```

Both routers participate in HSRP group 1 and share the virtual IP address.

Exact interface names and supported command syntax can vary by Cisco platform and software version.

What Happens When Router 1 Fails?

          BEFORE FAILURE

          Virtual IP
         192.168.10.1
                |
         +------+------+
         |             |
      Router 1      Router 2
       ACTIVE        STANDBY
         |             |
         +------+------+
                |
               LAN


          Router 1 FAILS

                X
                |
            Router 1


                ↓
            HSRP detects
             failure


          AFTER FAILOVER

         Virtual IP
         192.168.10.1
                |
            Router 2
             ACTIVE
                |
               LAN
    

Router 2 can assume the active role for the HSRP group. Hosts continue using the same virtual gateway address.

This is one of the main advantages of first-hop redundancy: the host configuration does not need to be changed simply because the active physical router changed.

HSRP Group Number

HSRP uses a group identifier. For example:

```

standby 1 ip 192.168.10.1 
```

Here, 1 identifies the HSRP group.

Multiple HSRP groups can be used in larger network designs, allowing different VLANs or gateway groups to have different active routers depending on the architecture.

HSRP States

HSRP uses a state machine to manage router participation and role changes. Common HSRP states include:

State General Meaning
Initial Initial state before normal HSRP operation
Learn Learning HSRP information
Listen Listening for HSRP peers
Speak Participating in the election process
Standby Ready to become active
Active Forwarding traffic for the virtual gateway

How to Verify HSRP

On Cisco devices, engineers can use:

```

Router# show standby 
```

This command can provide information about HSRP groups, states, active/standby roles, virtual IP addresses, priorities, and related information.

Engineers should also verify interface status, routing, and connectivity when troubleshooting an HSRP problem.

HSRP and ARP

Hosts need to associate the default gateway's IP address with a Layer 2 destination. HSRP provides a virtual gateway identity that can be used for this purpose.

```

Host
|
| Destination:
| 192.168.10.1
|
↓
Virtual Gateway
|
+---- Active HSRP Router 
```

The exact forwarding behavior involves the virtual MAC address associated with the HSRP group. This allows the gateway identity to remain consistent when the active router changes.

HSRP vs VRRP

Feature HSRP VRRP
Full Name Hot Standby Router Protocol Virtual Router Redundancy Protocol
Origin Cisco Standards-based
Purpose First-hop redundancy First-hop redundancy
Gateway Address Virtual IP Virtual IP
Typical Roles Active / Standby Master / Backup

Both technologies solve a similar first-hop availability problem, although their protocols, terminology, and configuration differ.

HSRP in a Real Office Network

                     INTERNET
                        |
                   Core Network
                        |
             +----------+----------+
             |                     |
          Router 1              Router 2
           HSRP                   HSRP
          ACTIVE                 STANDBY
             \                     /
              \                   /
               +-----------------+
                      LAN
                       |
                +------+------+
                |             |
             Switch 1      Switch 2
                |             |
              Users         Users

         Virtual Gateway:
           192.168.10.1
    

If Router 1 fails, Router 2 can take over the HSRP active role, allowing hosts to continue using the virtual gateway.

Common HSRP Mistakes

  • Using different HSRP group numbers on participating routers
  • Configuring different virtual IP addresses
  • Using an incorrect subnet
  • Forgetting to enable preemption when the design requires it
  • Ignoring interface failures
  • Not checking HSRP status during troubleshooting
  • Assuming HSRP alone provides complete network redundancy

HSRP protects the first-hop gateway function. It does not automatically make every other part of the network redundant.

Quick Quiz

Question 1

What does HSRP stand for?

Show Answer

Hot Standby Router Protocol.

Question 2

What is the main purpose of HSRP?

Show Answer

To provide first-hop/default-gateway redundancy using a virtual gateway.

Question 3

What is the HSRP virtual IP?

Show Answer

It is the shared gateway IP address that hosts use as their default gateway in an HSRP design.

Question 4

Which router normally forwards traffic for the HSRP virtual gateway?

Show Answer

The HSRP Active router.

Question 5

What happens if the active HSRP router fails?

Show Answer

The standby router can assume the active role, allowing the virtual gateway to remain available, subject to the HSRP configuration and failure detection.

Key Takeaways

  • HSRP stands for Hot Standby Router Protocol.
  • HSRP is a Cisco first-hop redundancy protocol.
  • It provides a resilient virtual default gateway.
  • The HSRP Active router forwards traffic for the virtual gateway.
  • The Standby router is prepared to take over.
  • HSRP uses a virtual IP address.
  • Priority helps influence which router becomes active.
  • Preemption can allow the preferred router to regain the active role.
  • VRRP provides a standards-based alternative for first-hop redundancy.
  • HSRP protects the gateway function, not the entire network by itself.

Start Your Networking Journey with ATN Campus

Want to learn HSRP, VRRP, STP, RSTP, VLANs, EtherChannel, routing, network security, and high-availability networking?

ATN Campus provides industry-focused networking and cybersecurity training that combines theory with practical hands-on experience.

Courses Available

  • CCNA – Cisco Certified Network Associate
  • CCNP – Cisco Certified Network Professional
  • CEH – Certified Ethical Hacker
  • Cisco CyberOps
  • Network Security
  • Cloud Networking
  • Python for Network Automation
  • Practical Networking Labs
  • Cybersecurity Fundamentals
  • Career Guidance & Certification Preparation

Whether you're starting from zero or preparing for a professional networking or cybersecurity certification, ATN Campus can help you build the practical knowledge and hands-on skills needed for today's IT industry.

???? Learn networking. ???? Understand HSRP. ???? Master redundancy. ???? Practice with Cisco labs. ???? Prepare for certifications. ???? Build your IT career with ATN Campus.
Document ATN CAMPUS