MHSRP (Multiple HSRP) and Load Sharing


HSRP provides router redundancy by making one router active and the other one standby, the latter will be used when the active cannot afford traffic forwarding; however, this doesn’t allow optimal utilization of network infrastructure resources.

Multiple HSRP groups allow the use a router as standby for one group and active for another group and vice versa: the active router for one group will be the standby for the other group.

In this lab (Figure1) R2 an R3 are used for HSRP redundancy, both routers are connected to the switch SW (through trunk interfaces) that connects both VLAN10 (R10) and VLAN20 (R20) devices.

Using DHCP service, hosts within each VLAN learn the corresponding default gateway: 192.168.20.1 and 192.168.10.1 for VLAN10 (192.168.20.0/24) and VLAN20 (192.168.10.0/24) respectively. Depending on the size and the complexity of the network, this task require a particular attention to coordinate between DHCP administration and HSRP tasks like adding or deleting VLANs or change in virtual IP address.

This lab is structured as follow:

– HSRP CONFIGURATION

– Verification.

-TESTING

– R3 failure.

– R2 upstream interface failure.

– R2 upstream interface back from failure

Figure1 Topology:


HSRP Configuration

R2:

interface FastEthernet1/0.10
standby preempt

standby 10 ip 192.168.10.1

standby 10 timers msec 500 1

standby 10 priority 50

standby 10 preempt delay minimum 60

standby 10 track Ethernet0/0 60

interface FastEthernet1/0.20

standby preempt

standby 20 ip 192.168.20.1

standby 20 timers msec 500 1

standby 20 preempt delay minimum 60

standby 20 track Ethernet0/0 60

R3:

interface FastEthernet1/0.10
standby preempt

standby 10 ip 192.168.10.1

standby 10 timers msec 500 1

standby 10 preempt delay minimum 60

standby 10 track Ethernet0/0 60

interface FastEthernet1/0.20

standby preempt

standby 20 ip 192.168.20.1

standby 20 timers msec 500 1

standby 20 priority 50

standby 20 preempt delay minimum 60

standby 20 track Ethernet0/0 60

R2 will be the active gateway for VLAN 20 (default priority=100) and the standby gateway for VLAN 10 (configured priority of 50).

R3 will be the active gateway for VLAN 10 (default priority=100) and the standby gateway for VLAN 20 (configured priority of 50).

For both VLANs preempt timer is set to 60 sec to give the switch (distribution/access layer) the time for STP convergence, so the layer2 path will match layer3 path.

HSRP Hello polling time is set to 500 ms and the holdtime to 1sec

Verification:

R2:

R2#sh standby brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 50 P Standby
192.168.10.3
local
192.168.10.1

Fa1/0.20 20 100 P Active
local
192.168.20.3
192.168.20.1

R2#

R3:

R3(config)#do sh standby brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 100 P Active
local
192.168.10.2
192.168.10.1

Fa1/0.20 20 50 P Standby
192.168.20.2
local
192.168.20.1

R3(config)#

R10:

R10#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.10.3 32 msec 28 msec

2 192.168.13.1 88 msec 104 msec 112 msec

3 10.10.10.1 120 msec 120 msec

R10#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.10.2 1 cc01.1744.0010 ARPA FastEthernet0/0

Internet 192.168.10.1 1 0000.0c07.ac0a ARPA FastEthernet0/0

Internet 192.168.10.10 – cc04.1084.0000 ARPA FastEthernet0/0

R10#

VLAN10 traffic takes the path through R3 as transparently decided by HSRP.

R20:

R20#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.20.2 64 msec 44 msec

2 192.168.12.1 136 msec 56 msec 44 msec

3 10.10.10.1 164 msec 52 msec

R20#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.20.20 – cc05.1084.0000 ARPA FastEthernet0/0

Internet 192.168.20.1 0 0000.0c07.ac14 ARPA FastEthernet0/0

Internet 192.168.20.3 0 cc02.1084.0010 ARPA FastEthernet0/0

R20#

VLAN20 traffic takes the path through R2 as transparently decided by HSRP.

Figure2: the logical topology as seen by clients

TESTING

R3 failure

The first test is to shutdown R3 router and enable “debug standby events”

R2:

Aug 26 03:51:34.808: %SYS-5-CONFIG_I: Configured from console by admin on console
Aug 26 03:51:46.944: HSRP: Fa1/0.20 Grp 20 Standby router is unknown, was 192.168.20.3

Aug 26 03:51:46.948: HSRP: Fa1/0.10 Grp 10 Standby: c/Active timer expired (192.168.10.3)

