Hot Standby Routing Protocol

This guide explains the functionality of HSRP and shows how to use it in a simple network environment and also in an enterprise network environment.

Introduction

HSRP is a Cisco proprietary protocol that allows two or more routers to work together to present the appearance of a single virtual router to the hosts on a LAN. HSRP enables one router to take over as the active router if the other router fails or becomes unavailable, providing network failover and redundancy. HSRP works by configuring two routers with a virtual IP address and virtual MAC address that represents the virtual router. One router is designated as the active router, and the other is designated as the standby router. The active router is responsible for forwarding packets sent to the virtual IP address, while the standby router monitors the active router and takes over as the active router if it fails or becomes unavailable. By using HSRP, network administrators can ensure that there is always a functioning router available to forward packets and maintain network connectivity, even if one of the routers fails or experiences an outage. This helps to improve the reliability and availability of the network.

Description
HSRP is a Cisco proprietary protocol
One router is designated as the active router and the other is designated as the standby router
A unique virtual gateway address must be configured that is not already configured on a device
Failover is the process of automatically switching to a backup or redundant system when the primary system fails
A router with a higher configured priority does not automatically become the active router after a failover - preemption is necessary for becoming the active router again
It is recommended to use version 2 when HSRP is needed - a version change results in a small downtime
A version change while connections are established cuts off the connections and sessions need to be established again
HSRP version 1 uses the MAC address 00:00:0c:07:ac:?? (the last two depend on the configured HSRP group)
HSRP version 2 uses the MAC address 00:00:0c:9f:f?:?? (the last three depend on the configured HSRP group)
Version 1 hello messages are communicated via multicast address 224.0.0.2
Version 2 hello messages are communicated via multicast address 224.0.0.102
Default hello timer = 3 seconds
Default holdtime = 10 seconds
Default priority = 100 (higher wins)
The holdtime should be 3 times the hello timer when HSRP timers are configured manually
The Protocol uses the UDP 1985 network port
The Protocol is documented in the RFC 2281

HSRP Version 2

HSRP version 2 (HSRPv2) is recommended over version 1 (HSRPv1) because it offers several improvements and additional features. Overall, HSRPv2 provides more robust and flexible failover and redundancy capabilities, making it the preferred version for many network administrators. Some of the benefits of HSRPv2 include:

Description
Support for IPv6: HSRPv2 supports IPv6 addresses in addition to IPv4 addresses, allowing it to be used in IPv6 networks
Improved multicast support: HSRPv2 uses multicast addresses for hello messages and multicast group addresses for virtual IP addresses, which can improve multicast performance in large networks
Enhanced authentication: HSRPv2 supports stronger authentication methods, including the use of keys, to protect against unauthorized routers becoming active or standby routers
Enhanced tracking: HSRPv2 allows you to track the status of multiple interfaces or routes, and you can specify a different priority value for each tracked item. This allows you to customize failover behavior based on the status of different resources in the network

HSRP States

In HSRP, there are several different states that a router can be in, depending on its role and the status of the other routers in the group. Here are the main HSRP states:

Description
Initial state: When HSRP is first configured on a router, it enters the initial state. In this state, the router does not yet have a role (active or standby) and is not forwarding packets.
Active state: When a router becomes the active router, it enters the active state. In this state, the router is responsible for forwarding packets sent to the virtual IP address and sends hello messages to the standby router.
Standby state: When a router becomes the standby router, it enters the standby state. In this state, the router monitors the active router and takes over as the active router if it fails or becomes unavailable. The standby router also sends hello messages to the active router to confirm that it is still functioning.
Listen state: If a router in the standby state does not receive hello messages from the active router for a specified period of time, it enters the listen state. In this state, the router does not forward packets, but it continues to send hello messages to the active router to try to establish communication. If communication is restored, the router returns to the standby state.
Speak state: If a router in the listen state receives a hello message from the active router, it enters the speak state. In this state, the router sends hello messages to the active router, but it does not forward packets. This state is used to confirm that communication has been restored before the router returns to the standby state.
Active-passive state: In some configurations, two routers can be configured as active-passive, which means that one router is active and the other is passive. The passive router does not send hello messages or forward packets, but it is ready to take over as the active router if the active router fails or becomes unavailable.

Premium Access

Log in or register - Premium members can access all content without restrictions.

Get Premium

0 Comments

Submit a Comment