0% found this document useful (0 votes)
17 views25 pages

HSRP Configuration and Functionality Guide

This document provides a lesson on configuring and understanding Hot Standby Routing Protocol (HSRP) in a network topology involving multilayer switches and a virtual gateway. It details the configuration steps, states of HSRP, and commands to verify the setup, including the use of virtual IP and MAC addresses. The lesson also covers the active and standby roles of routers and how to troubleshoot HSRP configurations.

Uploaded by

elamine perso
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views25 pages

HSRP Configuration and Functionality Guide

This document provides a lesson on configuring and understanding Hot Standby Routing Protocol (HSRP) in a network topology involving multilayer switches and a virtual gateway. It details the configuration steps, states of HSRP, and commands to verify the setup, including the use of virtual IP and MAC addresses. The lesson also covers the active and standby roles of routers and how to troubleshoot HSRP configurations.

Uploaded by

elamine perso
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial

Search … 

HSRP (Hot Standby Routing


Protocol)
Lesson Contents

1. Configurations
1.1. Active Gateway Election
1.2. Preemption
1.3. Authentication
1.4. HSRP Timers
1.5. HSRP Version 1 and 2
1.6. Object (Interface) Tracking
2. Conclusion

In this lesson, I will explain how HSRP (Hot Standby Routing Protocol)
works and how to configure it. If you have no idea what virtual
gateways are about then make sure to read my introduction lesson
first.

Here’s the topology I will use:


Lessons 

[Link] 1/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial

Here’s what we have:

SW1 and SW2 are multilayer switches. The [Link]/24 subnet


belongs to VLAN 1 and there is one host device.
There is a layer two switch between SW1, SW2, and H1 to connect
the [Link]/24 segment.
IP address [Link] will be used for the virtual gateway
address.
The multilayer switches are connected with layer three interfaces
Lessons 

to an upstream router called R3.

Let’s look at the configuration.

1. Configurations
[Link] 2/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

Configurations
Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
Want to try this example yourself? Here, you will find the startup
configuration of each device.

H1
hostname H1
!
no ip routing
!
interface GigabitEthernet0/1
ip address [Link] [Link]
no ip route-cache
duplex auto
speed auto
media-type rj45
!
ip default-gateway [Link]
!
end

R3
hostname R3
!
interface GigabitEthernet0/1
ip address [Link] [Link]
duplex auto
speed auto
media-type rj45
!
Lessons 

interface GigabitEthernet0/2
ip address [Link] [Link]
duplex auto
speed auto
media-type rj45

[Link] 3/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

!
Get Unlimited Access to 812 Cisco Lessons Now
end Get $1 Trial

SW1
hostname SW1
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
no switchport
ip address [Link] [Link]
negotiation auto
!
interface Vlan1
ip address [Link] [Link]
!
end

SW2
hostname SW2
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
no switchport
ip address [Link] [Link]
Lessons 

negotiation auto
!
interface Vlan1
ip address [Link] [Link]
!
end

[Link] 4/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

The first thing we’ll do is enable HSRP. We will do this on the VLAN 1
Get Unlimited
interfaces Access
of SW1 to 812 Cisco Lessons Now
and SW2: Get $1 Trial

SW1 & SW2


(config)#interface Vlan 1
(config-if)#standby 1 ip [Link]

Use the standby command to configure HSRP. [Link] will be


the virtual gateway IP address. The “1” is the group number for HSRP. It
doesn’t matter what you pick just make sure it’s the same on both
devices. On your console, you’ll see something like this:

SW1#
%HSRP-5-STATECHANGE: Vlan1 Grp 1 state Standby ->
Listen
%HSRP-5-STATECHANGE: Vlan1 Grp 1 state Speak ->
Standby

SW2#
%HSRP-5-STATECHANGE: Vlan1 Grp 1 state Standby ->
Active

Depending on which switch you configured first, you’ll see these


messages. One of the switches will be the active gateway, and the other
one will go into standby mode. Let’s see if we can reach this virtual
gateway from our host:

H1#ping [Link]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to [Link],
Lessons 

timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip
min/avg/max = 6/206/1007 ms

As you can see, we can successfully reach the virtual gateway IP


address.

[Link] 5/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

