9.3.3 Packet Tracer – HSRP Configuration Guide – Instructions Answer

9.3.3 Packet Tracer - HSRP Configuration Guide Answers

Topology

9.3.3 Packet Tracer – HSRP Configuration Guide

Addressing Table

Device Interface IP Address Default Gateway
R1 G0/0 10.1.1.1/30 N/A
G0/1 192.168.1.1/24
G0/2 10.1.1.9/30
R2 G0/0 10.1.1.2/30 N/A
G0/1 10.1.1.5/30
G0/2 10.100.100.1/30
R3 G0/0 192.168.1.3/24 N/A
G0/1 10.1.1.6/30
G0/2 10.1.1.10/30
I-Net G0/1 10.100.100.2/30 N/A
HSRP Virtual Gateway Virtual 192.168.1.254/24 N/A
S1 VLAN 1 192.168.1.11/24 192.168.1.1
S3 VLAN 1 192.168.1.13/24 192.168.1.3
PC-A NIC 192.168.1.101/24 192.168.1.1
PC-B NIC 192.168.1.103/24 192.168.1.3
Web Server NIC 209.165.200.226/27 209.165.200.225

Note: The I-Net router is present in the internet cloud and cannot be accessed in this activity.

Objectives

In this Packet Tracer activity, you will learn how to configure Hot Standby Router Protocol (HSRP) to provide redundant default gateway devices to hosts on LANs. After configuring HSRP, you will test the configuration to verify that hosts are able to use the redundant default gateway if the current gateway device becomes unavailable.

  • Configure an HSRP active router.
  • Configure an HSRP standby router.
  • Verify HSRP operation.

Background / Scenario

Spanning Tree Protocol provides loop-free redundancy between switches within a LAN. However, it does not provide redundant default gateways for end-user devices within the network if a gateway router fails. First Hop Redundancy Protocols (FHRPs) provide redundant default gateways for end devices with no additional end-user configuration necessary. By using an FHRP, two or more routers can share the same virtual IP address and MAC address and can act as a single virtual router. Hosts on the network are configured with a shared IP address as their default gateway. In this Packet Tracer activity, you will configure Cisco’s Hot Standby Router Protocol (HSRP), which is an FHRP.

You will configure HSRP on routers R1 and R3, which serve as the default gateways for the hosts on LAN 1 and LAN 2. When you configure HSRP, you will create a virtual gateway that uses the same default gateway address for hosts in both LANs. If one gateway router becomes unavailable, the second router will take over using the same default gateway address that was used by the first router. Because the hosts on the LANs are configured with the IP address of the virtual gateway as the default gateway, the hosts will regain connectivity to remote networks after HSRP activates the remaining router.

Instructions

Part 1: Verify Connectivity

Step 1: Trace the path to the Web Server from PC-A.

a. Go to the desktop of PC-A and open a command prompt.

b. Trace the path from PC-A to the webserver by executing the tracert 209.165.200.226 command.

C:\> tracert 209.165.200.226

Tracing route to 209.165.200.226 over a maximum of 30 hops:

  1   0 ms      0 ms      0 ms      192.168.1.1
  2   1 ms      0 ms      1 ms      10.1.1.2
  3   *         1 ms      1 ms      10.100.100.2
  4   *         0 ms      0 ms      209.165.200.226

Trace complete.

Which devices are on the path from PC-A to the Web Server? Use the addressing table to determine the device names.
R1, R2 and I-Net

Step 2: Trace the path to the Web Server from PC-B.

Repeat the process in Step 1 from PC-B.

C:\> tracert 209.165.200.226

Tracing route to 209.165.200.226 over a maximum of 30 hops:

  1   0 ms      1 ms      1 ms      192.168.1.3
  2   *         *         0 ms      10.1.1.2
  3   0 ms      0 ms      0 ms      10.100.100.2
  4   0 ms      0 ms      0 ms      209.165.200.226

Trace complete.

Which devices are on the path from PC-B to the Web Server?
R3, R2 and I-Net

Step 3: Observe the network behavior when R3 becomes unavailable.

a. Select the delete tool from the Packet Tracer tool bar and delete the link between R3 and S3.

b. Open a command prompt on PC-B. Execute the tracert command with the Web Server as the destination.

C:\> tracert 209.165.200.226