Aug 26 03:51:46.952: HSRP: Fa1/0.10 Grp 10 Active router is local, was 192.168.10.3

Aug 26 03:51:46.952: HSRP: Fa1/0.10 Grp 10 Standby router is unknown, was local

Aug 26 03:51:46.956: HSRP: Fa1/0.10 Grp 10 Standby -> Active

Aug 26 03:51:46.960: %HSRP-6-STATECHANGE: FastEthernet1/0.10 Grp 10 state Standby -> Active

Aug 26 03:51:46.964: HSRP: Fa1/0.10 Grp 10 Redundancy “hsrp-Fa1/0.10-10” state Standby -> Active

Aug 26 03:51:49.972: HSRP: Fa1/0.10 Grp 10 Redundancy group hsrp-Fa1/0.10-10 state Active -> Active

Aug 26 03:51:52.976: HSRP: Fa1/0.10 Grp 10 Redundancy group hsrp-Fa1/0.10-10 state Active -> Active

After 1 second (holdtime timer expired) R2 consider R3 down and become the Active router for VLAN10.

R2#sh standby brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 50 P Active
local
unknown
192.168.10.1

Fa1/0.20 20 100 P Active local unknown 192.168.20.1

R2#

Because the only router available in the HSRP group 10 is R2 the local, there is no “standby” router.

R10:

R10#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.10.2 84 msec 28 msec 24 msec


2 192.168.12.1 124 msec 48 msec *

3 10.10.10.1 156 msec 116 msec 80 msec

R10#

R10#

R10#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.10.2 10 cc01.1744.0010 ARPA FastEthernet0/0

Internet 192.168.10.1 4 0000.0c07.ac0a ARPA FastEthernet0/0

Internet 192.168.10.10 – cc04.1084.0000 ARPA FastEthernet0/0

R10#

Though, the virtual IP and MAC are the same from the client standpoint, the path taken has transparently changed, now it is forwarded through R2.

R20:

R20#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.20.2 96 msec 60 msec 60 msec

2 192.168.12.1 120 msec 96 msec 144 msec

3 10.10.10.1 92 msec 120 msec 116 msec

R20#

R20#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.20.20 – cc05.1084.0000 ARPA FastEthernet0/0

Internet 192.168.20.1 6 0000.0c07.ac14 ARPA FastEthernet0/0

Internet 192.168.20.3 5 cc02.1084.0010 ARPA FastEthernet0/0

R20#

Nothing has changed for VLAN20 where it is still forwarded through the active gateway R2.

R3 back from failure

Now R3 is back to live and because preempt is configured it will try to get back its status of “Active” and send hello message to the actual active router with its priority.

R2:

Aug 26 04:01:39.688: HSRP: Fa1/0.10 Grp 10 Standby router is 192.168.10.3
Aug 26 04:01:39.700: HSRP: Fa1/0.20 Grp 20 Standby router is 192.168.20.3

Aug 26 04:02:38.183: HSRP: Fa1/0.10 Grp 10 Active: j/Coup rcvd from higher pri router (100/192.168.10.3)

Aug 26 04:02:38.187: HSRP: Fa1/0.10 Grp 10 Active router is 192.168.10.3, was local

Aug 26 04:02:38.191: HSRP: Fa1/0.10 Grp 10 Standby router is unknown, was 192.168.10.3

Aug 26 04:02:38.191: HSRP: Fa1/0.10 Grp 10 Active -> Speak

Aug 26 04:02:38.191: %HSRP-6-STATECHANGE: FastEthernet1/0.10 Grp 10 state Active -> Speak

Aug 26 04:02:38.191: HSRP: Fa1/0.10 Grp 10 Redundancy “hsrp-Fa1/0.10-10” state Active -> Speak

Aug 26 04:02:38.207: HSRP: Fa1/0.10 API MAC address update

Aug 26 04:02:38.207: HSRP: Fa1/0.20 API MAC address update

Aug 26 04:02:39.187: HSRP: Fa1/0.10 Grp 10 Speak: d/Standby timer expired (unknown)

Aug 26 04:02:39.187: HSRP: Fa1/0.10 Grp 10 Standby router is local

Aug 26 04:02:39.191: HSRP: Fa1/0.10 Grp 10 Speak -> Standby

Aug 26 04:02:39.195: HSRP: Fa1/0.10 Grp 10 Redundancy “hsrp-Fa1/0.10-10” state Speak -> Standby

R2#

