12-23-2011 11:27 AM - edited 03-04-2019 02:44 PM
Hi All,
The default behavior of HSRP(with Priorities to default) should make the router active if it has highest interface IP address. But it is not happening practically (note that R1 with IP 192.168.10.2 has been configured first)
R2(config)#interface vlan 10
R2(config-if)#ip add 192
*Mar 1 00:04:42.979: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
R2(config-if)#ip add 192.168.10.3 255.255.255.0
R2(config-if)#st
R2(config-if)#standby 10 ip 192.168.10.1
R2(config-if)#do ping 192.168.10.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 12/31/48 ms
R2(config-if)#exit
R2(config)#
*Mar 1 00:05:32.727: %HSRP-5-STATECHANGE: Vlan10 Grp 10 state Speak -> Standby
R2(config)#do show standby
Vlan10 - Group 10
State is Standby
1 state change, last state change 00:00:24
Virtual IP address is 192.168.10.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 2.808 secs
Preemption disabled
Active router is 192.168.10.2, priority 100 (expires in 7.360 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is "hsrp-Vl10-10" (default)
Any reason for this behavior? Please let me know if I am wrong.
Regards,
Ravi
Solved! Go to Solution.
12-23-2011 01:41 PM
Hello Ravindra, Cflory,
This behaviour should be the expected one as documented by bug CSCdv91652 - HSRP should not preempt if priorities are equal
Before in earlier versions it should have preempted, but the behaviour has been changed since.
This ddts is an enhancement to the HSRP preempt mechanism.
An Active HSRP router may be preempted by an equal priority non-Active router if the non-Active router has a numerically greater interface IP address.
This is the current expected behaviour, since the interface IP address is used as a tie-breaker in situations where the prioritues are equal.
This ddts changes that behaviour such that an equal priority non-Active router will never preempt the current Active router.
Hope that helps.
Kind regards.
Karim
12-23-2011 03:51 PM
Hi Ravi
Thanks for the detailed presentation of your tests :-)
I am totally agree with the results. Please find my comments for each step.
Conditions/router status | R1 192.168.10.2(f0/0) | R2 192.168.10.3(f0/0) |
|
to check interface ip priority | R1 | R2 | |
R1 configured first and then R2 | active | backup | Expected as there is no pre-emption (and even with pre-emption enabled because of CSCdv91652) |
both rebooted at same time | backup | active | Expected as the routers boots at the same time and in this case the highest IP @ of R2 is the tie breaker for the HSRP master election. |
Priority | R1 | R2 | |
110 to R1(r2 still on default) | backup | active | Expected as the preemption is not enabled on R1. |
restarted both routers | active | backup | Expected as the routers boots at the same time and in this case the highest HSRP priority makes R1 active. |
Preempt | R1 | R2 | |
made r2 priority 115 and issued preempt on R1 | active | backup | Expected as the preemption is not enabled (yet) on R2 although R2 priority is higher. |
removed preempt on r1 and configured on r2 | backup | active | Expected after preemption has been enabled on R2 which has higher priority. Note The result would have been the same even without removing preemption on R1. |
Hope that helps.
Kind regards.
Karim
12-23-2011 04:56 PM
Dear friends,
Indeed, what you see is expected. The IOS Configuration Guide for HSRP at
puts it quite clearly:
A standby router with equal priority but a higher IP address will not preempt the active router.
Best regards,
Peter
12-23-2011 12:22 PM
"Preemption disabled"
Enable preemption on your interfaces with 'standby 10 preempt". I could be wrong here, but I believe that is the issue.
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094e8c.shtml
!--- Allows the router to become the active router when the priority !--- is higher than all other HSRP-configured routers in the hot standby group. !--- If you do not use the standby preempt command in the configuration !--- for a router, that router does not become the active router, even if !--- the priority is higher than all other routers.
12-23-2011 12:31 PM
Hi Cflory,
I wanted to check the default behavior of the HSRP with default priorities. Since the IP address of the Vlan 10 on R2 is higher than R1, R2 should have been the active one. But went to backup. It does not make any sense to me why R1 is still active.
Any help will be appreciated.
Regards,
Ravi
12-23-2011 12:34 PM
I'm not telling you to change priorities, I'm suggesting you make either router 'preempt' to become active based on the higher IP address.
12-23-2011 12:42 PM
Hi Cflory,
Even adding the preempt it does not work. The preempt only works with priority. Please consider the output
R2(config)#interface vlan 10
R2(config-if)#sw
R2(config-if)#st
R2(config-if)#standby 10 pre
R2(config-if)#standby 10 preempt
R2(config-if)#standby 10 preempt
R2(config-if)#do show stan
R2(config-if)#do show standby
Vlan10 - Group 10
State is Standby
1 state change, last state change 01:27:27
Virtual IP address is 192.168.10.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.176 secs
Preemption enabled
Active router is 192.168.10.2, priority 100 (expires in 9.276 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is "hsrp-Vl10-10" (default)
R2(config-if)#do show standby
Vlan10 - Group 10
State is Standby
1 state change, last state change 01:27:44
Virtual IP address is 192.168.10.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.316 secs
Preemption enabled
Active router is 192.168.10.2, priority 100 (expires in 7.432 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is "hsrp-Vl10-10" (default)
R2(config-if)#do show standby
Vlan10 - Group 10
State is Standby
1 state change, last state change 01:27:48
Virtual IP address is 192.168.10.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.236 secs
Preemption enabled
Active router is 192.168.10.2, priority 100 (expires in 9.352 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is "hsrp-Vl10-10" (default)
Regards,
Ravi
12-23-2011 01:04 PM
Ok, thanks for trying, I was just curious. I am also seeing the same thing happen in my lab under 15.1 code. I am not able to make the higher IP address active, without a priority.
Perhaps this is an old ability and no longer functional. Maybe Cisco is requiring priorities now? I suppose opening a TAC case could shed some light.
Their official stance (which confirms the ability - and the post was updated 9/22/11 - Perhaps for the GLBP questionst):
http://www.cisco.com/en/US/tech/tk648/tk362/technologies_q_and_a_item09186a00800a9679.shtml
A. The priority field is used to elect the active router and the standby router for the specific group. In the case of an equal priority, the router with the highest IP address for the respective group is elected as active. Furthermore, if there are more than two routers in the group, the second highest IP address determines the standby router and the other router/routers are in the listen state.
12-23-2011 01:41 PM
Hello Ravindra, Cflory,
This behaviour should be the expected one as documented by bug CSCdv91652 - HSRP should not preempt if priorities are equal
Before in earlier versions it should have preempted, but the behaviour has been changed since.
This ddts is an enhancement to the HSRP preempt mechanism.
An Active HSRP router may be preempted by an equal priority non-Active router if the non-Active router has a numerically greater interface IP address.
This is the current expected behaviour, since the interface IP address is used as a tie-breaker in situations where the prioritues are equal.
This ddts changes that behaviour such that an equal priority non-Active router will never preempt the current Active router.
Hope that helps.
Kind regards.
Karim
12-23-2011 03:10 PM
Below are my results. Please check Karim.
Please note that the new test results in the below table follow the preceding state or preceding result
Conditions/router status | R1 192.168.10.2(f0/0) | R2 192.168.10.3(f0/0) |
to check interface ip priority | ||
R1 configured first and then R2 | active | backup |
both rebooted at same time | backup | active |
Priority | ||
110 to R1(r2 still on default) | backup | active |
restarted both routers | active | backup |
Preempt | ||
made r2 priority 115 and issued preempt on R1 | active | backup |
removed preempt on r1 and configured on r2 | backup | active |
These are my test results and seem to match the theory. Please do let me know if there is any change.
Regards,
Ravi
12-23-2011 03:51 PM
Hi Ravi
Thanks for the detailed presentation of your tests :-)
I am totally agree with the results. Please find my comments for each step.
Conditions/router status | R1 192.168.10.2(f0/0) | R2 192.168.10.3(f0/0) |
|
to check interface ip priority | R1 | R2 | |
R1 configured first and then R2 | active | backup | Expected as there is no pre-emption (and even with pre-emption enabled because of CSCdv91652) |
both rebooted at same time | backup | active | Expected as the routers boots at the same time and in this case the highest IP @ of R2 is the tie breaker for the HSRP master election. |
Priority | R1 | R2 | |
110 to R1(r2 still on default) | backup | active | Expected as the preemption is not enabled on R1. |
restarted both routers | active | backup | Expected as the routers boots at the same time and in this case the highest HSRP priority makes R1 active. |
Preempt | R1 | R2 | |
made r2 priority 115 and issued preempt on R1 | active | backup | Expected as the preemption is not enabled (yet) on R2 although R2 priority is higher. |
removed preempt on r1 and configured on r2 | backup | active | Expected after preemption has been enabled on R2 which has higher priority. Note The result would have been the same even without removing preemption on R1. |
Hope that helps.
Kind regards.
Karim
12-23-2011 04:56 PM
Dear friends,
Indeed, what you see is expected. The IOS Configuration Guide for HSRP at
puts it quite clearly:
A standby router with equal priority but a higher IP address will not preempt the active router.
Best regards,
Peter
12-23-2011 05:02 PM
Thanks Peter for pointing out the exact sentence from the documentation (more clear than a bug ID :-)
Regards.
Karim
12-24-2011 12:14 AM
Thank you all.
Now I under the behavior of the priority and preempt.
Regards,
Ravi
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide