Skip to content
Website under migration: We are moving to a new design. Some pages may look different or load slowly for a few days. Thank you for your patience.
SwitchFirewall
IPv4 Detecting…
IPv6 Detecting…

HSRPv1 Configuration on Cisco Switches for Multiple VLANs

Last updated:

Introduction

Hot Standby Router Protocol (HSRP) is a Cisco proprietary redundancy protocol that ensures high availability of the default gateway in a network. In this post, we will discuss how to configure HSRP on Cisco switches across multiple VLANs to ensure seamless failover and improve network reliability.

Understanding HSRP

HSRP enables multiple switches to work together to present a single virtual router to network hosts. This virtual router uses a shared virtual IP address, which clients rely on as their default gateway. If the active router fails, HSRP automatically transitions to the standby router, minimizing network downtime and ensuring continuous connectivity.

Requirements

Before starting the configuration, ensure the following:

HSRP Configuration Steps

We will configure HSRP on two switches (SW1 and SW2) for six VLANs: 10, 11, 12, 13, 14, and 15. SW1 will be the active router for VLANs 10, 12, and 14, while SW2 will handle VLANs 11, 13, and 15.

SW1 Configuration

! VLAN 10 Configuration
interface Vlan10
 ip address 10.10.10.2 255.255.255.0
 standby 10 ip 10.10.10.1
 standby 10 priority 110
 standby 10 preempt
 standby version 1

! VLAN 11 Configuration
interface Vlan11
 ip address 10.10.11.2 255.255.255.0
 standby 11 ip 10.10.11.1
 standby 11 priority 95
 standby version 1

! VLAN 12 Configuration
interface Vlan12
 ip address 10.10.12.2 255.255.255.0
 standby 12 ip 10.10.12.1
 standby 12 priority 110
 standby 12 preempt
 standby version 1

! VLAN 13 Configuration
interface Vlan13
 ip address 10.10.13.2 255.255.255.0
 standby 13 ip 10.10.13.1
 standby 13 priority 95
 standby version 1

! VLAN 14 Configuration
interface Vlan14
 ip address 10.10.14.2 255.255.255.0
 standby 14 ip 10.10.14.1
 standby 14 priority 110
 standby 14 preempt
 standby version 1

! VLAN 15 Configuration
interface Vlan15
 ip address 10.10.15.2 255.255.255.0
 standby 15 ip 10.10.15.1
 standby 15 priority 95
 standby version 1
        

SW2 Configuration

! VLAN 10 Configuration
interface Vlan10
 ip address 10.10.10.3 255.255.255.0
 standby 10 ip 10.10.10.1
 standby 10 priority 95
 standby version 1

! VLAN 11 Configuration
interface Vlan11
 ip address 10.10.11.3 255.255.255.0
 standby 11 ip 10.10.11.1
 standby 11 priority 110
 standby 11 preempt
 standby version 1

! VLAN 12 Configuration
interface Vlan12
 ip address 10.10.12.3 255.255.255.0
 standby 12 ip 10.10.12.1
 standby 12 priority 95
 standby version 1

! VLAN 13 Configuration
interface Vlan13
 ip address 10.10.13.3 255.255.255.0
 standby 13 ip 10.10.13.1
 standby 13 priority 110
 standby 13 preempt
 standby version 1

! VLAN 14 Configuration
interface Vlan14
 ip address 10.10.14.3 255.255.255.0
 standby 14 ip 10.10.14.1
 standby 14 priority 95
 standby version 1

! VLAN 15 Configuration
interface Vlan15
 ip address 10.10.15.3 255.255.255.0
 standby 15 ip 10.10.15.1
 standby 15 priority 110
 standby 15 preempt
 standby version 1
        

Verification

To verify the HSRP configuration, use the following command to check the status of each VLAN's HSRP group:

show standby

This will display the active and standby routers for each VLAN. Make sure that the correct router is listed as active for each VLAN.

Troubleshooting

If you encounter issues with HSRP, follow these troubleshooting steps:

Conclusion

This guide covered how to configure HSRP on Cisco switches for multiple VLANs. By implementing HSRP, you can improve the availability of your default gateway and reduce network downtime. Use the verification and troubleshooting steps to ensure everything is functioning properly.