R2#sh stand brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 50 P Standby
192.168.10.3
local
192.168.10.1

Fa1/0.20 20 100 P Active local 192.168.20.3 192.168.20.1

R2#

After preempt timer expiration, R3 took back the active role by winning the election with its priority of 100 as against 50 for R2.

R10:

R10#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.10.3 48 msec 12 msec

2 192.168.13.1 104 msec 104 msec 128 msec

3 10.10.10.1 168 msec 56 msec 96 msec

R10#

Now VLAN traffic is back to his initial path through R3.

R2 upstream interface failure:

In this a failure of R2 upstream interface f0/0 is simulated by shutting it down.

R2:

R2(config-if)#do sh stand brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 0 P Standby 192.168.10.3 local 192.168.10.1

Fa1/0.20 20 40 P Standby
192.168.20.3
local 192.168.20.1

R2(config-if)#

After the “penality” given to R2 (priority-60) the standby router will win the election with its priority 50 and become active for VLAN20 too.

R3:

R3#sh standby brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 100 P Active
local
192.168.10.2 192.168.10.1

Fa1/0.20 20 50 P Active
local
192.168.20.2 192.168.20.1

R3#

R3 now the gateway for both VLAN10 and VLAN20.

R10:

R10#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.10.3 80 msec 36 msec 32 msec

2 192.168.13.1 104 msec 40 msec 108 msec

3 10.10.10.1 184 msec 104 msec 112 msec

R10#

R10#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.10.1 2 0000.0c07.ac0a ARPA FastEthernet0/0

Internet 192.168.10.10 – cc04.1084.0000 ARPA FastEthernet0/0

R10#

Note the difference between the two consecutive outputs of “trace route” command, in the first, the switch SW did not updated its ARP table and still forward VLAN 10 traffic to R2 and only the routing table is redirecting it to R3. In the second output the switch has received “Gratuitous ARP” carrying the new ARP information, so to forward VLAN 10 traffic directly to the new gateway R3.

R20:

R20#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 *

192.168.20.3 48 msec 28 msec

2 192.168.13.1 60 msec 88 msec 92 msec

3 10.10.10.1 92 msec 100 msec 124 msec

R20#

R20#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.20.20 – cc05.1084.0000 ARPA FastEthernet0/0

Internet 192.168.20.1 2 0000.0c07.ac14 ARPA FastEthernet0/0

Internet 192.168.20.3 0 cc02.1084.0010 ARPA FastEthernet0/0

R20#

VLAN20 takes its usual path through R3.

R2 upstream interface back from failure:

R2 f0/0 is now back to live.

R2:

R2(config-if)#do sh standby brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 50 P Standby
192.168.10.3
local 192.168.10.1

Fa1/0.20 20 100 P Active
local
192.168.20.3 192.168.20.1

R2(config-if)#

R2 is again the active gateway for VLAN 20

R3:

R3#sh standby brief
P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0.10 10 100 P Active local
192.168.10.2 192.168.10.1

Fa1/0.20 20 50 P Standby
192.168.20.2
local 192.168.20.1

R3#

R3 is back to the standby state for VLAN 20

R10:

R10#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.10.3 64 msec 44 msec 48 msec

2 192.168.13.1 200 msec 88 msec 96 msec

3 10.10.10.1 140 msec 92 msec 104 msec

R10#

R10#sh arp

Protocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.10.2 42 cc01.1744.0010 ARPA FastEthernet0/0

Internet 192.168.10.3 20 cc02.1084.0010 ARPA FastEthernet0/0

Internet 192.168.10.1 2 0000.0c07.ac0a ARPA FastEthernet0/0

Internet 192.168.10.10 – cc04.1084.0000 ARPA FastEthernet0/0

R10#

No changes in the VLAN 10 path.

R20:

R20#trace 10.10.10.1
Type escape sequence to abort.

Tracing the route to 10.10.10.1

1 192.168.20.2 128 msec 88 msec 20 msec

2 192.168.12.1 40 msec 60 msec 96 msec

3 10.10.10.1 56 msec 120 msec 108 msec

R20#

VLAN20 is now taking the initial path through R2

R20#sh arpProtocol Address Age (min) Hardware Addr Type Interface

Internet 192.168.20.20 – cc05.1084.0000 ARPA FastEthernet0/0

Internet 192.168.20.1 4 0000.0c07.ac14 ARPA FastEthernet0/0

Internet 192.168.20.3 13 cc02.1084.0010 ARPA FastEthernet0/0

R20#

