The steps to configure HSRP are listed In figures
–
.
Configure HSRP Group on an Interface
While running HSRP, it is
important that the end-user stations do not discover the actual MAC addresses
of the routers in the standby group. Any protocol that informs a host of the
router actual address must be disabled. To ensure that the actual addresses of
the participating HSRP routers are not discovered, enabling HSRP on a Cisco
router interface automatically disables ICMP redirects on that interface.
After the standby ip command is issued, the interface
changes to the appropriate state. When the router successfully executes the
command, the router issues an HSRP message.
To remove an interface from
an HSRP group, enter the no standbygroup ip
command
.
Verifying HSRP Configuration
The following example states that
interface VLAN10 is a member of the HSRP standby group 47, the virtual router
IP address for that group is 172.16.10.110, and that ICMP redirects are
disabled:
Switch#show
running-config
Building
configuration...
Current
configuration:
!
(text
deleted)
interface
Vlan10
ip address 172.16.10.82
255.255.255.0
no ip redirects
standby 47 ip
172.16.10.110
!
Another means of
verifying the HSRP configuration is with the command
:
Switch#show standby brief
This
command displays abbreviated information about the current state of all HSRP
operations on this device.
Establish HSRP Priorities
Each
standby group has its own active and standby routers. The network administrator
can assign a priority value to each router in a standby group, allowing the
administrator to control the order in which active routers for that group are
selected
.
To set
the priority value of a router, enter this command in interface configuration
mode
:
Switch(config-if)#standby group-number
priority priority-value
During the
election process, the router in an HSRP group with the highest priority becomes
the forwarding router. In the case of a tie, the router with the highest
configured IP address will become active.
To reinstate the default
standby priority value, enter the no standby priority
command.
Verify the HSRP Standby Priority
The following example states
that interface VLAN10 has a priority value of 150 in HSRP standby group 47. If
this priority value is the highest number in that HSRP standby group, the
routing device on which this interface resides is the active router for that
group.
Switch#show
running-config
Building
configuration...
Current
configuration:
!
(text
deleted)
interface
Vlan10
ip address 172.16.10.32
255.255.255.0
no ip redirects
standby 47
priority 150
standby 47 ip 172.16.10.110
To display the status of the HSRP router, enter one of these commands:
Switch#show standby [interface [group]]
[active | init | listen |
standby][brief]
Switch#show standby delay
[type-number]
If the optional interface
parameters are not indicated, the show standby command displays HSRP
information for all interfaces.
Verify all HSRP
Operations
This example shows the output of the show
standby command:
Switch#show standby Vlan10
47
Vlan11 - Group
47
Local state is Active, priority 150, may
preempt
Hellotime 3 holdtime 10
Next hello
sent in 00:00:02.944
Hot standby IP address is 172.16.10.110
configured
Active router is local
Standby
router is 172.16.10.82 expires in 00:00:08
Standby virtual mac
address is 0000.0c07.ac2f
Tracking interface states for 1
interface, 1 up:
Up Vlan51 Priority decrement:
40
This is an example of the output resulting when you
specify the brief parameter:
Switch#show standby brief
Interface Grp Prio P State Active addr Standby addr Group
addr
Vl10 47 150 P Active local 172.16.10.82
172.16.11.10
Vl12 12 100 Standby 172.16.102.82 local
172.16.12.10
HSRP Standby Preempt
The standby
router automatically assumes the active router role when the active router
fails or is removed from service. This new active router remains the forwarding
router even when the former active router with the higher priority regains
service in the network.
The former active router can be configured to
resume the forwarding router role from a router with a lower priority
. To enable a
router to resume the forwarding router role, enter the following command in
interface configuration mode:
Switch(config-if)#standby [group-number]
preempt [{delay} [minimum delay] [sync
delay]]
When the standby preempt
command is issued, the interface changes to the appropriate state.
To
remove the interface from preemptive status, enter the no standbygroup preempt command.
Example: Displaying HSRP Preempt
The following example states
that interface VLAN10 is configured to resume its role as the active router in
HSRP group 47, assuming that interface VLAN10 on this router has the highest
priority in that standby group.
Switch#show running-config
Building configuration...
Current
configuration:
!
(text
deleted)
interface
Vlan10
ip address 172.16.10.82
255.255.255.0
no ip redirects
standby 47
priority 150
standby 47 preempt
standby 47 ip
172.16.10.110