Ccnpv7 Switch Lab 6-1 FHRP HSRP VRRP Student
Ccnpv7 Switch Lab 6-1 FHRP HSRP VRRP Student
Ccnpv7 Switch Lab 6-1 FHRP HSRP VRRP Student
Objectives
Configure VRRP
Hot Standby Router Protocol (HSRP) is a Cisco-proprietary redundancy protocol for establishing a faulttolerant default gateway. It is described in RFC 2281. HSRP provides a transparent failover mechanism to the
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 1 of 19
Required Resources
1
1
2 switches (Cisco 2960 with the Cisco IOS Release 15.0(2)SE6 C2960-LANBASEK9-M image or
comparable)
2 switches (Cisco 3560 with the Cisco IOS Release 15.0(2)SE6 C3560-IPSERVICESK9-M image or
comparable)
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 2 of 19
Configure default gateways on the access layer switches ALS1 and ALS2. The distribution layer switches
will not use a default gateway because they are Layer 3 devices. The access layer switches are Layer 2
devices and need a default gateway to send management VLAN traffic off of the local subnet for the
management VLAN. **The HSRP virtual IP address 172.16.99.5 will be configured in subsequent steps.
ALS1(config)# ip default-gateway 172.16.99.5
*See note above
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 3 of 19
Configure trunks and EtherChannels from DLS1 and DLS2 to the other three switches according to the
diagram. The switchport trunk encapsulation {isl | dot1q} command is used because these switches
also support ISL encapsulation. A sample configuration is provided. Not all of the commands listed below
will be used on all devices. Repeat and reference chapter 2 labs if you still are having difficulty with
implementing trunking between devices.
DLS1(config)# interface range fastEthernet 0/x - x
DLS1(config-if-range)# switchport trunk encapsulation dot1q
DLS1(config-if-range)# switchport mode trunk
DLS1(config-if-range)# channel-group x mode desirable
DLS1(config-if-range)# no shut
Creating a port-channel interface Port-channel x
Note: Repeat configurations on the other three switches.
a. Verify trunking between DLS1, ALS1, and ALS2 using the show interface trunk command on all
switches.
b. Verify the EtherChannel configuration
c.
Change the VTP mode of ALS1 and ALS2 to client and VTP modes of DLS2 to server. A sample
configuration is provided.
ALS1(config)# vtp mode client
Setting device to VTP CLIENT mode for VLANS.
Create the VTP domain on VTP server DLS1 and create VLANs 10, 20, 30, 40 and 99 for the domain.
NOTE: Switches default to vtp mode server. However, remember the base configuration modifies this
setting to vtp mode transparent.
DLS1(config)# vtp domain SWLAB
DLS1(config)# vtp version 2
DLS1(config)#vtp mode server
Setting device to VTP Server mode for VLANS
DLS1(config)# vlan
DLS1(config-vlan)#
DLS1(config-vlan)#
DLS1(config-vlan)#
DLS1(config-vlan)#
10
name
vlan
name
vlan
Finance
20
Engineering
30
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 4 of 19
name
vlan
name
vlan
name
Server-Farm1
40
Server-Farm2
99
Management
Configure the host ports of all four switches. The following commands configure the switch port mode as
access, place the port in the proper VLANs, and turn on spanning-tree PortFast for the ports. A sample
configuration is provided for you.
Configure PCs with the IP addresses shown in the topology diagram. Use the address ending in .5 as
the gateway address for the respective VLANs.
DLS2(config)# interface fastEthernet 0/6
DLS2(config-if)# switchport mode access
DLS2(config-if)# switchport access vlan 40
DLS2(config-if)# spanning-tree portfast
DLS2(config-if)# no shutdown
e. Ping from the host on VLAN 10 to the host on VLAN 40. The ping should fail.
Are these results expected at this point? Why?
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
Note: The switchport host command can be used to configure individual access ports. This command
automatically activates access mode, PortFast, and removes all associations of the physical switch port
with the port-channel interfaces (if there are any).
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 5 of 19
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 6 of 19
from
from
from
from
172.16.10.5:
172.16.10.5:
172.16.10.5:
172.16.10.5:
bytes=32
bytes=32
bytes=32
bytes=32
time=1ms
time<1ms
time=1ms
time<1ms
TTL=127
TTL=127
TTL=127
TTL=127
from
from
from
from
209.165.200.254:
209.165.200.254:
209.165.200.254:
209.165.200.254:
bytes=32
bytes=32
bytes=32
bytes=32
time=1ms
time<1ms
time=1ms
time<1ms
TTL=127
TTL=127
TTL=127
TTL=127
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 7 of 19
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 8 of 19
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 9 of 19
Issue the show standby brief command on both DLS1 and DLS2.
DLS1#sh stand bri
Interface
Vl10
Vl20
Vl30
Vl40
Vl99
Grp
10
20
30
40
99
Grp
10
20
30
40
99
P
|
P
P
P
P
P
P
Pri
150
150
100
100
150 P
P
|
P
P
P
P
Pri
100
100
150
150
100
State
Active
Active
Standby
Standby
Active
State
Standby
Standby
Active
Active
Standby
Active
local
local
172.16.30.2
172.16.40.2
local
Active
172.16.10.1
172.16.20.1
local
local
172.16.99.1
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Standby
172.16.10.2
172.16.20.2
local
local
172.16.99.2
Standby
local
local
172.16.30.1
172.16.40.1
local
Virtual IP
172.16.10.5
172.16.20.5
172.16.30.5
172.16.40.5
172.16.99.5
Virtual IP
172.16.10.5
172.16.20.5
172.16.30.5
172.16.40.5
172.16.99.5
Page 10 of 19
What is the default hello time for each VLAN? What is the default hold time?
________________________________________________________________________________
________________________________________________________________________________
How is the active HSRP router selected?
____________________________________________________________________________________
____________________________________________________________________________________
f.
Use the show ip route command to verify routing on both DLS1 and DLS2.
DLS1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
C
L
C
L
C
L
C
L
C
L
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 11 of 19
Verify HSRP by disconnecting the trunks to DLS2. You can simulate this using the shutdown command
on those interfaces.
DLS2(config)# interface range fastEthernet 0/7 - 12
DLS2(config-if-range)# shutdown
Output to the console at DLS1 should reflect DLS1 becoming the active router for VLANs 30 and 40.
g. Verify that DLS1 is acting as the backup default gateway for VLANs 30 and 40 using the show standby
brief command. DLS1 is now the active HSRP router for all VLANs and the standby router is unknown.
DLS1#sh stand bri
Interface
Vl10
Vl20
Vl30
Vl40
Vl99
Grp
10
20
30
40
99
P
|
P
P
P
P
Pri
150
150
100
100
150 P
Active
local
local
local
local
local
Standby
unknown
unknown
unknown
unknown
unknown
Virtual IP
172.16.10.5
172.16.20.5
172.16.30.5
172.16.40.5
172.16.99.5
Repeat this process by bringing up the DLS2 trunks and shutting down the DLS1 interfaces. Use the
show standby brief command to see the results.
Note: If both DLS1 and DLS2 have links to the Internet, failure of either switch will cause HSRP to
redirect packets to the other switch. The functioning switch will take over as the default gateway to
provide virtually uninterrupted connectivity for hosts at the access layer.
Go back to the payroll and SQL clients that we issued the continuous pings on in earlier steps.
The ping should still be running to the 209.165.200.254 destination address. Evaluate the loss of
connectivity the payroll client experienced during the HSRP state change. The users experience minimal
service disruption as a result of the HSRP state change.
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 12 of 19
WORD
md5
text
Interface
Vl10
Vl20
Vl30
Vl40
Vl99
Grp
10
20
30
40
99
P
|
P
P
P
P
Pri
110
110
100
100
110 P
Active
local
local
172.16.30.2
172.16.40.2
local
Standby
unknown
172.16.20.2
local
local
172.16.99.2
Virtual IP
172.16.10.5
172.16.20.5
172.16.30.5
172.16.40.5
172.16.99.5
Refer to the above output. Once the hsrp authentication with the correct key string were added to DLS2, the
hsrp state changed.
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 13 of 19
Interface
Vl10
Vl20
Vl30
Vl40
Vl99
Grp
10
20
30
40
99
P
|
P
P
P
P
Pri
110
110
100
100
110 P
Active
local
local
172.16.30.2
172.16.40.2
local
Standby
172.16.10.2
172.16.20.2
local
local
172.16.99.2
Virtual IP
172.16.10.5
172.16.20.5
172.16.30.5
172.16.40.5
172.16.99.5
Continue configuring HSRP authentication on the remaining HSRP groups used in this lab scenario.
CHALLENGE:
On one of the groups, implement HSRP authentication using a key chain instead of a key string.
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 14 of 19
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 15 of 19
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 16 of 19
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 17 of 19
Pri
150
150
100
100
150
Time
3414
3414
3609
3609
3414
Own Pre
Y
Y
Y
Y
Y
State
Master
Master
Backup
Backup
Master
Master addr
172.16.10.1
172.16.20.1
172.16.30.2
172.16.40.2
172.16.99.1
Group addr
172.16.10.5
172.16.20.5
172.16.30.5
172.16.40.5
172.16.99.5
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 18 of 19
Grp
10
20
30
40
99
Pri
100
100
150
150
100
Time
3609
3609
3414
3414
3609
Own Pre
Y
Y
Y
Y
Y
State
Backup
Backup
Master
Master
Backup
Master addr
172.16.10.1
172.16.20.1
172.16.30.2
172.16.40.2
172.16.99.1
Group addr
172.16.10.5
172.16.20.5
172.16.30.5
172.16.40.5
172.16.99.5
CHALLENGE:
Step 13: Alternative option for VRRP configuration
Remove the VRRP commands from the interfaces and implement VRRP using the actual IP addresses
configured on the SVIs.
On DLS1, configure VRRP using the actual IP addresses on interfaces VLAN, 10, 20, and 99 as the virtual
router IP. A sample configuration is provided for you below.
Observe VRRP results. DLS1 should automatically become the Master for VLANs 10, 20, and 99 and
Backup for VLANs 30 and 40.
DLS2 should become the Master for VLANs 30 and 40 and become the backup for VLANs 10, 20, and
99.
2014 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 19 of 19