15.1.3 Lab - Implement HSRP - ILM
15.1.3 Lab - Implement HSRP - ILM
Instructor Note: Red font color or gray highlights indicate text that appears in the instructor copy only.
Topology
Addressing Table
Device Interface IP Address Default Gateway
D1 Lo 0 192.168.1.1/24 N/A
D1 Lo 0 2001:db8:acad:1000::1/64 N/A
D1 VLAN 11 10.11.0.1/24 N/A
D1 VLAN 11 2001:db8:acad:11::1/64 N/A
D1 VLAN 21 10.21.0.1/24 N/A
D1 VLAN 21 2001:db8:acad:21::1/64 N/A
D2 Lo 0 192.168.1.1/24 N/A
D2 Lo 0 2001:db8:acad:1000::1/64 N/A
D2 VLAN 11 10.11.0.2/24 N/A
D2 VLAN 11 2001:db8:acad:11::1/64 N/A
D2 VLAN 21 10.21.0.2/24 N/A
D2 VLAN 21 2001:db8:acad:21::2/64 N/A
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 26 www.netacad.com
Lab - Implement HSRP
Objectives
Part 1: Build the Network and Configure Basic Device Settings and Interface Addressing
Part 2: Configure and Observe HSRP for IPv4 and IPv6
Part 3: Configure and Observe HSRP Authentication
Part 4: Configure and Observe HSRP Object Tracking
Background / Scenario
Hot Standby Router Protocol (HSRP) is a Cisco-proprietary redundancy protocol for establishing a fault-
tolerant default gateway. It is described in RFC 2281. HSRP provides a transparent failover mechanism to the
end stations on the network. This provides users at the access layer with uninterrupted service to the network
if the primary gateway becomes inaccessible.
Note: This lab is an exercise in deploying and verifying HSRP and does not necessarily reflect networking
best practices.
Note: The switches used with CCNP hands-on labs are Cisco 3650 with Cisco IOS XE release 16.9.4
(universalk9 image) and Cisco 2960 with IOS release 15.2 (lanbase image). Other routers and Cisco IOS
versions can be used. Depending on the model and Cisco IOS version, the commands available and the
output produced might vary from what is shown in the labs.
Note: Ensure that the switches have been erased and have no startup configurations. If you are unsure
contact your instructor.
Instructor Note: Refer to the Instructor Lab Manual for the procedures to initialize and reload devices.
Note: The default Switch Database Manager (SDM) template on a Catalyst 3650 running IOS XE supports
dual-stacked operations and requires no additional configuration for our purposes.
If you are using a device, such as Cisco 2960, running Cisco IOS, check the SDM template with the privileged
EXEC command show sdm prefer.
S1# show sdm prefer
The default bias template used by the Switch Database Manager (SDM) does not provide IPv6 address
capabilities. Verify that SDM is using either the dual-ipv4-and-ipv6 template or the lanbase-routing
template. The new template will be used after reboot even if the configuration is not saved.
Use the following commands to assign the dual-ipv4-and-ipv6 template as the default SDM template.
S1# configure terminal
S1(config)# sdm prefer dual-ipv4-and-ipv6 default
S1(config)# end
S1# reload
Required Resources
2 Switches (Cisco 3650 with Cisco IOS XE release 16.9.4 universal image or comparable)
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 26 www.netacad.com
Lab - Implement HSRP
1 Switch (Cisco 2960 with Cisco IOS Release 15.2(2) lanbasek9 image or comparable)
1 PC (Choice of operating system with a terminal emulation program installed)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet cables as shown in the topology
Instructions
Part 1: Build the Network and Configure Basic Device Settings and Interface
Addressing
In Part 1, you will set up the network topology and configure basic settings and interface addressing.
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 26 www.netacad.com
Lab - Implement HSRP
exit
interface range g1/0/5-6
channel-group 1 mode active
exit
vlan 11
name FIRST_VLAN
exit
vlan 21
name SECOND_VLAN
exit
interface vlan 11
ip address 10.11.0.1 255.255.255.0
ipv6 address fe80::d1:1 link-local
ipv6 address 2001:db8:acad:11::1/64
no shutdown
exit
interface vlan 21
ip address 10.21.0.1 255.255.255.0
ipv6 address fe80::d1:2 link-local
ipv6 address 2001:db8:acad:21::1/64
no shutdown
exit
interface loopback 0
ip address 192.168.1.1 255.255.255.0
ipv6 address fe80::d1:3 link-local
ipv6 address 2001:db8:acad:1000::1/64
no shutdown
exit
Switch D2
hostname D2
ip routing
ipv6 unicast-routing
no ip domain lookup
banner motd # D2, Implement HSRP #
line con 0
exec-timeout 0 0
logging synchronous
exit
line vty 0 4
privilege level 15
password cisco123
exec-timeout 0 0
logging synchronous
login
exit
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 26 www.netacad.com
Lab - Implement HSRP
privilege level 15
password cisco123
exec-timeout 0 0
logging synchronous
login
exit
interface range f0/1-24, g0/1-2
shutdown
exit
interface range f0/1-4
switchport mode trunk
no shutdown
exit
interface range f0/1-2
channel-group 1 mode active
exit
interface range f0/3-4
channel-group 2 mode active
exit
vlan 11
name FIRST_VLAN
exit
vlan 21
name SECOND_VLAN
exit
interface f0/23
switchport mode access
switchport access vlan 11
spanning-tree portfast
no shutdown
exit
interface f0/24
switchport mode access
switchport access vlan 21
spanning-tree portfast
no shutdown
exit
interface vlan 11
ip address 10.11.0.3 255.255.255.0
ipv6 address fe80::a1:1 link-local
ipv6 address 2001:db8:acad:11::3/64
no shutdown
exit
ip default-gateway 10.11.0.254
b. Set the clock on each switch to UTC time.
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 26 www.netacad.com
Lab - Implement HSRP
c. On both switches, issue the no shutdown command on interface VLAN 11 and VLAN 21 and let HSRP
initialize. Verify that it is operating as designed by issuing the show standby brief command on switch
D1. You should see D1 as active for VLAN 11 and standby for VLAN 21.
d. On PC1, start a continuous ping to 192.168.1.1 and 2001:db8:acad:1000::1
e. On Switch D1, issue the shutdown command on interface VLAN 11. Note that that D2 takes over the
active role almost immediately, and there is almost no traffic loss in the running pings.
f. On Switch D1, issue the no shutdown command on interface VLAN 11. Note that D1 takes back over as
the active router, and once again there is almost no traffic loss experienced.
g. Stop the continuous ping running on PC1.
Close configuration window
c. On D2, configure authentication for group 11 and group 21 using the key-string Super53cret.
D2(config)# interface vlan 11
D2(config-if)# standby 11 authentication md5 key-string Super53cret
D2(config-if)# exit
D2(config)# interface vlan 21
D2(config-if)# standby 21 authentication md5 key-string Super53cret
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 26 www.netacad.com
Lab - Implement HSRP
D2(config-if)# exit
D2(config)# end
d. As soon as the key string was entered, HSRP started working again. Verify this by examining the output
of show standby brief on D1 and you will see that D2 is now listed as the standby router for group 11.
D1# show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Vl11 11 150 P Active local 10.11.0.2 10.11.0.254
Vl11 116 150 P Active local FE80::D2:1 FE80::5:73FF:FEA0:74
Vl21 21 100 P Standby 10.21.0.2 local 10.21.0.254
Vl21 216 100 P Standby FE80::D2:2 local FE80::5:73FF:FEA0:D8
Close configuration window
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 26 www.netacad.com
Lab - Implement HSRP
b. Examine the priority information in detail in the output of the show standby command.
D1# show standby
Vlan11 - Group 11 (version 2)
State is Standby
<output omitted>
Active router is 10.11.0.2, priority 100 (expires in 0.720 sec)
MAC address is 7069.5a9f.5654
Standby router is local
Priority 90 (configured 150)
Track object 4 state Down decrement 60
Group name is "hsrp-Vl11-11" (default)
Close configuration window
End of document
Device Configs - Final
Switch D1
D1# show run
Building configuration...
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 26 www.netacad.com
Lab - Implement HSRP
exit-address-family
!
address-family ipv6
exit-address-family
!
no aaa new-model
switch 1 provision ws-c3650-24ps
!
ip routing
!
no ip domain lookup
!
login on-success log
ipv6 unicast-routing
!
license boot level ipservicesk9
!
diagnostic bootup level minimal
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
redundancy
mode sso
!
transceiver type all
monitoring
!
track 4 interface Loopback0 line-protocol
!
class-map match-any system-cpp-police-topology-control
description Topology control
class-map match-any system-cpp-police-sw-forward
description Sw forwarding, L2 LVX data, LOGGING
class-map match-any system-cpp-default
description Inter FED, EWLC control, EWLC data
class-map match-any system-cpp-police-sys-data
description Learning cache ovfl, High Rate App, Exception, EGR Exception,
NFLSAMPLED DATA, RPF Failed
class-map match-any system-cpp-police-punt-webauth
description Punt Webauth
class-map match-any system-cpp-police-l2lvx-control
description L2 LVX control packets
class-map match-any system-cpp-police-forus
description Forus Address resolution and Forus traffic
class-map match-any system-cpp-police-multicast-end-station
description MCAST END STATION
class-map match-any system-cpp-police-multicast
description Transit Traffic and MCAST Data
class-map match-any system-cpp-police-l2-control
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 26 www.netacad.com
Lab - Implement HSRP
description L2 control
class-map match-any system-cpp-police-dot1x-auth
description DOT1X Auth
class-map match-any system-cpp-police-data
description ICMP redirect, ICMP_GEN and BROADCAST
class-map match-any system-cpp-police-stackwise-virt-control
description Stackwise Virtual
class-map match-any non-client-nrt-class
class-map match-any system-cpp-police-routing-control
description Routing control and Low Latency
class-map match-any system-cpp-police-protocol-snooping
description Protocol snooping
class-map match-any system-cpp-police-dhcp-snooping
description DHCP snooping
class-map match-any system-cpp-police-system-critical
description System Critical and Gold Pkt
!
policy-map system-cpp-policy
!
interface Loopback0
ip address 192.168.1.1 255.255.255.0
shutdown
ipv6 address FE80::D1:3 link-local
ipv6 address 2001:DB8:ACAD:1000::1/64
!
interface Port-channel1
switchport mode trunk
!
interface Port-channel12
switchport mode trunk
!
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
no ip address
shutdown
negotiation auto
!
interface GigabitEthernet1/0/1
switchport mode trunk
channel-group 12 mode active
!
interface GigabitEthernet1/0/2
switchport mode trunk
channel-group 12 mode active
!
interface GigabitEthernet1/0/3
switchport mode trunk
channel-group 12 mode active
!
interface GigabitEthernet1/0/4
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 16 of 26 www.netacad.com
Lab - Implement HSRP
interface GigabitEthernet1/0/20
shutdown
!
interface GigabitEthernet1/0/21
shutdown
!
interface GigabitEthernet1/0/22
shutdown
!
interface GigabitEthernet1/0/23
shutdown
!
interface GigabitEthernet1/0/24
shutdown
!
interface GigabitEthernet1/1/1
shutdown
!
interface GigabitEthernet1/1/2
shutdown
!
interface GigabitEthernet1/1/3
shutdown
!
interface GigabitEthernet1/1/4
shutdown
!
interface Vlan1
no ip address
!
interface Vlan11
ip address 10.11.0.1 255.255.255.0
standby version 2
standby 11 ip 10.11.0.254
standby 11 timers msec 250 msec 750
standby 11 priority 150
standby 11 preempt
standby 11 authentication md5 key-string Super53cret
standby 11 track 4 decrement 60
standby 116 ipv6 autoconfig
standby 116 priority 150
standby 116 preempt
standby 116 track 4 decrement 60
ipv6 address FE80::D1:1 link-local
ipv6 address 2001:DB8:ACAD:11::1/64
!
interface Vlan21
ip address 10.21.0.1 255.255.255.0
standby version 2
standby 21 ip 10.21.0.254
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 17 of 26 www.netacad.com
Lab - Implement HSRP
Switch D2
D2# show run
Building configuration...
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 18 of 26 www.netacad.com
Lab - Implement HSRP
!
vrf definition Mgmt-vrf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
no aaa new-model
switch 1 provision ws-c3650-24ps
!
ip routing
!
no ip domain lookup
!
login on-success log
ipv6 unicast-routing
!
license boot level ipservicesk9
!
diagnostic bootup level minimal
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
redundancy
mode sso
!
transceiver type all
monitoring
!
track 4 interface Loopback0 line-protocol
!
class-map match-any system-cpp-police-topology-control
description Topology control
class-map match-any system-cpp-police-sw-forward
description Sw forwarding, L2 LVX data, LOGGING
class-map match-any system-cpp-default
description Inter FED, EWLC control, EWLC data
class-map match-any system-cpp-police-sys-data
description Learning cache ovfl, High Rate App, Exception, EGR Exception,
NFLSAMPLED DATA, RPF Failed
class-map match-any system-cpp-police-punt-webauth
description Punt Webauth
class-map match-any system-cpp-police-l2lvx-control
description L2 LVX control packets
class-map match-any system-cpp-police-forus
description Forus Address resolution and Forus traffic
class-map match-any system-cpp-police-multicast-end-station
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 19 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 20 of 26 www.netacad.com
Lab - Implement HSRP
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 21 of 26 www.netacad.com
Lab - Implement HSRP
interface GigabitEthernet1/0/19
shutdown
!
interface GigabitEthernet1/0/20
shutdown
!
interface GigabitEthernet1/0/21
shutdown
!
interface GigabitEthernet1/0/22
shutdown
!
interface GigabitEthernet1/0/23
shutdown
!
interface GigabitEthernet1/0/24
shutdown
!
interface GigabitEthernet1/1/1
shutdown
!
interface GigabitEthernet1/1/2
shutdown
!
interface GigabitEthernet1/1/3
shutdown
!
interface GigabitEthernet1/1/4
shutdown
!
interface Vlan1
no ip address
shutdown
!
interface Vlan11
ip address 10.11.0.2 255.255.255.0
standby version 2
standby 11 ip 10.11.0.254
standby 11 timers msec 250 msec 750
standby 11 preempt
standby 11 authentication md5 key-string Super53cret
standby 116 ipv6 autoconfig
standby 116 preempt
ipv6 address FE80::D2:1 link-local
ipv6 address 2001:DB8:ACAD:11::2/64
!
interface Vlan21
ip address 10.21.0.2 255.255.255.0
standby version 2
standby 21 ip 10.21.0.254
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 22 of 26 www.netacad.com
Lab - Implement HSRP
Switch A1
A1# show run
Building configuration...
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 23 of 26 www.netacad.com
Lab - Implement HSRP
hostname A1
!
boot-start-marker
boot-end-marker
!
no aaa new-model
system mtu routing 1500
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface Port-channel1
switchport mode trunk
!
interface Port-channel2
switchport mode trunk
!
interface FastEthernet0/1
switchport mode trunk
channel-group 1 mode active
!
interface FastEthernet0/2
switchport mode trunk
channel-group 1 mode active
!
interface FastEthernet0/3
switchport mode trunk
channel-group 2 mode active
!
interface FastEthernet0/4
switchport mode trunk
channel-group 2 mode active
!
interface FastEthernet0/5
shutdown
!
interface FastEthernet0/6
shutdown
!
interface FastEthernet0/7
shutdown
!
interface FastEthernet0/8
shutdown
!
interface FastEthernet0/9
shutdown
!
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 24 of 26 www.netacad.com
Lab - Implement HSRP
interface FastEthernet0/10
shutdown
!
interface FastEthernet0/11
shutdown
!
interface FastEthernet0/12
shutdown
!
interface FastEthernet0/13
shutdown
!
interface FastEthernet0/14
shutdown
!
interface FastEthernet0/15
shutdown
!
interface FastEthernet0/16
shutdown
!
interface FastEthernet0/17
shutdown
!
interface FastEthernet0/18
shutdown
!
interface FastEthernet0/19
shutdown
!
interface FastEthernet0/20
shutdown
!
interface FastEthernet0/21
shutdown
!
interface FastEthernet0/22
shutdown
!
interface FastEthernet0/23
switchport access vlan 11
switchport mode access
spanning-tree portfast edge
!
interface FastEthernet0/24
switchport access vlan 21
switchport mode access
spanning-tree portfast edge
!
interface GigabitEthernet0/1
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 25 of 26 www.netacad.com
Lab - Implement HSRP
shutdown
!
interface GigabitEthernet0/2
shutdown
!
interface Vlan1
no ip address
!
interface Vlan11
ip address 10.11.0.3 255.255.255.0
!
ip default-gateway 10.11.0.254
ip http server
ip http secure-server
!
banner motd ^C A1, Implement HSRP ^C
!
line con 0
exec-timeout 0 0
logging synchronous
line vty 0 4
exec-timeout 0 0
privilege level 15
password cisco123
logging synchronous
login
line vty 5 15
login
!
end
2020 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 26 of 26 www.netacad.com