Tracing route to 209.165.200.226 over a maximum of 30 hops:

  1   *         *         *         Request timed out.
  2   *         *         *         Request timed out.
  3   *         *         *         Request timed out.
  4   *         *         *         Request timed out.
  5   *         *         *         Request timed out.
  6   *         *         *         Request timed out.
  7   *         *         *         Request timed out.
  8   *         *         *         Request timed out.
  9   *         *         *         Request timed out.
  10   *         *         *         Request timed out.
  11   *         *         *         Request timed out.
  12   *         *         *         Request timed out.
  13   *         *         *         Request timed out.
  14   *         *         *         Request timed out.
  15   *         *         *         Request timed out.
  16   *         *         *         Request timed out.
  17   *         *         *         Request timed out.
  18   *         *         *         Request timed out.
  19   *         *         *         Request timed out.
  20   *         *         *         Request timed out.
  21   *         *         *         Request timed out.
  22   *         *         *         Request timed out.
  23   *         *         *         Request timed out.
  24   *         *         *         Request timed out.
  25   *         *         *         Request timed out.
  26   *         *         *         Request timed out.
  27   *         *         *         Request timed out.
  28   *         *         *         Request timed out.
  29   *         *         *         Request timed out.
  30   *         *         *         Request timed out.

Trace complete.

c. Compare the current output with the output of the command from Step 2.

What are the results?
The tracert command cannot determine the path to the Web Server because the path has been broken.

d. Click the Connections icon in the lower-left corner of the PT window. Locate and select the Copper Straight-Through icon in the palette of connection types.

e. Click on S3 and select port GigabitEthernet0/2. Click R3 and select port GigabitEthernet0/0.

f. After the link lights on the connection are both green, test the connection by pinging the Web Server. The ping should be successful.

C:\> ping 209.165.200.226

Part 2: Configure HSRP Active and Standby Routers

Step 1: Configure HSRP on R1.

a. Configure HSRP on the G0/1 LAN interface of R1.

R1(config)# interface gigabitethernet 0/1

b. Specify the HSRP protocol version number. The most recent version is version 2.

Note: Standby version 1 only supports IPv4 addressing.

R1(config-if)# standby version 2

c. Configure the IP address of the virtual default gateway. This address must be configured on any hosts that require the services of the default gateway. It replaces the physical interface address of the router that has been previously configured on the hosts.

Multiple instances of HSRP can be configured on a router. You must specify the HSRP group number to identify the virtual interface between routers in an HSRP group. This number must be consistent between the routers in the group. The group number for this configuration is 1.

R1(config-if)# standby 1 ip 192.168.1.254

d. Designate the active router for the HSRP group. It is the router that will be used as the gateway device unless it fails or the path to it becomes inactive or unusable. Specify the priority for the router interface.

The default value is 100. A higher value will determine which router is the active router. If the priorities of the routers in the HSRP group are the same, then the router with the highest configured IP address will become the active router.

R1(config-if)# standby 1 priority 150

R1 will operate as the active router and traffic from the two LANs will use it as the default gateway.

e. If it is desirable that the active router resume that role when it becomes available again, configure it to preempt the service of the standby router. The active router will take over the gateway role when it becomes operable again.

R1(config-if)# standby 1 preempt

What will the HSRP priority of R3 be when it is added to HSRP group 1?
100, which is the default value.

Step 2: Configure HSRP on R3.

Configure R3 as the standby router.

a. Configure the R3 interface that is connected to LAN 2.

R3(config)# interface gigabitethernet 0/0

b. Repeat only steps 1b and 1c above.

R3(config-if)# standby version 2
R3(config-if)# standby 1 ip 192.168.1.254
Step 3: Verify HSRP Configuration.

a. Verify HSRP by issuing the show standby command on R1 and R3. Verify the values for HSRP role, group, virtual IP address of the gateway, preemption, and priority. Note that HSRP also identifies the active and standby router IP addresses for the group.
R1:

R1# show standby
GigabitEthernet0/1 - Group 1 (version 2)
  State is Active
    4 state changes, last state change 00:00:30
  Virtual IP address is 192.168.1.254
  Active virtual MAC address is 0000.0C9F.F001
    Local virtual MAC address is 0000.0C9F.F001 (v2 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.696 secs
  Preemption enabled
  Active router is local
  Standby router is 192.168.1.3
  Priority 150 (configured 150)
  Group name is "hsrp-Gi0/1-1" (default)

R3:

R3# show standby
GigabitEthernet0/0 - Group 1 (version 2)
  State is Standby
    4 state changes, last state change 00:02:29
  Virtual IP address is 192.168.1.254
  Active virtual MAC address is 0000.0C9F.F001
    Local virtual MAC address is 0000.0C9F.F001 (v2 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.720 secs
  Preemption disabled
  Active router is 192.168.1.1
    MAC address is d48c.b5ce.a0c1
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Gi0/0-1" (default)

Using the output shown above, answer the following questions:

Which router is the active router?
R1

What is the MAC address for the virtual IP address?
0000.0C9F.F001

What is the IP address and priority of the standby router?
The IP address is 192.168.1.3 and the priority is 100.

b. Use the show standby brief command on R1 and R3 to view an HSRP status summary. Sample output is shown below.
R1:

R1# show standby brief
                   P indicates configured to preempt.
                   |
Interface Grp Pri P State  Active      Standby         Virtual IP
Gi0/1     1   150 P Active local       192.168.1.3     192.168.1.254

R3:

R3# show standby brief
                   P indicates configured to preempt.
                   |
Interface Grp Pri P State  Active      Standby          Virtual IP
Gi0/0     1   100 Standby 192.168.1.1  local            192.168.1.254

c. Change the default gateway address for PC-A, PC-B, S1, and S3.

Which address should you use?
192.168.1.254
S1:

S1(config)# ip default-gateway 192.168.1.254

S3:

S3(config)# ip default-gateway 192.168.1.254


Verify the new settings. Issue a ping from both PC-A and PC-B to the Web Server. Are the pings successful?

C:\> ping 209.165.200.226
C:\> ping 209.165.200.226

Yes

Part 3: Observe HSRP Operation

Step 1: Make the active router become unavailable.

Open a command prompt on PC-B and enter the command tracert 209.165.200.226.

C:\> tracert 209.165.200.226

Tracing route to 209.165.200.226 over a maximum of 30 hops:

  1   0 ms      0 ms      0 ms      192.168.1.1
  2   0 ms      0 ms      0 ms      10.1.1.2
  3   0 ms      0 ms      0 ms      10.100.100.2
  4   0 ms      0 ms      0 ms      209.165.200.226

Trace complete.

Does the path differ from the path used before HSRP was configured?
Yes. The path now passes through R1 instead of R3.

Step 2: Break the link to R1.

a. Select the delete tool from the Packet Tracer toolbar and delete the cable that connects R1 to S1.

b. Immediately return to PC-B and execute the tracert 209.165.200.226 command again. Observe the output of the command until the command completes execution. You may need to repeat the trace to see the full path.

C:\> tracert 209.165.200.226

Tracing route to 209.165.200.226 over a maximum of 30 hops:

  1   *         *         *         Request timed out.
  2   *         *         *         Request timed out.
  3   *         *         *         Request timed out.
  4   *         *         *         Request timed out.
  5   *         *         *         Request timed out.
  6   *         *         *         Request timed out.
  7   *         *         *         Request timed out.
  8   *         *         *         Request timed out.
  9   *         *         *         Request timed out.
  10   *         *         *         Request timed out.
  11   *         *         *         Request timed out.
  12   *         *         *         Request timed out.
  13   *         *         *         Request timed out.
  14   *         *         *         Request timed out.
  15   *         *         *         Request timed out.
  16   *         *         *         Request timed out.
  17   *         *         *         Request timed out.
  18   *         *         *         Request timed out.
  19   *         *         *         Request timed out.
  20   *         *         *         Request timed out.
  21   *         *         *         Request timed out.
  22   *         *         *         Request timed out.
  23   *         *         *         Request timed out.
  24   *         *         *         Request timed out.
  25   *         *         *         Request timed out.
  26   *         *         *         Request timed out.
  27   *         *         *         Request timed out.
  28   *         *         *         Request timed out.
  29   *         *         *         Request timed out.
  30   *         *         *         Request timed out.

Trace complete.
C:\> tracert 209.165.200.226

Tracing route to 209.165.200.226 over a maximum of 30 hops:

  1   0 ms      1 ms      0 ms      192.168.1.3
  2   1 ms      1 ms      0 ms      10.1.1.2
  3   14 ms     0 ms      0 ms      10.100.100.2
  4   1 ms      0 ms      12 ms     209.165.200.226

Trace complete.

How was this trace different from the previous trace?
At first, the trace timed out. Eventually, the trace went through R3, R2, and I-Net. R3 was used as the first hop gateway in this trace instead of R1.

HSRP undergoes a process to determine which router should take over when the active router becomes unavailable. This process takes time. Once the process is complete, the R3 standby router becomes active and is used as the default gateway for hosts on LAN 1 and LAN 2.

Step 3: Restore the link to R1.

a. Re-connect R1 port GigabitEthernet0/1 to S1 port GigabitEthernet0/2 with a copper straight-through cable.

b. Execute a trace from PC-B to the Web Server. You may need to repeat the trace to see the full path.

C:\> tracert 209.165.200.226

Tracing route to 209.165.200.226 over a maximum of 30 hops:

  1   *         0 ms      0 ms      192.168.1.1
  2   0 ms      0 ms      0 ms      10.1.1.2
  3   0 ms      0 ms      0 ms      10.100.100.2
  4   0 ms      0 ms      0 ms      209.165.200.226

Trace complete.

What path is used to reach the Web Server?
At first the trace fails. Eventually it begins using R1 as the gateway again.

If the preempt command was not configured for the HSRP group on R1, would the results have been the same?
No, R1 would not become the gateway again. The path through R3 would continue to be used.

Device Configs - Final

ROUTER R1

! ==============================================================
!--- 9.3.3 Packet Tracer - HSRP Configuration Guide
!--- ANSWER SCRIPT FOR ROUTER R1
!--- Usage: copy this whole file and paste it into the R1 terminal (start at the R1> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2: Configure HSRP Active and Standby Routers.
! --------------------------------------------------------------

!--- Step 1a. HSRP on the G0/1 LAN interface.
interface gigabitethernet 0/1
!--- Step 1b. HSRP version 2.
 standby version 2
!--- Step 1c. Group 1 virtual default gateway 192.168.1.254.
 standby 1 ip 192.168.1.254
!--- Step 1d. Priority 150 makes R1 the active router.
 standby 1 priority 150
!--- Step 1e. Preempt: R1 takes the active role back when it returns.
 standby 1 preempt
 exit

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show standby                  -> State is Active, Preemption enabled, Standby router is 192.168.1.3, Priority 150
!---   show standby brief            -> Gi0/1  1  150 P Active  local  192.168.1.3  192.168.1.254
! ==============================================================

ROUTER R3

! ==============================================================
!--- 9.3.3 Packet Tracer - HSRP Configuration Guide
!--- ANSWER SCRIPT FOR ROUTER R3
!--- Usage: copy this whole file and paste it into the R3 terminal (start at the R3> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2: Configure HSRP Active and Standby Routers.
! --------------------------------------------------------------

!--- Step 2a. HSRP on the G0/0 interface connected to LAN 2.
interface gigabitethernet 0/0
!--- Step 2b. Repeat only steps 1b and 1c: version 2 and group 1 virtual IP (default priority 100, no preempt).
 standby version 2
 standby 1 ip 192.168.1.254
 exit

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show standby                  -> State is Standby, Active router is 192.168.1.1, Priority 100 (default 100)
!---   show standby brief            -> Gi0/0  1  100  Standby  192.168.1.1  local  192.168.1.254
! ==============================================================

SWITCH S1

! ==============================================================
!--- 9.3.3 Packet Tracer - HSRP Configuration Guide
!--- ANSWER SCRIPT FOR SWITCH S1
!--- Usage: copy this whole file and paste it into the S1 terminal (start at the S1> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2: Configure HSRP Active and Standby Routers.
! --------------------------------------------------------------

!--- Step 3c. Default gateway changes from 192.168.1.1 to the HSRP virtual gateway.
ip default-gateway 192.168.1.254

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show running-config | include default-gateway -> ip default-gateway 192.168.1.254
! ==============================================================

SWITCH S3

! ==============================================================
!--- 9.3.3 Packet Tracer - HSRP Configuration Guide
!--- ANSWER SCRIPT FOR SWITCH S3
!--- Usage: copy this whole file and paste it into the S3 terminal (start at the S3> prompt). Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless.
! ==============================================================

enable
configure terminal

! --------------------------------------------------------------
!--- Part 2: Configure HSRP Active and Standby Routers.
! --------------------------------------------------------------

!--- Step 3c. Default gateway changes from 192.168.1.3 to the HSRP virtual gateway.
ip default-gateway 192.168.1.254

end

! --------------------------------------------------------------
!--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.)
! --------------------------------------------------------------
copy running-config startup-config


! ==============================================================
!--- Verification:
!---   show running-config | include default-gateway -> ip default-gateway 192.168.1.254
! ==============================================================

PC-A

PC-APC
IP Address192.168.1.101
Subnet Mask255.255.255.0
Default Gateway192.168.1.254
Command Promptipconfig 192.168.1.101 255.255.255.0 192.168.1.254

PC-B

PC-BPC
IP Address192.168.1.103
Subnet Mask255.255.255.0
Default Gateway192.168.1.254
Command Promptipconfig 192.168.1.103 255.255.255.0 192.168.1.254

Download Packet Tracer (.pka) file:

Subscribe
Notify of
guest

9 Corrections & Clarifications