That wasn’t too bad, right? Only one command and HSRP works! There
Get
are Unlimited
a couple ofAccess to 812
other things weCisco
have Lessons [Link]
to look at,Now $1 Trial
We use
[Link] as the virtual IP address, but what MAC address will it
use?

SW1#show ip arp | include 1.254


Internet [Link] 1 0000.0c07.ac01
ARPA GigabitEthernet0/1

You can see the MAC address of [Link] in the ARP table. Where
did this MAC address come from?

0000.0c07.ac01 is the MAC address that we have. HSRP uses the


[Link] MAC address where XX is the HSRP group number.
In my example, I configured HSRP group number 1. There are a couple
of other interesting things to check. Take a look below:

SW1#show standby
Vlan1 - Group 1
State is Standby
3 state changes, last state change 00:03:33
Virtual IP address is [Link]
Active virtual MAC address is 0000.0c07.ac01 (MAC
Not In Use)
Local virtual MAC address is 0000.0c07.ac01 (v1
default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.144 secs
Preemption disabled
Active router is [Link], priority 100
(expires in 7.776 sec)
Standby router is local
Lessons 

Priority 100 (default 100)


Group name is "hsrp-Vl1-1" (default)

SW2#show standby
Vlan1 - Group 1
State is Active

[Link] 6/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

2 state changes, last state change 00:04:25


Get Unlimited
Virtual IPAccess to 812isCisco
address Lessons Now
[Link] Get $1 Trial
Active virtual MAC address is 0000.0c07.ac01 (MAC
In Use)
Local virtual MAC address is 0000.0c07.ac01 (v1
default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.992 secs
Preemption disabled
Active router is local
Standby router is [Link], priority 100
(expires in 10.640 sec)
Priority 100 (default 100)
Group name is "hsrp-Vl1-1" (default)

Use the show standby command to verify your configuration. There


are a couple of interesting things here:

We can see the virtual IP address here ([Link]).


It also shows the virtual MAC address (0000.0c07.ac01).
You can see which router is active or in standby mode.
The hello time is 3 seconds, and the hold time is 10 seconds.
Preemption is disabled.

The active router will respond to ARP requests from computers, and it
will be actively forwarding packets from them. It will send hello
messages to the routers that are in standby mode. Routers in standby
mode will listen to the hello messages, if they don’t receive anything
from the active router, they will wait for the hold time to expire before
taking over. The hold time is 10 seconds by default which is pretty slow;
we’ll see how to speed this up in a bit.

Each HSRP router will go through several states before it ends up as an


Lessons 

active or standby router. This is what will happen:

State Explanation

Initial This is the first state when HSRP starts. You’ll see
this just after you configured HSRP or when the

[Link] 7/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

interface just got enabled.


Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
The router knows the virtual IP address and will
Listen
listen for hello messages from other HSRP routers.

The router will send hello messages and join the


Speak election to see which router will become active or
standby.

The router didn’t become the active router but will


Standby keep sending hello messages. If the active router
fails, it will take over.

The router will actively forward packets from


Active
clients and send hello messages.

We can see all these steps with a debug command. Let’s shut the VLAN
1 interfaces first so that we can restart HSRP:

SW1 & SW2


(config)#interface Vlan 1
(config-if)#shutdown

Now use the debug standby events command:

SW1 & SW2


#debug standby events
HSRP Events debugging is on

Now, we will enable the VLAN 1 interface on SW1 first:


Lessons 

SW1
(config)#interface Vlan 1
(config-if)#no shutdown

Here’s what you will see on SW1:

[Link] 8/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

SW1#
Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
HSRP: Vl1 Interface UP
HSRP: Vl1 Starting minimum intf delay (1 secs) -
uptime 997
HSRP: Vl1 Intf min delay expired - uptime 998
HSRP: Vl1 Grp 1 Init: a/HSRP enabled
HSRP: Vl1 Grp 1 Init -> Listen
HSRP: Vl1 Grp 1 Redundancy "hsrp-Vl1-1" state Init -
> Backup
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Init ->
Backup
HSRP: Vl1 Grp 1 Listen: d/Standby timer expired
(unknown)
HSRP: Vl1 Grp 1 Listen -> Speak
HSRP: Vl1 Grp 1 Redundancy "hsrp-Vl1-1" state Backup
-> Speak
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Backup
-> Speak
HSRP: Vl1 Grp 1 Speak: d/Standby timer expired
(unknown)
HSRP: Vl1 Grp 1 Standby router is local
HSRP: Vl1 Grp 1 Speak -> Standby
HSRP: Vl1 Grp 1 Redundancy "hsrp-Vl1-1" state Speak
-> Standby
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" standby,
unknown -> local
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Speak -
> Standby
HSRP: Vl1 Grp 1 Standby: c/Active timer expired
(unknown)
HSRP: Vl1 Grp 1 Active router is local
HSRP: Vl1 Grp 1 Standby router is unknown, was local
Lessons 

HSRP: Vl1 Grp 1 Standby -> Active


HSRP: Vl1 Grp 1 Redundancy "hsrp-Vl1-1" state
Standby -> Active
HSRP: Vl1 Grp 1 Added [Link] to ARP
(0000.0c07.ac01)
HSRP: Vl1 Grp 1 Activating MAC 0000.0c07.ac01
HSRP: Vl1 Grp 1 Adding 0000.0c07.ac01 to MAC address

[Link] 9/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

filter - resetting the interface


Get Unlimited
HSRP: Access
Vl1 IP to 812 Cisco
Redundancy Lessons Now
"hsrp-Vl1-1" Get $1
standby, Trial
local
-> unknown
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Standby
-> Active
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Active
-> Active

Above, you can clearly see the different states we go through before we
end up in the active state. Right now, SW1 is the only switch that is
running HSRP, so let’s enable the VLAN 1 interface of SW2 as well:

SW2(config)#interface Vlan 1
SW2(config-if)#no shutdown

Here’s the debug output:

SW2#
HSRP: Vl1 Grp 1 Active router is [Link]
HSRP: Vl1 Nbr [Link] created
HSRP: Vl1 Nbr [Link] active for group 1
HSRP: Vl1 Interface UP
HSRP: Vl1 Starting minimum intf delay (1 secs) -
uptime 1089
HSRP: Vl1 Intf min delay expired - uptime 1090
HSRP: Vl1 Grp 1 Init: a/HSRP enabled
HSRP: Vl1 Grp 1 Init -> Listen
HSRP: Vl1 Grp 1 Redundancy "hsrp-Vl1-1" state Init -
> Backup
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Init ->
Backup
Lessons 

HSRP: Vl1 Grp 1 Listen: d/Standby timer expired


(unknown)
HSRP: Vl1 Grp 1 Listen -> Speak
HSRP: Vl1 Grp 1 Redundancy "hsrp-Vl1-1" state Backup
-> Speak
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Backup
-> Speak

[Link] 10/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

HSRP: Vl1 Grp 1 Speak: d/Standby timer expired


Get Unlimited Access to 812 Cisco Lessons Now
(unknown) Get $1 Trial
HSRP: Vl1 Grp 1 Standby router is local
HSRP: Vl1 Grp 1 Speak -> Standby
HSRP: Vl1 Grp 1 Redundancy "hsrp-Vl1-1" state Speak
-> Standby
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" standby,
unknown -> local
HSRP: Vl1 IP Redundancy "hsrp-Vl1-1" update, Speak -
> Standby

Above, we can see that SW2 is seeing [Link] (SW1) as the active
router. Eventually, it ends up in the standby state.

1.1. Active Gateway Election


Why did SW2 go into standby mode instead of SW1?

By default, the switch with the highest priority will become the active
HSRP device. If the priority is the same, then the highest IP address
will be the tie-breaker. Let’s take a look at the priorities:

SW1#show standby | include Priority


Priority 100 (default 100)

SW2#show standby | include Priority


Priority 100 (default 100)

The priority is the same on both switches. SW2 has a higher IP address,
so it should become the active router, but it’s not. Let’s try increasing its
priority:
Lessons 

SW2(config)#interface Vlan 1
SW2(config-if)#standby 1 priority 150

Here’s how we can verify the new priority:

[Link] 11/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

SW2#show standby | include Priority


Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
Priority 150 (configured 150)

SW2#show standby | include Active


Active virtual MAC address is 0000.0c07.ac01 (MAC
Not In Use)
Active router is [Link], priority 100
(expires in 9.232 sec)

Even though SW2 has a higher priority, SW1 remains the active router.
Another useful command to verify which router is active or standby is
the show standby brief command:

SW1#show standby brief


P indicates configured to
preempt.
|
Interface Grp Pri P State Active
Standby Virtual IP
Vl1 1 100 Active local
[Link] [Link]

SW2#show standby brief


P indicates configured to
preempt.
|
Interface Grp Pri P State Active
Standby Virtual IP
Vl1 1 150 Standby [Link] local
[Link]
Lessons 

We can confirm that SW2 has a higher priority, but SW1 is still active.
Once HSRP has decided which device should be active, it will stay
active until it goes down. We can overrule this if we want, though…

1.2. Preemption
[Link] 12/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

When we enable preemption, the switch with the highest priority (or IP
Get Unlimited
address in caseAccess to 812
the priority Cisco
is the Lessons
same) Get the
Now become
will always $1new
Trial
active device. Here’s how to enable this:

SW1 & SW2


(config)#interface Vlan 1
(config-if)#standby 1 preempt

Let’s see if it makes any difference:

SW1#show standby brief


P indicates configured to
preempt.
|
Interface Grp Pri P State Active
Standby Virtual IP
Vl1 1 100 P Standby [Link] local
[Link]

SW2#show standby brief


P indicates configured to
preempt.
|
Interface Grp Pri P State Active
Standby Virtual IP
Vl1 1 150 P Active local
[Link] [Link]

There goes…SW2 is now active, and SW1 goes to standby!

By default, preemption will take effect immediately, but it might be a


Lessons 

good idea to use a delay. If a router reboots it might need some time to
“converge”. Maybe OSPF or EIGRP need to form neighbor adjacencies
or spanning tree isn’t ready yet unblocking ports. If you want to add a
delay, then you can do it like this:

[Link] 13/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

SW1 & SW2


Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
(config)#interface Vlan 1
(config-if)#standby 1 preempt delay minimum 60

This will delay the preemption by 60 seconds.

1.3. Authentication
HSRP also supports authentication. You can choose between plaintext
or MD5 authentication. Here’s how to configure MD5:

SW1 & SW2


(config)#interface Vlan 1
(config-if)#standby 1 authentication md5 key-string
MY_SECRET_KEY

This ensures that all packets sent between the two switches are
authenticated. This prevents someone on the [Link]/24 subnet
from joining our HSRP setup.

1.4. HSRP Timers


By default, HSRP is pretty slow. SW1 is my standby router, and it will
wait for 10 seconds (hold time) before it will become active once SW2
fails. That means we’ll have 10 seconds of downtime…let’s see if we can
speed that up:

SW1(config-if)#standby 1 timers ?
<1-254> Hello interval in seconds
msec Specify hello interval in milliseconds
Lessons 

We can speed things up by changing the standby timers command.


We can even use millisecond values. Let’s try this:

SW1 & SW2


(config)#interface Vlan 1
(config-if)#standby 1 timers msec 100 msec 300

[Link] 14/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

I’ve set the hello time to 100 milliseconds and the hold timer to 300
Get UnlimitedMake
milliseconds. Access toyour
sure 812hold
Ciscotime
Lessons Now
is at least threeGet $1the
times Trial
hello timer. Let’s verify our work:

SW1#show standby | include time


Hello time 100 msec, hold time 300 msec

SW2#show standby | include time


Hello time 100 msec, hold time 300 msec

1.5. HSRP Version 1 and 2


There are two versions of HSRP, and depending on the router or switch
model, you might have the option to use HSRP version 2. You can
change the version by using the standby version command.

HSRPv1 HSRPv2

Group
0 – 255 0 – 4095
Numbers

Virtual MAC [Link] (XX [Link] (XXX


address = group number) = group number)

Multicast
[Link] [Link]
Address

Let’s try switching our devices to HSRP version 2:

SW1 & SW2


Lessons 

(config)#interface Vlan 1
(config-if)#standby version 2

SW1#show standby | include version


Vlan1 - Group 1 (version 2)

[Link] 15/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

That’s all there is to it.


Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
1.6. Object (Interface) Tracking
There is one more thing we need to look at, and it’s called object
(interface) tracking. Take a look at the following picture:

In the picture above, SW2 is the active router because we changed the
priority to 150. That’s great, but what if the interface on SW2 to R3 fails?
Lessons 

It will be the active router, but it doesn’t have a direct path to R3


anymore.

When this happens, it will send an ICMP redirect to the computer. It


would be better if SW1 becomes the active HSRP router in case this
happens.

[Link] 16/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

HSRP offers a feature called interface tracking. We can select an


Get Unlimited
interface Access
to track, toit812
and if fails,Cisco Lessons
we will [Link]
give it aNow This $1
way,Trial
your
priority will decrease, and another device can become the active
router.

Make sure you have enabled preemption if you want to use interface
tracking. Here’s an example:

SW2(config)track 1 interface GigabitEthernet 0/2


line-protocol

First, we configure object tracking for the GigabitEthernet 0/2 interface.


When the line-protocol changes (goes down), then the object state will
change.

We can now use this object with HSRP:

SW2(config)#interface Vlan 1
SW2(config-if)#standby 1 track 1 ?
decrement Priority decrement
shutdown Shutdown group

We can decrease the priority, or you can decide to shut down the entire
HSRP group in case the interface is down. Let’s try decrementing the
priority:

SW2(config-if)#standby 1 track 1 decrement 60

Let’s try this out:

SW2(config)#interface GigabitEthernet 0/2


Lessons 

SW2(config-if)#shutdown

Here’s what we will see on SW2:

SW2#
%TRACK-6-STATE: 1 interface Gi0/2 line-protocol Up -

[Link] 17/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

> Down
Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
The interface goes down, so the state of our object changes. Let’s see if
the priority has decreased:

SW2#show standby | include Priority


Priority 90 (configured 150)

SW2#show standby | include Active


Active virtual MAC address is 0000.0c9f.f001 (MAC
Not In Use)
Active router is [Link], priority 100
(expires in 0.352 sec)

You can see the priority is now 90 instead of the 150 that we
configured.
The priority is now 90, which is lower than SW1 (100). As a result, SW2
will go to the standby state, and SW1 will move to the active state.
Interface tracking is useful but it will only check the state of the
interface. It’s possible that the interface remains in the up state but
that we cannot reach R3. It might be a better idea to use IP SLA instead
since it can check end-to-end connectivity.

Let’s remove the current object tracking configuration:

SW2(config)#interface GigabitEthernet 0/2


SW2(config-if)#no shutdown
SW2(config-if)#no standby 1 track 1 decrement 60

And configure IP SLA to ping the IP address of R3:


Lessons 

SW2(config)#ip sla 1
SW2(config-ip-sla)#icmp-echo [Link]
SW2(config-ip-sla-echo)#frequency 10

SW2(config)#ip sla schedule 1 start-time now life


forever

[Link] 18/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

We can now combine IP SLA with object tracking:


Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
SW2(config)#no track 1
SW2(config)#track 1 ip sla 1

We’ll configure SW2 once again so that the priority will decrease by 60
when the object is down:

SW2(config)#interface Vlan 1
SW2(config-if)#standby 1 track 1 decrement 60

Let’s test our configuration. First, we want to make sure that IP SLA is
working:

SW2#show ip sla statistics


IPSLAs Latest Operation Statistics

IPSLA operation id: 1


Latest RTT: 3 milliseconds
Latest operation start time: 13:31:57 UTC Thu Feb 18
2016
Latest operation return code: OK
Number of successes: 7
Number of failures: 0
Operation time to live: Forever

IP SLA is up and running. Let’s shut the GigabitEthernet 0/2 interface on


SW2 again so that IP SLA will fail:

SW2(config)#interface GigabitEthernet 0/2


SW2(config-if)#shutdown
Lessons 

Let’s check the current priority:

SW2#show standby | include Priority


Priority 90 (configured 150)

[Link] 19/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

The priority has decreased, which will cause SW1 to become the active
Get Unlimited Access to 812 Cisco Lessons Now
router: Get $1 Trial

SW2#show standby | include Active


Active virtual MAC address is 0000.0c9f.f001 (MAC
Not In Use)
Active router is [Link], priority 100
(expires in 0.288 sec)

That’s all there is to it.

Configurations
Want to take a look for yourself? Here, you will find the final
configuration of each device.

H1
hostname H1
!
no ip routing
!
interface GigabitEthernet0/1
ip address [Link] [Link]
no ip route-cache
duplex auto
speed auto
media-type rj45
!
ip default-gateway [Link]
!
end
Lessons 

R3
hostname R3
!
interface GigabitEthernet0/1

[Link] 20/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

ip address [Link] [Link]


Getduplex
Unlimited Access to 812 Cisco Lessons Now
auto Get $1 Trial
speed auto
media-type rj45
!
interface GigabitEthernet0/2
ip address [Link] [Link]
duplex auto
speed auto
media-type rj45
!
end

SW1
hostname SW1
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
no switchport
ip address [Link] [Link]
negotiation auto
!
interface Vlan1
ip address [Link] [Link]
standby version 2
standby 1 ip [Link]
standby 1 timers msec 100 msec 300
standby 1 preempt delay minimum 60
standby 1 authentication md5 key-string
Lessons 

MY_SECRET_KEY
!
end

SW2

[Link] 21/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

hostname SW2
Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial
!
track 1 ip sla 1
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
no switchport
ip address [Link] [Link]
negotiation auto
!
interface Vlan1
ip address [Link] [Link]
standby version 2
standby 1 ip [Link]
standby 1 timers msec 100 msec 300
standby 1 priority 150
standby 1 preempt delay minimum 60
standby 1 authentication md5 key-string
MY_SECRET_KEY
standby 1 track 1 decrement 60
!
ip sla 1
icmp-echo [Link]
frequency 10
ip sla schedule 1 life forever start-time now
!
end

2. Conclusion
Lessons 

You have now seen how to configure HSRP, how to enable


authentication, and how to “tune” some of its parameters. I hope this
has been useful. Share it with your friends and/or colleagues. If you
have any questions, feel free to leave a comment in our forum.

[Link] 22/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

Get Unlimited Access to 812 Cisco Lessons Now Get $1 Trial

« Previous Lesson
Introduction to Gateway
Redundancy
Next Lesson
Virtual Router Redundancy
Protocol
»
 Tags: Gateway

Forum Replies

ramonsito

hi Rene
at the beginning of the lab, i wasn’t able to issue the following commands

SwitchA(config)#interface fa0/17
SwitchA(config-if)#standby 1 ip [Link]

the thing is SwitchA does not have the option standby under interface, not
unless i convert this interface as a layer 3 int with command “no switchport”,
then it has the option, but when i try to type the following command

standby 1 ip [Link]

then it give me the error that overlaps with vlan 1, and this is because the
layer 3 interface does not belong to any vlan, can you please advice.

or should i

... Continue reading in our forum


Lessons 

ReneMolenaar

Hi Ramon,

[Link] 23/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

You can only use configure HSRP / VRRP / GLBP on “routed” (L3) interfaces,
Getnot
Unlimited Access
on switchports to 812 Cisco Lessons Now
(L2 interfaces). Get $1 Trial
You have two options:

1. Configure the standby commands on the VLAN interface, all


switchports that are in the same VLAN will be able to reach the virtual
IP address.
or

2. Make a switchport a “routed” interface by using “no switchport” and


configure the standby commands on this interface. In this case only
devices that are connected to this interface will be able to reach the
virtual IP address.
The reason you get the overlapping error is beca

... Continue reading in our forum

benedictadjei

Hi Rene i lab this on a real cisco equipments and the lab was awesome thank
you very much. Please can you make a video training on how to setup a
complete ACS server and snmp configuration for a newly cisco switch/router.
Moreover, we will like to see more of a recommended way of designing and
implementing cisco configuration a network thank you.

ReneMolenaar

Hi Princek,

I’ll probably do some ACS tutorials/videos. I’m currently adding some ASA
tutorials and ACS will be a nice addon. I already have a lesson for SNMPv3 on
Cisco IOS router:
Lessons 

[Link]
snmpv3-on-cisco-ios-router/

About the designing part, anything in particular you are looking for? There’s a
lot to cover when it comes to network design.

[Link] 24/25
6/28/25, 2:43 PM HSRP (Hot Standby Routing Protocol)

Get Unlimitedalok1902
Access to 812 Cisco Lessons Now Get $1 Trial

Hey,
In above example, why choose layer 3 switches instead of routers? Also, IP
SLA pings forever but at what time interval ping occurs?

Thanks,
AD

 201 more replies! Ask a question or join the discussion by visiting


our Community Forum

Disclaimer Privacy Policy Support About

© 2013 - 2025 [Link]

Lessons 

[Link] 25/25

You might also like