Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Crazy HSRP !!

Hi all,

I have 2 vlans on a switch and 2 gateway routers, through dot1q encapsulated subinterfaces each router can communicate with those 2 vlans.

My task is to use HSRP to make router A active for vlan1 and standby for vlan2, and in the other hand make router B standby for vlan1 and active for vlan2.

Router 1 subinterface is floating between HSRP states with no changes in interfaces states (up all the time)

I cannot detect what cause HSRP state changes

============R1

04:33:43: %STANDBY-6-STATECHANGE: Standby: 40: FastEthernet0/0.40 state Speak -> Standby

04:33:43: %STANDBY-6-STATECHANGE: Standby: 40: FastEthernet0/0.40 state Standby -> Active

04:33:43: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Speak -> Standby

04:33:43: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Standby -> Active

04:33:50: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Active -> Speak

04:34:00: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Speak -> Standby

04:34:10: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Standby -> Active

04:34:23: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Active -> Speak

04:34:33: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Speak -> Standby

R1#sh standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active addr Standby addr Group addr

Fa0/0.40 40 100 P Init 192.168.40.2 unknown 192.168.40.40

Fa0/0.50 50 50 Speak 192.168.50.1 unknown 192.168.50.50

R1#

==> in spite of the biggest priority of Fa0/0.40 (100) router R3 is the active one (priority = 50)??

Any help?

7 REPLIES

Re: Crazy HSRP !!

State changes is because the HSRP hellos come and go. Active HSRP sends hello every 3 secs, if the standby router does not rx any hellos in 3 consecutive times it thinks the active is gone and resume the active role.

if you look at the output above you will find that R1 doe snot know who the standby, if most likely HSRP hellos are lost between the two routers. R3 is active probably because it does not find any other router in that segment, 192.168.40.x subnet, that's connectivity issue. Check if R3 HSRP is alos flapping from standby to acitve to standby. Troubleshoot why the two routers are not seeing each others hello. If there is a device in between check the vlan, STP, loop, etc. Can each router ping each other.

Please rate all posts.

Silver

Re: Crazy HSRP !!

I do not think that HSRP will work the way you are setting it up. I have always seen it on the same subnet with two gateway routers on the same VLAN. I do not think it will work..However to answer your question on why the HSRP hellos are not seeing each other is probably because you do not have Multicast traffic enabled on the switch. HSRP uses multicast to send hellos back and forth. Make sure you have multicast allowed on your VLAN's..

New Member

Re: Crazy HSRP !!

I would tend to believe that the hello messages are getting thru sometimes since it is going active->speak-> standby. you can debug standby and see what is happening (usual risk with running debug). what does the other router display?

New Member

Re: Crazy HSRP !!

========router R1

interface FastEthernet0/0.40

encapsulation dot1Q 40

ip address 192.168.40.1 255.255.255.0

no ip redirects

no ip directed-broadcast

standby 40 priority 100 preempt

standby 40 ip 192.168.40.40

!

interface FastEthernet0/0.50

encapsulation dot1Q 50

ip address 192.168.50.2 255.255.255.0

no ip redirects

no ip directed-broadcast

standby 50 priority 50

standby 50 ip 192.168.50.50

======== floating fa 0/0.50 on R1

02:34:29: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Active

-> Speak

02:34:39: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Speak

-> Standby

02:34:49: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Standby

-> Active

02:35:02: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Active

-> Speak

02:35:12: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Speak

-> Standby

=========router R3

interface Ethernet0/0.40

encapsulation dot1Q 40

standby 40 ip 192.168.40.40

standby 40 priority 50

standby 40 preempt

!

interface Ethernet0/0.50

encapsulation dot1Q 50

ip address 192.168.50.1 255.255.255.0

standby 50 ip 192.168.50.50

standby 50 preempt

========== No floating interfaces on R3

R3#sh standby brief

P indicates configured to preempt.

|

Interface Grp Prio P State Active Standby Virtual IP

Et0/0.40 40 50 P Init unknown unknown 192.168.40.40

Et0/0.50 50 100 P Active local unknown 192.168.50.50

R3#

=========Switch config

interface FastEthernet0/21

switchport access vlan 40

!

interface FastEthernet0/22

switchport access vlan 50

!

interface FastEthernet0/23

switchport trunk encapsulation dot1q

switchport trunk native vlan 666

switchport trunk allowed vlan 1,40,50,1002-1005

switchport mode trunk

!

interface FastEthernet0/24

switchport trunk encapsulation dot1q

switchport trunk native vlan 666

switchport trunk allowed vlan 1,40,50,1002-1005

switchport mode trunk

=====

and the only successful ping is from R3 to (fa0/0.40)

New Member

Re: Crazy HSRP !!

on R1 add

interface FastEthernet0/0.50

standby 50 preempt

New Member

Re: Crazy HSRP !!

===== Here is an exerpt of debug standby on R1

=====

02:50:25: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Active pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:27: SB50:FastEthernet0/0.50 Hello in 192.168.50.1 Active pri 100 hel 3 hol 10 ip 192.168.50.50

02:50:27: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Active -> Speak

02:50:27: SB50:FastEthernet0/0.50 Resign out 192.168.50.2 Speak pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:27: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Speak pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:30: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Speak pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:32: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Speak pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:35: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Speak pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:37: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Speak -> Standby

02:50:37: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Standby pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:40: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Standby pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:42: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Standby pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:45: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Standby pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:47: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Standby -> Active

02:50:47: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Active pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:47: SB: FastEthernet0/0.50 Adding 0000.0c07.ac32 to address filter

02:50:50: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Active pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:52: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Active pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:55: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Active pri 50 hel 3 hol 10 ip 192.168.50.50

02:50:58: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Active pri 50 hel 3 hol 10 ip 192.168.50.50

02:51:00: SB50:FastEthernet0/0.50 Hello in 192.168.50.1 Active pri 100 hel 3 hol 10 ip 192.168.50.50

02:51:00: %STANDBY-6-STATECHANGE: Standby: 50: FastEthernet0/0.50 state Active -> Speak

02:51:00: SB50:FastEthernet0/0.50 Resign out 192.168.50.2 Speak pri 50 hel 3 hol 10 ip 192.168.50.50

02:51:00: SB50:FastEthernet0/0.50 Hello out 192.168.50.2 Speak pri 50 hel 3 hol 10 ip 192.168.50.50

=====

===== it seems that R1 can receive hello standby packet from R3 (192.168.50.2)

New Member

Re: Crazy HSRP !!

I think this is caused by Spanning Tree.

When HSRP goes from Active->Speak it will reset the interface in order to remove the virtual MAC address. This will toggle the port, and cause Spanning Tree to restart negotiation on that port, which places it in a non-forwarding state for 30 secs.

During this time neither HSRP router will see the HSRP Hello packets from the other HSRP router, and both will become Active.

The fix is to configure "spantree portfast" on the switch ports connected to the HSRP routers.

Another workaround is to configure "standby use-bia" on the HSRP interfaces so the ports are not toggled when the HSRP MAC address is removed.

Ian

280
Views
0
Helpful
7
Replies
CreatePlease login to create content