HSRP (Hot Standby Router Protocol) Configuration Guide

Listen to this Post

HSRP is a Cisco proprietary redundancy protocol that ensures high availability in a network. Below is a detailed configuration guide along with essential commands and best practices.

Network Infrastructure Requirements

βœ… Routers: At least two HSRP-supported routers (must be Cisco routers).
βœ… Layer 3 Switches: If your network supports Layer 3 switching, HSRP can also be configured on switches.
βœ… VLANs & Subnets: A proper VLAN and IP addressing scheme is required.

Configuration Requirements

βœ… Virtual IP Address: A shared IP between Active & Standby routers.
βœ… Group Number: Each HSRP group has a unique number.
βœ… Priority Settings: The router with the higher priority becomes the Active Router. (Default: 100)
βœ… Preemption: Ensures that a higher-priority router automatically becomes Active when it comes online.
βœ… Timers: Default Hello Timer: 3 sec, Hold Timer: 10 sec (can be modified).

βœ… Authentication (Optional): Helps secure HSRP messages.

You Should Know: Essential HSRP Commands & Verification

Basic HSRP Configuration Example

Router 1 (Active Router)

interface GigabitEthernet0/1 
ip address 192.168.1.2 255.255.255.0 
standby 1 ip 192.168.1.1 
standby 1 priority 110 
standby 1 preempt 
standby 1 timers 1 3 
standby 1 authentication cisco 

Router 2 (Standby Router)

interface GigabitEthernet0/1 
ip address 192.168.1.3 255.255.255.0 
standby 1 ip 192.168.1.1 
standby 1 priority 100 
standby 1 preempt 
standby 1 timers 1 3 
standby 1 authentication cisco 

Verification Commands

show standby brief  Displays HSRP group status 
show standby  Detailed HSRP information 
debug standby  Real-time HSRP debugging 

Advanced HSRP Features

  • Multiple HSRP Groups (MHSRP):
    standby 2 ip 192.168.2.1 
    standby 2 priority 105 
    

  • Object Tracking (Failover Automation):

    track 1 interface GigabitEthernet0/2 line-protocol 
    standby 1 track 1 decrement 20 
    

  • HSRP Version 2 (Supports IPv6 & Larger Groups):

    standby version 2 
    

What Undercode Say

HSRP is a critical protocol for network redundancy. To maximize efficiency:
– Always enable preemption to ensure the highest-priority router takes over.
– Use authentication to prevent rogue HSRP attacks.
– For load balancing, consider GLBP or VRRP as alternatives.
– Monitor HSRP status with `show standby` and automate failover with object tracking.

For Linux admins, similar redundancy can be achieved using Keepalived with VRRP:

sudo apt install keepalived 

Example `keepalived.conf`:

vrrp_instance VI_1 { 
state MASTER 
interface eth0 
virtual_router_id 51 
priority 100 
advert_int 1 
authentication { 
auth_type PASS 
auth_pass secret 
} 
virtual_ipaddress { 
192.168.1.100/24 
} 
} 

Expected Output:

Router1 show standby brief 
Interface Grp Pri P State Active addr Standby addr Virtual IP 
Gi0/1 1 110 P Active local 192.168.1.3 192.168.1.1 

For further reading, check Cisco’s official HSRP documentation:

Cisco HSRP Configuration Guide

References:

Reported By: Breeze Singh – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass βœ…

Join Our Cyber World:

πŸ’¬ Whatsapp | πŸ’¬ TelegramFeatured Image