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)#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
*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
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.
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.
Thanks for the detailed presentation of your tests :-)
I am totally agree with the results. Please find my comments for each step.
to check interface ip priority
R1 configured first and then R2
Expected as there is no pre-emption (and even with pre-emption enabled because of CSCdv91652)
both rebooted at same time
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.
110 to R1(r2 still on default)
Expected as the preemption is not enabled on R1.
restarted both routers
Expected as the routers boots at the same time and in this case the highest HSRP priority makes R1 active.
made r2 priority 115 and issued preempt on R1
Expected as the preemption is not enabled (yet) on R2 although R2 priority is higher.
removed preempt on r1 and configured on r2
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.
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.