BCMSN Lab4 – Configuring Layer 3 Redundancy with HSRP

Ensurepass

Objectives

1. Understand the working principles of .

2. Master the HSRP configuration methods.

3. Understand the standby and track functions of HSRP.

Lab Topology

812-4

Lab Steps

1. This lab can be completed by using Layer3 switches or routers, if using routers, you should examine the IOS version to make sure that it supports HSRP protocol.

2. Configure the IP addresses of the interfaces on R1 and R2

R1(config)#interface loopback 0

R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#exit

R1(config)#

R1(config)#interface fastEthernet 0/0

R1(config-if)#ip address 192.168.1.2 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#

R2(config)#interface loopback 0

R2(config-if)#ip address 10.1.1.1 255.255.255.0

R2(config-if)#exit

R2(config)#

R2(config)#interface fastEthernet 0/0

R2(config-if)#ip address 192.168.1.3 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#

Note: Configure the IP addresses of the loopback interfaces on R1 and R2 as 10.1.1.1/24 used to simulate hosts directly connected to R1 and R2.

3. Configure PC1 to simulate clients, in order to assure the gateway of redundancy, so the gateway directed by PC1 virtualizes the virtual gateway address through HSRP protocol.

PC1(config)#no ip routing

PC1(config)#

PC1(config)#interface fastEthernet 0/0

PC1(config-if)#ip address 192.168.1.10 255.255.255.0

PC1(config-if)#no shutdown

PC1(config-if)#exit

PC1(config)#

PC1(config)#ip default-gateway 192.168.1.1

PC1(config)#exit

PC1#

4. Use the ping command on PC1 to test whether the host of 10.1.1.1/24 can be reached.

PC1#ping 10.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

…..

Success rate is 0 percent (0/5)

5. Configure HSRP on R1 and R2 in order to effectively assure the gateway of redundancy, the configuration is as follows:

R1(config)#interface fastEthernet 0/0

R1(config-if)#standby 1 ip 192.168.1.1

R2(config)#interface fastEthernet 0/0

R2(config-if)#standby 1 ip 192.168.1.1

5. After configuring HSRP group on R1, IOS will show the following information:

00:13:27: %STANDBY-6-STATECHANGE: FastEthernet0/0 Group 1 state Standby -> Active

6. Check the HSRP group information on R1 and R2:

R1#show standby

FastEthernet0/0 – Group 1

Local state is Active, priority 100

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 1.348

Virtual IP address is 192.168.1.1 configured

Active router is local

Standby router is 192.168.1.3, priority 100 expires in 7.812

Virtual mac address is 0000.0c07.ac01

5 state changes, last state change 00:00:10

IP redundancy name is “hsrp-Fa0/0-1″ (default)

R2#show standby

FastEthernet0/0 – Group 1

Local state is Standby, priority 100

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 2.686

Virtual IP address is 192.168.1.1 configured

Active router is 192.168.1.2, priority 100 expires in 7.748

Standby router is local

8 state changes, last state change 00:03:11

IP redundancy name is “hsrp-Fa0/0-1″ (default)

7. Each router in the HSRP group has a priority. Priority can decide which router will be the ACTIVE router used to affect ARP request of the client. If you just enable HSRP and each router has the same priority, the interface whose IP value is higher will be selects as ACTIVE router.

8. Use the ping command and the traceroute command on the PC1 client to track the router:

PC1#ping 10.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 44/300/1100 ms

PC1#

PC1#traceroute 10.1.1.1

Type escape sequence to abort.

Tracing the route to 10.1.1.1

1 192.168.1.2 68 msec 56 msec *

9. Check ARP cache on the client of PC1:

PC1#show arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.1.10 ca02.0be4.0000 ARPA FastEthernet0/0

Internet 192.168.1.1 12 0000.0c07.ac01 ARPA FastEthernet0/0

PC1#

10. Use the extended ping command to send more data packets to 10.1.1.1 and manually set the interface Fa0/0 on R1 to down status, observe the HSRP redundancy

R1(config)#interface fastEthernet 0/0

R1(config-if)#shutdown

00:39:48: %STANDBY-6-STATECHANGE: FastEthernet0/0 Group 1 state Active -> Init

Check the extended ping command on PC1

PC1#ping

Protocol [ip]:

Target IP address: 10.1.1.1

Repeat count [5]: 1000000

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 1000000, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!…..!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Success rate is 99 percent (456/461), round-trip min/avg/max = 16/72/560 ms

According to the above information, it is known that PC1 can’t reach the network of 10.1.1.0/24 due to the fault of the interface Fa0/0 on R1. In addition, R2 can’t receive the Hello packet sent by the Active router because of the fault of the interface Fa0/0 on R1. When the time exceeds the default HSRP time (10 seconds) held by R2, R2 will be upgraded to the Active router by itself, this conclusion can be drawn from the following information:

00:39:56: %STANDBY-6-STATECHANGE: FastEthernet0/0 Group 1 state Standby -> Active

11. Here, use the ping command and the traceroute command again on PC1 to confirm that the routers and the destination hosts can be reached:

PC1>ping 10.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 20/57/108 ms

PC1>

PC1>traceroute 10.1.1.1

Type escape sequence to abort.

Tracing the route to 10.1.1.1

1 192.168.1.3 32 msec 28 msec *

12. HSRP can effectively guarantee the gateway redundancy to stabilize the network through the above steps.

13. Set the interface Fa0/0 on R1 UP

R1(config)#interface fastEthernet 0/0

R1(config-if)#no shutdown

R1(config-if)#exit

R1(config)#

14. After waiting for some time, check HSRP group information on R1 and R2 again.

R1#show standby

FastEthernet0/0 – Group 1

Local state is Standby, priority 100

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 0.450

Virtual IP address is 192.168.1.1 configured

Active router is 192.168.1.3, priority 100 expires in 9.672

Standby router is local

7 state changes, last state change 00:00:34

IP redundancy name is “hsrp-Fa0/0-1″ (default)

15. If the router R1 has good performance and R2 is only used as the backup router, it is hoped that R1 can be responsible for ARP response and Layer3 routing tasks after recovery. In order to achieve this function, it is necessary to configure R1 with higher priority and enable HSRP standby function.

R1(config)#interface fastEthernet 0/0

R1(config-if)#standby 1 priority 200

R1(config-if)#standby 1 preempt

R1(config-if)#exit

R1(config)#

16. At this moment, the router R1 will give the following prompt information

R1#

00:55:55: %STANDBY-6-STATECHANGE: FastEthernet0/0 Group 1 state Standby -> Active

17. Check HSRP group information on R2

R2#show standby

FastEthernet0/0 – Group 1

Local state is Standby, priority 100

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 2.722

Virtual IP address is 192.168.1.1 configured

Active router is 192.168.1.2, priority 200 expires in 7.452

Standby router is local

11 state changes, last state change 00:03:53

IP redundancy name is “hsrp-Fa0/0-1″ (default)

R2#

18. HSRP can implement both redundancy for the downlink and monitoring for the uplink, it can dynamically change into the Active role to guarantee foolproof. The following shows how to configure the track functions of HSRP on interfaces.

R1(config)#interface fastEthernet 0/0

R1(config-if)#standby 1 priority 200

R1(config-if)#standby 1 preempt

R1(config-if)#standby 1 track loopback 0 150

R1(config-if)#exit

R1(config)#

R2(config)#interface fastEthernet 0/0

R2(config-if)#standby 1 preempt

R2(config-if)#

19. Manually set the loopback 0 interface on R1 down, and then observe the prompted information given by the system:

R1#debug standby events

HSRP Events debugging is on

R1#

R1#conf t

Enter configuration commands, one per line. End with CNTL/Z.

R1(config)#

R1(config)#interface loopback 0

R1(config-if)#shutdown

R1(config-if)#

R1(config-if)#

01:09:58: SB: Fa0/0 Grp 1 Tracked interface Loopback0 Down

01:09:58: SB: Fa0/0 Grp 1 Priority 200/200 -> 50/200

01:09:58: SB1: Fa0/0 Active: j/Coup rcvd from higher pri router (100/192.168.1.3)

01:09:58: SB1: Fa0/0 Active router is 192.168.1.3, was local

01:09:58: SB: Fa0/0 Remove active hash 192.168.1.2 (vIP 192.168.1.1)

01:09:58: SB: Fa0/0 Remove passive hash 192.168.1.3 (frc 0)

01:09:58: SB: Fa0/0 Add active hash 192.168.1.3 (vIP 192.168.1.1)

01:09:58: SB1: Fa0/0 Standby router is unknown, was 192.168.1.3

01:09:58: SB1: Fa0/0 Active -> Speak

01:09:58: %STANDBY-6-STATECHANGE: FastEthernet0/0 Group 1 state Active -> Speak

01:09:58: SB1: Fa0/0 “hsrp-Fa0/0-1″ state Active -> Speak

01:09:58: SB: Fa0/0 Redirect adv start

01:09:58: %LINK-5-CHANGED: Interface Loopback0, changed state to administratively down

01:10:08: SB1: Fa0/0 Speak: d/Standby timer expired (unknown)

01:10:08: SB1: Fa0/0 Standby router is local

01:10:08: SB1: Fa0/0 Speak -> Standby

01:10:08: SB1: Fa0/0 Redundancy “hsrp-Fa0/0-1″ state Speak -> Standby

20. Check the HSRP group information on R1 and R2:

R1#show standby

FastEthernet0/0 – Group 1

Local state is Standby, priority 50 (confgd 200), may preempt

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 2.668

Virtual IP address is 192.168.1.1 configured

Active router is 192.168.1.3, priority 100 expires in 8.252

Standby router is local

13 state changes, last state change 00:01:19

IP redundancy name is “hsrp-Fa0/0-1″ (default)

Priority tracking 1 interface, 0 up:

Interface Decrement State

Loopback0 150 Down (administratively down)

R1#

R2#show standby

FastEthernet0/0 – Group 1

Local state is Active, priority 100, may preempt

Hellotime 3 sec, holdtime 10 sec

Next hello sent in 0.808

Virtual IP address is 192.168.1.1 configured

Active router is local

Standby router is 192.168.1.2, priority 50 expires in 9.128

Virtual mac address is 0000.0c07.ac01

15 state changes, last state change 00:00:57

IP redundancy name is “hsrp-Fa0/0-1″ (default)

Priority tracking 1 interface, 1 up:

Interface Decrement State

Loopback0 10 Up

21. End.

Hope to helpful for you!





[Report Dead Link] Please leave a comment or send email to report dead links, so that we will update new links within 24 hours.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.