Note that from the first time HSRP has been configured and throughout all undertaken tests the gateway IP address and the MAC are the same in all VLAN client nodes, independently of who is the active or the standby router.

Gateway virtual IP 192.168.20.1

Gateway virtual MAC 0000.0c07.ac14

***

HSRP can also be deployed on Layer3 switches Virtual (SVI) or routed interfaces, for instance R3 can easily be replaced by a layer3 switch as depicted by figure2:

Figure2: using Layer3 SVI and routed interfaces

And the configuration would be as follow:

MLS:

interface FastEthernet0/1
no switchport

ip address 192.168.13.3 255.255.255.0

!

interface FastEthernet0/3

switchport trunk allowed all

switchport mode trunk

no ip address

!

interface Vlan10

ip address 192.168.10.3 255.255.255.0

standby 10 ip 192.168.10.1

standby 10 timers msec 500 1

standby 10 preempt delay minimum 60

!

interface Vlan20

ip address 192.168.20.3 255.255.255.0

standby preempt

standby 20 ip 192.168.20.1

standby 20 timers msec 500 1

standby 20 priority 50

standby 20 preempt delay minimum 60

In fact, multiple HSRP doesn’t provide a perfect load balancing, it will depend on the bandwidth produced by each VLANs, rather it provides a separate VLAN-based redundancy.

HSRP (Hot Standby Routing Protocol)


HSRP concept :

 – HSRP provide redundancy for gateway router, when the active router goes down or one of its critical connections, another router can replace it.

– Using HSRP on an interface automatically disable ICMP redirect.

– Routers participating in the HSRP architecture exchanges information about routers statuses in hello messages every “hello time” (3 seconds by default).

– The router with the highest standby priority will be selected as the active router and will handle traffic related with the virtual ip and MAC.

– If the active router stop sending hello messages for 3* hello time (10 seconds by default) the router with next highest priority will become active.

– The virtual MAC address is generated automatically using the vendor code and the HSRP group.

– With MHSRP a router can be active for one group and standby for another group:

– A router (layer3 switch) can be active for one VLAN and standby for another VLAN.

– These features can be used to provide load balancing of traffic between routers.

 

Figure1: HSRP status transitions

  • Not only inbound interface status (up/down) participates in the HSRP process, but other critical interfaces too like outbound.
  • If outbound interface goes down the priority of the router is decreased by a configured number (priority) to let specific routers in the group or in the VLAN to become active.

 

Figure 2: Topology


CONFIGURATION

R2:

interface FastEthernet1/0

ip address 192.168.40.2 255.255.255.0

standby 40 ip 192.168.40.1

standby 40 preempt

standby 40 track Ethernet0/0 60

R3:

interface FastEthernet1/0

ip address 192.168.40.3 255.255.255.0

standby 40 ip 192.168.40.1

standby 40 priority 50 

 

Figure 3: Topology as seen by hosts in the access layer

 


 

Verification

R3:

R3#sh standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0
40
50
Standby
192.168.40.2
local
192.168.40.1

R3#sh standby

FastEthernet1/0Group 40


State is Standby

4 state changes, last state change 00:23:58


Virtual IP address is 192.168.40.1


Active virtual MAC address is 0000.0c07.ac28


