Hot Standby Router Protocol (HSRP) is a Cisco proprietary redundancy protocol for establishing a fault-tolerant default gateway. This protocol is widely used to ensure high availability of the gateway connection in a local area network (LAN).

Detailed Explanation of Hot Standby Router Protocol
HSRP enables two or more routers on a LAN to collaborate in a single “virtual” router or gateway. This virtual router doesn’t physically exist but is a conceptual construct determined by the HSRP configuration. HSRP designates one of these routers as the active router and another as the standby router, with others as additional backups if more than two are configured.
Key Components of Hot Standby Router Protocol
- Virtual IP and MAC Address:
- Virtual IP Address: This is the IP address configured as the default gateway on all devices in the LAN. It is associated with the virtual router managed by HSRP.
- Virtual MAC Address: Automatically generated by HSRP. It has a format of 0000.0c07.acXX, where XX is the HSRP group number in hexadecimal.
- Roles:
- Active Router: Handles the routing of data packets. This router owns the virtual IP address and responds to ARP requests for the virtual IP address with the virtual MAC address.
- Standby Router: Assumes the role of the active router if it fails. It monitors the status of the Active router through hello messages.
- Other Routers: Can also be configured to serve as additional standbys.
- Timers:
- Hello Time: The frequency at which the active and standby routers send hello packets. The default is 3 seconds.
- Hold Time: The time after which the standby router assumes the active router has failed if it doesn’t receive a hello message. The default is 10 seconds.
How HSRP Works
- Initialization: When HSRP is configured on routers in a network, they communicate using multicast hello messages to establish and maintain their roles.
- Election Process: The router with the highest priority becomes the active router. If priorities are equal, the router with the highest IP address becomes the active router.
- Failover: If the active router fails (detected when hello messages cease), the standby router with the highest priority takes over as the active router. This ensures minimal disruption of network connectivity.
Example of HSRP in Action
Imagine a small business network with two routers, Router A and Router B, connected to the same LAN segment. The network administrator sets up HSRP to ensure that the network remains connected to the internet if one of the routers fails.
- Configuration:
- Both routers are configured to participate in HSRP group 1.
- Router A is configured with a priority of 110, and Router B with a priority of 100.
- The virtual IP address configured for HSRP group 1 is 192.168.1.1.
- Operation:
- Router A, having the higher priority, becomes the active router. Router B is standby.
- All devices in the LAN use the IP address 192.168.1.1 as their default gateway.
- Router A responds to ARP requests for the IP address 192.168.1.1 with the virtual MAC address assigned to HSRP group 1.
- Failover Scenario:
- If Router A goes offline due to a hardware failure, Router B stops receiving hello packets from Router A.
- After the hold time expires, Router B takes over as the active router, assuming control of the virtual IP and MAC addresses.
- Network devices continue to use 192.168.1.1 without any configuration changes or noticeable downtime.
Summary of Hot Standby Router Protocol
HSRP provides a seamless and automatic failover mechanism, making it a critical component for networks where continuous connectivity is necessary. Its ability to reroute traffic quickly and efficiently in the event of router failure helps minimize downtime and maintain business operations.
Useful Links
https://sanchitgurukul.com/tutorials-cat
