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.
To perform the steps described in this document, you need to have these
items:
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.
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.
Follow these steps to connect your PC to the switch1 with the
straight-through Ethernet cable:
-
Follow these steps to create a connection to the Switch1 with
Telnet.
-
Click Start >
Run.
-
In the Run dialog box, type cmd or command, and
click OK to open a command prompt window.
-
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.
-
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.
-
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#
-
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.
-
Type interface vlan 20 and press
Enter.
Switch1(config)#interface vlan 20
Switch1(config-if)#
-
Type description Default VLAN and press
Enter.
Switch1(config-if)#description Default VLAN
Switch1(config-if)#
-
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.
-
Type standby 1 priority 150 and press
Enter.
Switch1(config-if)#standby 1 priority 150
Switch1(config-if)#
-
Type standby 1 preempt and press
Enter.
Switch1(config-if)#standby 1 preempt
Switch1(config-if)#
-
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.
-
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.
-
Type exit and press
Enter.
Switch1(config-if)#exit
Switch1(config)#
-
Type interface vlan 21 and press
Enter.
Switch1(config)#interface vlan 21
Switch1(config-if)#
-
Type description Network Management VLAN and press
Enter.
Switch1(config-if)#description Network Management VLAN
Switch1(config-if)#
-
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)#
-
Type standby 2 priority 150 and press
Enter.
Switch1(config-if)#standby 2 priority 150
Switch1(config-if)#
-
Type standby 2 preempt and press
Enter.
Switch1(config-if)#standby 2 preempt
Switch1(config-if)#
-
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.
-
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.
-
Type exit and press
Enter.
Switch1(config-if)#exit
Switch1(config)#
-
Type interface vlan 22 and press
Enter.
Switch1(config)#interface vlan 22
Switch1(config-if)#
-
Type description Secure Server VLAN and press
Enter.
Switch1(config-if)#description Secure Server VLAN
Switch1(config-if)#
-
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)#
-
Type standby 3 priority 150 and press
Enter.
Switch1(config-if)#standby 3 priority 150
Switch1(config-if)#
-
Type standby 3 preempt and press
Enter
Switch1(config-if)#standby 3 preempt
Switch1(config-if)#
-
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.
-
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:.
-
Type exit and press
Enter.
Switch1(config-if)#exit
Switch1(config)#
-
Type interface vlan 23 and press
Enter.
Switch1(config)#interface vlan 23
Switch1(config-if)#
-
Type description 256kbps Guest network and press
Enter.
Switch1(config-if)#description 256kbps Guest network
Switch1(config-if)#
-
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)#
-
Type standby 4 priority 150 and press
Enter.
Switch1(config-if)#standby 4 priority 150
Switch1(config-if)#
-
Type standby 4 preempt and press
Enter.
Switch1(config-if)#standby 4 preempt
Switch1(config-if)#
-
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.
-
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.
-
Type end and press
Enter.
Switch1(config-if)#end
Switch1#
-
Type write memory and press Enter
to save your configuration.
Switch1#write memory
-
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.
-
Follow these steps to create a connection to the Switch2 with
Telnet.
-
Click Start >
Run.
-
In the Run dialog box, type cmd or
command, and click OK to open a command
prompt window.
-
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.
-
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.
-
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#
-
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.
-
Type interface vlan 20 and press
Enter.
Switch2(config)#interface vlan 20
Switch2(config-if)#
-
Type description Default VLAN and press
Enter.
Switch2(config-if)#description Default VLAN
Switch2(config-if)#
-
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.
-
Type standby 1 priority 100 and press
Enter.
Switch2(config-if)#standby 1 priority 100
Switch2(config-if)#
-
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.
-
Type exit and press
Enter.
Switch2(config-if)#exit
Switch2(config)#
-
Type interface vlan 21 and press
Enter.
Switch2(config)#interface vlan 21
Switch2(config-if)#
-
Type description Network Management VLAN and press
Enter.
Switch2(config-if)#description Network Management VLAN
Switch2(config-if)#
-
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)#
-
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.
-
Type standby 2 priority 100 and press
Enter.
Switch2(config-if)#standby 2 priority 100
Switch2(config-if)#
-
Type exit and press
Enter.
Switch2(config-if)#exit
Switch2(config)#
-
Type interface vlan 22 and press
Enter.
Switch2(config)#interface vlan 22
Switch2(config-if)#
-
Type description Secure Server VLAN and press
Enter.
Switch2(config-if)#description Secure Server VLAN
Switch2(config-if)#
-
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)#
-
Type standby 3 priority 100 and press
Enter.
Switch2(config-if)#standby 3 priority 100
Switch2(config-if)#
-
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.
-
Type exit and press
Enter.
Switch2(config-if)#exit
Switch2(config)#
-
Type interface vlan 23 and press
Enter.
Switch2(config)#interface vlan 23
Switch2(config-if)#
-
Type description 256kbps Guest network and press
Enter.
Switch2(config-if)#description 256kbps Guest network
Switch2(config-if)#
-
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)#
-
Type standby 4 priority 100 and press
Enter.
Switch2(config-if)#standby 4 priority 100
Switch2(config-if)#
-
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.
-
Type end and press
Enter.
Switch2(config-if)#end
Switch2#
-
Type write memory and press Enter
to save your configuration.
Switch2#write memory
-
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.
You have now set up a Guest VLAN on your network.
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.