Cisco Systems, Inc.(R)    Cisco | Profile | Contacts & Feedback | Help
Cisco SMB Support Assistant
Configure Hot Standby Routing Protocol for Catalyst Switches
Home > Work With My Switches > Cisco Catalyst Switches > Configure Hot Standby Routing Protocol for Catalyst Switches  
 

Configure Hot Standby Routing Protocol for Catalyst Switches



     Introduction
     Requirements
     HSRP Overview
     Configure the Switch1
          Change the IP Address on the PC
          Connect the PC to the Switch1
          Configure HSRP on Switch1
     Configure the Switch2
          Configure HSRP on Switch2
     Next Step
     Troubleshoot the Procedure
     Related Information



Introduction

This document provides instructions on how to configure Hot Standby Routing Protocol (HSRP) on your Catalyst Switches. This procedure applies to 3550, 3560, 3750 and 4500 models of Cisco Catalyst switches.


Back to Top



Requirements

To perform the steps described in this document, you need to have these items:


Back to Top



HSRP Overview

This section provides an overview on how to use the HSRP in your network.

HSRP is Cisco's standard method which provides high network availability through first-hop redundancy for IP hosts on your LAN, configured with a default gateway IP address. HSRP enables a set of Switch interfaces to work together, to present the appearance of a single virtual Switch or default gateway to the hosts on a LAN. One of the Switches is selected to be the active Switch and another to be the standby Switch, which assumes control of the group MAC address and IP address must be designated as active Switch fail.

This diagram gives you an overview of HSRP Topology in the network. HSRP is configured between two layer 3 switches, Layer 3 Switch1 and Layer 3 Switch2. The configuration shows that Switch1 is configured as an active switch and Switch2 as standby switch.

Config_HSRP_for_Cat_Switches_01.gif


Back to Top



Configure the Switch1

Follow these steps to connect your PC to the Switch1:

Change the IP Address on the PC

Your PC must have a compatible IP address in order to communicate with the switch. Before you change your TCP/IP settings, make note of your current settings.

To configure the IP address on your PC, go to the Start > Settings > Control Panel > Network and Dialup Connections. Right-click on your network connection icon and choose Properties. Select the Internet Protocol (TCP/IP) and click Properties. Enter the IP address and subnet mask that are on the same subnet as the switch. For example, if the switch's IP address is 192.168.10.2, you can give your PC an IP address of 192.168.10.50 and a subnet mask of 255.255.255.0. For more detailed instructions, refer to Configure an IP Address on Your PC.

Connect the PC to the Switch1

Follow these steps to connect your PC to the switch1 with the straight-through Ethernet cable:

  1. Connect one end of a straight-through Ethernet cable to Ethernet port 1 on the front panel of the switch1.

  2. Connect the other end of the Ethernet cable to the Ethernet port on your PC.

    Config_HSRP_for_Cat_Switches_02.gif

  3. Verify that the port status LEDs turn green on both connected Ethernet ports.

Configure HSRP on Switch1

To configure HSRP on Switch1, follow these steps:

Note: If you configure the Switch1 for the first time, refer to Configure the Catalyst Switch with Cisco Network Assistant.

  1. Follow these steps to create a connection to the Switch1 with Telnet.

    1. Click Start > Run.

    2. In the Run dialog box, type cmd or command, and click OK to open a command prompt window.

    3. At the command prompt, type telnet switch-ip-address and press Enter. For switch-ip-address , use the switch IP address that you entered in field L8 of the LAN Addressing Worksheet.

  2. Log into the switch with the switch password that you entered in field S5 of the Switch Port Assignment Worksheet. For more information on how to access the switch, refer to Configure the Catalyst Switch with Cisco Network Assistant.

  3. Type enable and press Enter to enter privileged mode. Enter the enable password that you entered in field S5 of the Switch Port Assignment Worksheet.

    Switch1>enable 
    Switch1#
  4. Type configure terminal and press Enter to enter configuration mode.

    Switch1#configure terminal
    Switch(config)#

    Note: You can configure HSRP on any interface that supports HSRP, which also includes layer 3 Catalyst switches routed ports like Fast Ethernet ports and switch virtual interfaces like Vlan interfaces.

  5. Type interface vlan 20 and press Enter.

    Switch1(config)#interface vlan 20
    Switch1(config-if)#
  6. Type description Default VLAN and press Enter.

    Switch1(config-if)#description Default VLAN
    Switch1(config-if)#
  7. Type standby 1 ip hsrp-ip-address and press Enter. For hsrp-ip-address , use one of the Default network static IP address from the subnet L1A of the LAN Addressing Worksheet. For example, the static IP addresses for the subnet 192.168.10.0 are 192.168.10.11 through 192.168.10.29.

    Switch1(config-if)#standby 1 ip 192.168.10.20
    Switch1(config-if)#

    Note: Your Desktop PC's and Servers must be configured with the Gateway which is same as that of HSRP IP address of the respective VLAN. For example, if your PC is in VLAN 20, configure it with the gateway IP address of 192.168.10.20.

  8. Type standby 1 priority 150 and press Enter.

    Switch1(config-if)#standby 1 priority 150
    Switch1(config-if)#
  9. Type standby 1 preempt and press Enter.

    Switch1(config-if)#standby 1 preempt
    Switch1(config-if)#
  10. Type standby 1 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 1 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  11. Type standby 1 timers hellotime holdtime and press Enter to configure the time between hello packets and the time before other switches declare the active switch to be down.

    Switch1(config-if)#standby 1 timers 5 15
    Switch1(config-if)#

    Note: This example shows how to set the timers on standby group 1 with the time between hello packets at 5 seconds and the time after which a router is considered down to be 15 seconds.

  12. Type exit and press Enter.

    Switch1(config-if)#exit
    Switch1(config)#
  13. Type interface vlan 21 and press Enter.

    Switch1(config)#interface vlan 21
    Switch1(config-if)#
  14. Type description Network Management VLAN and press Enter.

    Switch1(config-if)#description Network Management VLAN
    Switch1(config-if)#
  15. Type standby 2 ip hsrp-ip-address and press Enter. For hsrp-ip-address , use one of the Network Management network static IP address from the subnet L1B of the Management VLAN Worksheet. For example, the static IP addresses for the subnet 192.168.11.0 are 192.168.11.11 through 192.168.11.29.

    Switch1(config-if)#standby 2 ip 192.168.11.20
    Switch1(config-if)#
  16. Type standby 2 priority 150 and press Enter.

    Switch1(config-if)#standby 2 priority 150
    Switch1(config-if)#
  17. Type standby 2 preempt and press Enter.

    Switch1(config-if)#standby 2 preempt
    Switch1(config-if)#
  18. Type standby 2 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 2 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  19. Type standby 2 timers hellotime holdtime and press Enter to configure the time between hello packets and the time before other switches declare the active switch to be down.

    Switch1(config-if)#standby 2 timers 5 15
    Switch1(config-if)#

    Note: This example shows how to set the timers on standby group 2 with the time between hello packets at 5 seconds and the time after which a router is considered down to be 15 seconds.

  20. Type exit and press Enter.

    Switch1(config-if)#exit
    Switch1(config)#
  21. Type interface vlan 22 and press Enter.

    Switch1(config)#interface vlan 22
    Switch1(config-if)#
  22. Type description Secure Server VLAN and press Enter.

    Switch1(config-if)#description Secure Server VLAN
    Switch1(config-if)#
  23. Type standby 3 ip hsrp-ip-address and press Enter. For hsrp-ip-address, use one of the Secure Server network static IP address from the subnet L1C of the Secure Server VLAN Worksheet. For example, the static IP addresses for the subnet 192.168.12.0 are 192.168.12.11 through 192.168.12.29.

    Switch1(config-if)#standby 3 ip 192.168.12.20
    Switch1(config-if)#
  24. Type standby 3 priority 150 and press Enter.

    Switch1(config-if)#standby 3 priority 150
    Switch1(config-if)#
  25. Type standby 3 preempt and press Enter

    Switch1(config-if)#standby 3 preempt
    Switch1(config-if)#
  26. Type standby 3 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 3 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  27. Type standby 3 timers hellotime holdtime and press Enter to configure the time between hello packets and the time before other switches declare the active switch to be down.

    Switch1(config-if)#standby 3 timers 5 15
    Switch1(config-if)#

    Note: This example shows how to set the timers on standby group 3 with the time between hello packets at 5 seconds and the time after which a router is considered down to be 15 seconds:.

  28. Type exit and press Enter.

    Switch1(config-if)#exit
    Switch1(config)#
  29. Type interface vlan 23 and press Enter.

    Switch1(config)#interface vlan 23
    Switch1(config-if)#
  30. Type description 256kbps Guest network and press Enter.

    Switch1(config-if)#description 256kbps Guest network
    Switch1(config-if)#
  31. Type standby 4 ip hsrp-ip-address and press Enter. For hsrp-ip-address , use one of the Guest network static IP address from the subnet L1D of the Guest VLAN Worksheet. For example, the static IP addresses for the subnet 192.168.13.0 are 192.168.12.13 through 192.168.13.29.

    Switch1(config-if)#standby 4 ip 192.168.13.20
    Switch1(config-if)#
  32. Type standby 4 priority 150 and press Enter.

    Switch1(config-if)#standby 4 priority 150
    Switch1(config-if)#
  33. Type standby 4 preempt and press Enter.

    Switch1(config-if)#standby 4 preempt
    Switch1(config-if)#
  34. Type standby 1 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 4 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  35. Type standby 1 timers hellotime holdtime and press Enter to configure the time between hello packets and the time before other switches declare the active switch to be down.

    Switch1(config-if)#standby 4 timers 5 15
    Switch1(config-if)#

    Note: This example shows how to set the timers on standby group 4 with the time between hello packets at 5 seconds and the time after which a router is considered down to be 15 seconds.

  36. Type end and press Enter.

    Switch1(config-if)#end
    Switch1#
  37. Type write memory and press Enter to save your configuration.

    Switch1#write memory
    
  38. To disconnect your PC from the Switch1, remove the Ethernet cable from the port on the PC and the switch. You must restore the TCP/IP settings on your PC to the original values. Refer to Configure an IP Address on Your PC for instructions.


Back to Top



Configure the Switch2

Follow these steps to connect the PC to switch2:

  1. Connect one end of a straight-through Ethernet cable to Ethernet port 1 on the front panel of the Switch2.

  2. Connect the other end of the Ethernet cable to the Ethernet port on your PC.

    Config_HSRP_for_Cat_Switches_03.gif

  3. Verify that the port status LEDs turn green on both connected Ethernet ports.

  4. Make sure your PC is configured with the IP address as that of your Switch2 in the same subnet.

Configure HSRP on Switch2

To configure HSRP on the Switch2, follow these steps:

Note: If you configure the Switch for the first time, refer to Configure the Catalyst Switch with Cisco Network Assistant.

  1. Follow these steps to create a connection to the Switch2 with Telnet.

    1. Click Start > Run.

    2. In the Run dialog box, type cmd or command, and click OK to open a command prompt window.

    3. At the command prompt, type telnet Switch-ip-address and press Enter. For Switch-ip-address , use the Switch IP address that you entered in field L9 of the LAN Addressing Worksheet.

  2. Log into the Switch with the Switch password that you entered in field S5 of the Switch Port Assignment Worksheet. For more information about how to access the Switch, refer to Configure the Catalyst Switch with Cisco Network Assistant.

  3. Type enable and press Enter to enter privileged mode. Enter the enable password that you entered in field S5 of the Switch Port Assignment Worksheet.

    Switch2>enable
    Switch2#
  4. Type configure terminal and press Enter to enter configuration mode.

    Switch2#configure terminal
    Switch2(config)#

    Note: You can configure HSRP on any interface that supports HSRP, including layer 3 Catalyst Switches routed ports like Fast Ethernet ports and Switch virtual interfaces like Vlan interfaces.

  5. Type interface vlan 20 and press Enter.

    Switch2(config)#interface vlan 20
    Switch2(config-if)#
  6. Type description Default VLAN and press Enter.

    Switch2(config-if)#description Default VLAN
    Switch2(config-if)#
  7. Type standby 1 ip hsrp-ip-address and press Enter. For hsrp-ip-address , use one of the Default network static IP address from the subnet L1A of the LAN Addressing Worksheet. For example, the static IP addresses for the subnet 192.168.10.0 are 192.168.10.11 through 192.168.10.29.

    Switch2(config-if)#standby 1 ip 192.168.10.20
    Switch2(config-if)#

    Note: Your Desktop PC's and Servers must be configured with the Gateway which is same as that of HSRP IP address of the respective VLAN. For example, if your PC is in VLAN 20, configure it with the gateway IP address of 192.168.10.20.

  8. Type standby 1 priority 100 and press Enter.

    Switch2(config-if)#standby 1 priority 100
    Switch2(config-if)#
  9. Type standby 1 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 1 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  10. Type exit and press Enter.

    Switch2(config-if)#exit
    Switch2(config)#
  11. Type interface vlan 21 and press Enter.

    Switch2(config)#interface vlan 21
    Switch2(config-if)#
  12. Type description Network Management VLAN and press Enter.

    Switch2(config-if)#description Network Management VLAN
    Switch2(config-if)#
  13. Type standby 2 ip hsrp-ip-address and press Enter. For hsrp-ip-address , use one of the Network Management network static IP address from the subnet L1B of the Management VLAN Worksheet. For example, the static IP addresses for the subnet 192.168.11.0 are 192.168.11.11 through 192.168.11.29.

    Switch2(config-if)#standby 2 ip 192.168.11.20
    Switch2(config-if)#
  14. Type standby 2 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 2 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  15. Type standby 2 priority 100 and press Enter.

    Switch2(config-if)#standby 2 priority 100
    Switch2(config-if)#
  16. Type exit and press Enter.

    Switch2(config-if)#exit
    Switch2(config)#
  17. Type interface vlan 22 and press Enter.

    Switch2(config)#interface vlan 22
    Switch2(config-if)#
  18. Type description Secure Server VLAN and press Enter.

    Switch2(config-if)#description Secure Server VLAN
    Switch2(config-if)#
  19. Type standby 3 ip hsrp-ip-address and press Enter. For hsrp-ip-address , use one of the Secure Server network static IP address from the subnet L1C of the Secure Server VLAN Worksheet. For example, the static IP addresses for the subnet 192.168.12.0 are 192.168.12.11 through 192.168.12.29.

    Switch2(config-if)#standby 3 ip 192.168.12.20
    Switch2(config-if)#
  20. Type standby 3 priority 100 and press Enter.

    Switch2(config-if)#standby 3 priority 100
    Switch2(config-if)#
  21. Type standby 3 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 3 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  22. Type exit and press Enter.

    Switch2(config-if)#exit
    Switch2(config)#
  23. Type interface vlan 23 and press Enter.

    Switch2(config)#interface vlan 23
    Switch2(config-if)#
  24. Type description 256kbps Guest network and press Enter.

    Switch2(config-if)#description 256kbps Guest network
    Switch2(config-if)#
  25. Type standby 4 ip hsrp-ip-address and press Enter. For hsrp-ip-address , use one of the Guest network static IP address from the subnet L1D of the Guest VLAN Worksheet. For example, the static IP addresses for the subnet 192.168.13.0 are 192.168.12.13 through 192.168.13.29.

    Switch2(config-if)#standby 4 ip 192.168.13.20
    Switch2(config-if)#
  26. Type standby 4 priority 100 and press Enter.

    Switch2(config-if)#standby 4 priority 100
    Switch2(config-if)#
  27. Type standby 4 authentication string and press Enter to configure the HSRP authentication.

    Switch1(config-if)#standby 4 authentication Cisco321
    Switch1(config-if)#

    Note: You must configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.

  28. Type end and press Enter.

    Switch2(config-if)#end
    Switch2#
  29. Type write memory and press Enter to save your configuration.

    Switch2#write memory
    
  30. To disconnect your PC from the Switch2, remove the Ethernet cable from the port on the PC and the switch. You need to restore the TCP/IP settings on your PC to the original values. Refer to Configure an IP Address on Your PC for instructions.


Back to Top



Next Step

You have now set up a Guest VLAN on your network.

To make further changes to your switch, refer to the Switch Support Page.

To make further changes to your network, refer to the Configuration Overview page.


Back to Top



Troubleshoot the Procedure

This section provides information about common problems that you may encounter. If this information does not solve your problem, contact the SMB Technical Assistance Center (SMB TAC) for assistance.

Problem

Cause(s) and Suggested Solution(s)

The switch boots and displays several error messages but does not display a prompt in HyperTerminal.

Press Enter to clear the output and display the switch prompt.

For further assistance, contact the SMB Technical Assistance Center (SMB TAC).

HSRP Standby switch does not come up when the HSRP active switch goes down

If authentication is configured, then make sure you configure the same authentication string on all the switches configured for HSRP. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and timer values from other switches configured with HSRP.


Back to Top



Related Information

Service Requests

  Open a service request
  Update a service request

Feedback

Please rate this site:
++ + +/- - --

Suggestions for improvement:




If Cisco may contact you for more details
or for future feedback opportunities,
please enter your contact information:

Full Name:
Email:



© 1992-2006 Cisco Systems, Inc. All rights reserved. Terms and Conditions, Privacy Statement, Cookie Policy and Trademarks of Cisco Systems, Inc.