Local virtual MAC address is 0000.0c07.ac28 (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 1.216 secs


Preemption disabled


Active router is 192.168.40.2, priority 100 (expires in 7.192 sec)


Standby router is local


Priority 50 (configured 50)

IP redundancy name is “hsrp-Fa1/0-40” (default)

R3# 

R2:

R2#sh standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0
40
100
P
Active
local
192.168.40.3
192.168.40.1

R2#sh standby

FastEthernet1/0Group 40


State is Active

1 state change, last state change 00:26:03


Virtual IP address is 192.168.40.1


Active virtual MAC address is 0000.0c07.ac28


Local
virtual MAC address is 0000.0c07.ac28 (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 2.196 secs


Preemption enabled


Active router is local


Standby router is 192.168.40.3, priority 50 (expires in 7.252 sec)


Priority 100 (default 100)


Track interface Ethernet0/0 state Up decrement 60

IP redundancy name is “hsrp-Fa1/0-40” (default)

R2# 

 Client host:

C:\>ipconfig

 

Windows IP Configuration

 

 

Ethernet adapter Gig:

 

Connection-specific DNS Suffix . :

IP Address. . . . . . . . . . . . : 192.168.40.104

Subnet Mask . . . . . . . . . . . : 255.255.255.0


Default Gateway . . . . . . . . . : 192.168.40.1

C:\> 

The host in the LAN in configured with the HSRP virtual IP address as the default gateway, let’s ping it and see what MAC address is assigned to it:

C:\>ping 192.168.40.1

 

Pinging 192.168.40.1 with 32 bytes of data:

 

Reply from 192.168.40.1: bytes=32 time=71ms TTL=255

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=36ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

 

Ping statistics for 192.168.40.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 31ms, Maximum = 71ms, Average = 46ms

 

C:\>arp -a

 

Interface: 192.168.40.104 — 0x3

Internet Address Physical Address Type


192.168.40.1
00-00-0c-07-ac-28
dynamic

 

C:\> 

Note that the default gateway MAC address matches the one of the virtual gateway from the previous routers outputs about HSRP information.

00-00-0c-07-ac is assigned by default and 28 in hexadecimal is the representation of the group 40 in decimal.

With trace route from the host you can note the path taken by the traffic to reach the host 10.10.10.1

C:\>tracert 10.10.10.1

 

Tracing route to 10.10.10.1 over a maximum of 30 hops

 

1 36 ms 32 ms 42 ms 192.168.40.2

2 51 ms 74 ms 77 ms 192.168.12.1

3 125 ms 62 ms 61 ms 10.10.10.1

 

Trace complete.

 

C:\> 

the traffic transparently took R2 as the default gateway because it is the active router in the HSRP group 40.

 

TESTING

In this second part let’s simulate two types of failure:

– R2 failure, by completely shutting down R2.

– R2 upstream interface e0/0.

 

1- R2 failure, by completely shutting down R2

 

To see how HSRP works we enabled “debug standby events” along with a non-stop ping from the LAN host.

C:\>ping -t 192.168.40.1

 

Pinging 192.168.40.1 with 32 bytes of data:

 

Reply from 192.168.40.1: bytes=32 time=39ms TTL=255

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=20ms TTL=255

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Request timed out.

Request timed out.

Reply from 192.168.40.1: bytes=32 time=63ms TTL=255

Reply from 192.168.40.1: bytes=32 time=32ms TTL=255

Reply from 192.168.40.1: bytes=32 time=63ms TTL=255

Reply from 192.168.40.1: bytes=32 time=62ms TTL=255

Reply from 192.168.40.1: bytes=32 time=32ms TTL=255

Reply from 192.168.40.1: bytes=32 time=16ms TTL=255

 

Ping statistics for 192.168.40.1:

Packets: Sent = 13, Received = 11, Lost = 2 (15% loss),

Approximate round trip times in milli-seconds:

Minimum = 16ms, Maximum = 63ms, Average = 42ms

Control-C

^C

C:\> 

Note that the two lines of request timeout correspond to the default standby timeout of 10 seconds with the convergence time of the routing protocol in place.

Now we can verify the new path taken:

C:\>tracert 10.10.10.1

 

Tracing route to 10.10.10.1 over a maximum of 30 hops

 

1 19 ms 46 ms 35 ms 192.168.40.3

2 51 ms 73 ms 62 ms 192.168.13.1

3 406 ms 79 ms 60 ms 10.10.10.1

 

Trace complete.

 

C:\> 

Even though the default gateway IP and MAC addresses are still the same, the Traffic path to 10.10.10.1 now has changed and niow forwarded through R3.

C:\>arp -a

 

Interface: 192.168.40.104 — 0x3

Internet Address Physical Address Type


192.168.40.1
00-00-0c-07-ac-28
dynamic

 

Interface: 192.168.45.104 — 0x5

Internet Address Physical Address Type

192.168.45.1 00-0e-a6-49-ea-ba dynamic

 

C:\> 

here is the result of debugging:

Mar 1 00:03:21.320: %SYS-5-CONFIG_I: Configured from console by admin on console

Mar 1 00:03:57.763: HSRP: Fa1/0 Grp 40 Standby: c/Active timer expired (192.168.40.2)

!!!!First the holddown timer of 3x3sec expired!!!!

Mar 1 00:03:57.767: HSRP: Fa1/0 Grp 40 Active router is local, was
192.168.40.2

Mar 1 00:03:57.771: HSRP: Fa1/0 Grp 40 Standby router is unknown, was
local

Mar 1 00:03:57.771: HSRP: Fa1/0 Grp 40 Standby -> Active

Mar 1 00:03:57.775: %HSRP-6-STATECHANGE: FastEthernet1/0 Grp 40 state Standby -> Active

Mar 1 00:03:57.779: HSRP: Fa1/0 Grp 40 Redundancy “hsrp-Fa1/0-40” state Standby -> Active

Mar 1 00:04:00.787: HSRP: Fa1/0 Grp 40 Redundancy group hsrp-Fa1/0-40 state Active -> Active

Mar 1 00:04:03.623: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 10: Neighbor 192.168.40.2 (FastEthernet1/0) is down: holding time expired

Mar 1 00:04:03.791: HSRP: Fa1/0 Grp 40 Redundancy group hsrp-Fa1/0-40 state Active -> Active

 The interface F1/0 immediately take over and change from standby to active:

R3:

R3#sh standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Fa1/0
40
50
Active
local
unknown
192.168.40.1

R3#sh standby

FastEthernet1/0 – Group 40


State is Active

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


Virtual IP address is 192.168.40.1


Active virtual MAC address is 0000.0c07.ac28


Local virtual MAC address is 0000.0c07.ac28 (v1 default)

Hello time 3 sec, hold time 10 sec

Next hello sent in 1.684 secs

Preemption disabled


Active router is local


Standby router is unknown


Priority 50 (configured 50)

IP redundancy name is “hsrp-Fa1/0-40” (default)

R3# 

Finally R2 is back to production:

C:\>ping -t 192.168.40.1

 

Pinging 192.168.40.1 with 32 bytes of data:

 

Reply from 192.168.40.1: bytes=32 time=32ms TTL=255

Reply from 192.168.40.1: bytes=32 time=33ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

Reply from 192.168.40.1: bytes=32 time=98ms TTL=255

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=28ms TTL=255

Reply from 192.168.40.1: bytes=32 time=29ms TTL=255

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=16ms TTL=255

Request timed out.

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

Reply from 192.168.40.1: bytes=32 time=3ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

Reply from 192.168.40.1: bytes=32 time=32ms TTL=255

Reply from 192.168.40.1: bytes=32 time=20ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

 

Ping statistics for 192.168.40.1:

Packets: Sent = 94, Received = 93, Lost = 1 (1% loss),

Approximate round trip times in milli-seconds:

Minimum = 3ms, Maximum = 98ms, Average = 35ms

Control-C

^C

C:\> 

 

C:\>tracert 10.10.10.1

 

Tracing route to 10.10.10.1 over a maximum of 30 hops

 

1 24 ms 13 ms 48 ms 192.168.40.2

2 47 ms 62 ms 81 ms 192.168.12.1

3 114 ms 57 ms 62 ms 10.10.10.1

 

Trace complete.

 

C:\> 

Note that the network took less than the first time to converge and change the path trough R2 again because there is no timers, only hello exchanged and the decision is immediately taken to give the active state back to R2, this is confirmed by the following debug output from R3:

Mar 1 00:17:55.918: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 10: Neighbor 192.168.40.2 (FastEthernet1/0) is up: new adjacency

Mar 1 00:18:12.870: HSRP: Fa1/0 Grp 40 Active: j/Coup rcvd from higher pri router (100/192.168.40.2)

Mar 1 00:18:12.874: HSRP: Fa1/0 Grp 40 Active router is 192.168.40.2, was local

Mar 1 00:18:12.878: HSRP: Fa1/0 Grp 40 Active -> Speak

Mar 1 00:18:12.878: %HSRP-6-STATECHANGE: FastEthernet1/0 Grp 40 state Active -> Speak

Mar 1 00:18:12.882: HSRP: Fa1/0 Grp 40 Redundancy “hsrp-Fa1/0-40” state Active -> Speak

Mar 1 00:18:12.898: HSRP: Fa1/0 API MAC address update

Mar 1 00:18:22.874: HSRP: Fa1/0 Grp 40 Speak: d/Standby timer expired (unknown)

Mar 1 00:18:22.878: HSRP: Fa1/0 Grp 40 Standby router is local

Mar 1 00:18:22.878: HSRP: Fa1/0 Grp 40 Speak -> Standby

Mar 1 00:18:22.878: HSRP: Fa1/0 Grp 40 Redundancy “hsrp-Fa1/0-40” state Speak -> Standby

R3# 

After receiving hello from R2 telling that it has better priority R3 switch to the “Active” state to actively participate in the election, and the result is to go back to standby state.

2- R2 upstream interface e0/0.

First we shutdown the outgoing interface on R2 and inspect the behavior of HSRP:

R2:

R2(config-if)#int e0/0

R2(config-if)#sh

R2(config-if)#

Mar 1 00:19:43.280: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 10: Neighbor 192.168.12.1 (Ethernet0/0) is down: interface down

Mar 1 00:19:45.180: %LINK-5-CHANGED: Interface Ethernet0/0, changed state to administratively down

Mar 1 00:19:46.180: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down

Mar 1 00:20:43.641: %HSRP-6-STATECHANGE: FastEthernet1/0 Grp 40 state Active -> Speak

R3:

Aug 23 14:07:35.410: %SYS-5-CONFIG_I: Configured from console by admin on console

Aug 23 14:07:54.297: HSRP: Fa1/0 Grp 40 Standby: h/Hello rcvd from lower pri Active router (40/192.168.40.2)

Aug 23 14:07:54.301: HSRP: Fa1/0 Grp 40 Starting minimum preempt delay (60 secs)

Aug 23 14:08:54.341: HSRP: Fa1/0 Grp 40 Minimum preempt delay expired

Aug 23 14:08:54.345: HSRP: Fa1/0 Grp 40 Active router is local, was 192.168.40.2

Aug 23 14:08:54.349: HSRP: Fa1/0 Grp 40 Standby router is unknown, was local

Aug 23 14:08:54.353: HSRP: Fa1/0 Grp 40 Standby -> Active

Aug 23 14:08:54.353: %HSRP-6-STATECHANGE: FastEthernet1/0 Grp 40 state Standby -> Active

Aug 23 14:08:54.357: HSRP: Fa1/0 Grp 40 Redundancy “hsrp-Fa1/0-40” state Standby -> Active

Aug 23 14:08:54.457: HSRP: Fa1/0 Grp 40 Active: i/Resign rcvd (40/192.168.40.2)

Aug 23 14:08:55.424: HSRP: Fa1/0 Grp 40 Standby router is 192.168.40.2

Aug 23 14:08:57.459: HSRP: Fa1/0 Grp 40 Redundancy group hsrp-Fa1/0-40 state Active -> Active

Aug 23 14:09:00.462: HSRP: Fa1/0 Grp 40 Redundancy group hsrp-Fa1/0-40 state Active -> Active

R3# 

 

R3#sh standby

FastEthernet1/0 – Group 40


State is Active

29 state changes, last state change 00:00:28

Virtual IP address is 192.168.40.1

Active virtual MAC address is 0000.0c07.ac28

Local virtual MAC address is 0000.0c07.ac28 (v1 default)

Hello time 500 msec, hold time 1 sec

Next hello sent in 0.096 secs

Preemption enabled, delay min 60 secs

Active router is local


Standby router is 192.168.40.2, priority 40 (expires in 0.568 sec)


Priority 50 (configured 50)

IP redundancy name is “hsrp-Fa1/0-40” (default)

R3# 

 

C:\>ping -t 192.168.40.1

 

Pinging 192.168.40.1 with 32 bytes of data:

 


Reply from 192.168.40.1: bytes=32 time=63ms TTL=255

Reply from 192.168.40.1: bytes=32 time=16ms TTL=255

Reply from 192.168.40.1: bytes=32 time=32ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

Request timed out.

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=47ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

Reply from 192.168.40.1: bytes=32 time=63ms TTL=255

Reply from 192.168.40.1: bytes=32 time=63ms TTL=255

Reply from 192.168.40.1: bytes=32 time=31ms TTL=255

Reply from 192.168.40.1: bytes=32 time=16ms TTL=255


 

Ping statistics for 192.168.40.1:

Packets: Sent = 30, Received = 29, Lost = 1 (3% loss),

Approximate round trip times in milli-seconds:

Minimum = 16ms, Maximum = 63ms, Average = 33ms

Control-C

^C

C:\> 

Second we activate back the outgoing interface on R2 and inspect the behavior of HSRP:

R2:

R2(config-if)#int e0/0

R2(config-if)#no sh

R2(config-if)#

Mar 1 00:23:56.542: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up

Mar 1 00:23:57.542: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up

Mar 1 00:23:57.834: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 10: Neighbor 192.168.12.1 (Ethernet0/0) is up: new adjacency

Mar 1 00:24:55.263: %HSRP-6-STATECHANGE: FastEthernet1/0 Grp 40 state Standby -> Active

R3:

Aug 23 14:12:02.005: HSRP: Fa1/0 API arp for proto, 192.168.40.1 is active vIP

Aug 23 14:13:06.062: HSRP: Fa1/0 Grp 40 Active: j/Coup rcvd from higher pri router (100/192.168.40.2)

Aug 23 14:13:06.066: HSRP: Fa1/0 Grp 40 Active router is 192.168.40.2, was local

Aug 23 14:13:06.070: HSRP: Fa1/0 Grp 40 Standby router is unknown, was 192.168.40.2

Aug 23 14:13:06.074: HSRP: Fa1/0 Grp 40 Active -> Speak

Aug 23 14:13:06.074: %HSRP-6-STATECHANGE: FastEthernet1/0 Grp 40 state Active -> Speak

Aug 23 14:13:06.078: HSRP: Fa1/0 Grp 40 Redundancy “hsrp-Fa1/0-40” state Active -> Speak

Aug 23 14:13:06.086: HSRP: Fa1/0 API MAC address update

Aug 23 14:13:07.066: HSRP: Fa1/0 Grp 40 Speak: d/Standby timer expired (unknown)

Aug 23 14:13:07.066: HSRP: Fa1/0 Grp 40 Standby router is local

Aug 23 14:13:07.070: HSRP: Fa1/0 Grp 40 Speak -> Standby

Aug 23 14:13:07.074: HSRP: Fa1/0 Grp 40 Redundancy “hsrp-Fa1/0-40” state Speak -> Standby

R3# 

 

R3#sh standby

FastEthernet1/0 – Group 40


State is Standby

31 state changes, last state change 00:00:23

Virtual IP address is 192.168.40.1

Active virtual MAC address is 0000.0c07.ac28

Local virtual MAC address is 0000.0c07.ac28 (v1 default)

Hello time 500 msec, hold time 1 sec

Next hello sent in 0.072 secs

Preemption enabled, delay min 60 secs


Active router is 192.168.40.2, priority 100 (expires in 0.488 sec)


Standby router is local


Priority 50 (configured 50)

IP redundancy name is “hsrp-Fa1/0-40” (default)

R3# 

Figure 4 depicts captured traffic from the LAN between the two routers which shows HSRP traffic (Hello messages) between R2 and R3.

 

Figure 4: HSRP traffic

You can note “gratuitous ARP” packets sent by the virtual router to inform the switch about IP changes.

First Hop Redundancy protocol comparison (HSRP,VRRP,GLBP)


Protocol
Features

HSRP

(Hot Standby Router protocol)

VRRP

(Virtual Redundancy Router Protocol)

GLBP

(Gateway Load Balancing Protocol)

Router role – 1 active router.- 1 standby router.- 1 or more listening routers. – 1 master router.- 1 or more backup routers. – 1 AVG (Active Virtual Gateway).- up to 4 AVF routers on the group (Active Virtual Forwarder) passing traffic.- up to 1024 virtual routers (GLBP groups) per physical interface.
– Use virtual ip address. – Can use real router ip address, if not, the one with highest priority become master. – Use virtual ip address.
Scope Cisco proprietary IEEE standard Cisco proprietary
Election Active Router:
1-Highest Priority
2-Highest IP (tiebreaker)
Master Router: (*)
1-Highest Priority
2-Highest IP (tiebreaker)
Active Virtual Gateway:
1-Highest Priority
2-Highest IP (tiebreaker)
Optimization features Tracking

yes

yes

yes

Preempt

yes

yes

yes

Timer adjustments

yes

yes

yes

Traffic type 224.0.0.2 – udp 1985 (version1)
224.0.0.102-udp 1985 (version2)
224.0.0.18 – IP 112 224.0.0.102 udp 3222
Timers Hello – 3 seconds Advertisement – 1 second Hello – 3 seconds
(Hold) 10 seconds (Master Down Interval)3 * Advertisement + skew time (Hold) 10 seconds
(Skew time)(256-priority) / 256
Load-balancing functionality – Multiple HSRP group per interface/SVI/routed int. – Multiple VRRP group per interface/SVI/routed int. Load-balancing oriented- Weighted algorithm.- Host-dependent algorithm.

– Round-Robin algorithm (default).

Requires appropriate distribution of Virtual GW IP per Clients for optimal load-balancing.(generally through DHCP) Requires appropriate distribution of Virtual GW IP per Clients for optimal load-balancing.(generally through DHCP) Clients are transparently updated with virtual MAC according to load-balancing algorithm through ARP requesting a unique virtual gateway.

* If the group VRRP Virtual IP on the master (higher priority) is the real IP configured on a different VRRP (Backup with lower priority) IOS will manage to make the VRRP router with the real IP, the master, by setting its priority to 255, knowing that the configurable range is [1-254].

%d bloggers like this: