cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3631
Views
11
Helpful
15
Replies

HSRP preempt working without command for Standby and Listen

Hi all,

I have configured 3 routers without

preempt

and configured R1, R2 and R3 respectively.

In my case R1 becomes active regardless of Highest IP address, there is no

preemption

so i am ok with that.

now i configured R2 and it becomes Standby, till here all are ok.

But, when i configured R3 then R2 becomes Listen and R3 became stan

dby, while there is no

preemption

 

I am also attaching my lab Image (where All IPs are 192.168.x.x/24)

 

Thanks!!

Sharanjeet_Kumar_0-1690278277189.png

 

1 Accepted Solution

Accepted Solutions

Ritin Singh
Level 1
Level 1

Hi @Sharanjeet_Kumar 

 The

preempt

command enables the Hot Standby Router Protocol (HSRP) router with the highest priority to immediately become the active router. Priority is determined first by the configured priority value, and then by the IP address. In each case, a higher value is of greater priority.

Thank you !!

View solution in original post

15 Replies 15

Hello,

post the full configs of all routers, and indicate the images (IOS versions) you are using...

Hi @Georg Pauwen ,

BOOTLDR: 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)

configuration files of R1, R2 and R3 are attached.

 

Hi @Sharanjeet_Kumar 

 You are focusing on the

preemption

probably because you believe without the

preempt

should not be switchover, right? But you are forgetting that by adding a new device to the group there will be election  and the devices will choose a new active in case the parameters are different. 

 The

preemption

will take place after the election in case the active went down and return to the gruop again. 

Hi @Flavio Miranda ,

But you are forgetting that by adding a new device to the group there will be election  and the devices will choose a new active in case the parameters are different. --> I think i am clear about this fact that if i do not enable

preempt

and will add new device in the same group then there will not be any election happen untill unless the active is down (this is for active only i.e R1)

But, in my case let suppose initially 2 routers were there R1 & R2.....R1 ---> Active, R2 ---> Standby. when i add R3 with highest ip i.e 1.3 then the states became R-->Active, R2-->Listen, R3-->standby. My curiosity is why the election process took place for R2 & R3 and why not for active while its IP was lowest.

 

 

 But if the R2 is in listen this means it is still negociating, right? What was the final scenario. What do you see if you ruh show standby brief?

And the election process will happen any time you add a device to the group.

Hi @Flavio Miranda ,

R2 is negotiating with R3 for Standby but no one is negotiating with R1 for Active even if they have highest IP address and that is understood that

preemption

is not enabled so this will occur, only issue is that why it is negotiating for Standby on the basis of highest ip address when i add New router in the existing HSRP group.

 

  

Ritin Singh
Level 1
Level 1

Hi @Sharanjeet_Kumar 

 The

preempt

command enables the Hot Standby Router Protocol (HSRP) router with the highest priority to immediately become the active router. Priority is determined first by the configured priority value, and then by the IP address. In each case, a higher value is of greater priority.

Thank you !!

Peter Paluch
Cisco Employee
Cisco Employee

My friends,

Please allow me to join.

There are a few misunderstandings appearing here; let me try to clarify them.

In HSRP,

preemption

is "a license to kill". In other words, HSRP

preemption

allows a router to hijack a role from another router that is still alive. This is very important: If a router dies and another router assumes its place, that is not a

preemption

A

preemption

always means yanking a role from a router that is still up and running. In a dynamic protocol, replacing a failed member is the basic functionality, otherwise the dynamic protocol wouldn't even make sense, so that is nothing to configure or consider a special function. However, forcing an already working member to relinquish its function and transfer it to me, that is something special - and that is what we call preemption.

Now, in HSRP, the Standby role is always preemptive, and you cannot modify this behavior with any configuration, no exception. It makes sense, and it makes the behavior of the standby group a little more predictable because the Standby router will always be the router that is best entitled for that (the highest priority, then the highest IP). There is only one exception here: If there is already a live router in the Standby role, and a new router comes online that has the same priority but a higher IP, it will not preempt the current Standby. This also makes sense: A higher IP hardly means that the router is any better or more entitled than the current Standby, so why cause a churn? EDIT: I made a wrong statement here. Correcting myself.

The Active role in HSRP can be made preemptive by explicit configuration, and once again - keep in mind that preemption is "a license to kill" - if a router is configured with

standby ... preempt

that router is allowed to yank an Active role from another router even if that router is still alive and running. You cannot prevent a router from relinquishing its own Active role; that could end up in dual Active scenarios and wouldn't make sense anyway.

Flavio, regarding the elections, you are essentially correct, but there's more to be said. Any HSRP speaker goes through a series of states when it comes up:

*Init: The starting state

*Learn: Passively listening for HSRP packets on the wire, trying to acquire the virtual IP address of the standby group

*Listen: Passively listening for HSRP packet on the wire, monitoring the existence of Active and Standby speakers in the group. If Active and Standby routers are up and running, and if there is no reason to preempt them, the other router stays in this state. Note that up to and including this state, the router has not sent out even a single HSRP packet, so the other routers don't even know it is there. Hence, the "elections" didn't even technically take place.

*Speak: If the router believes it should assume an Active or a Standby role, it starts sending out its HSRP Hello packets and comparing them to the packets from others, waiting for a while to accumulate enough information about other speaking neighbors to perform the election. Note that this is the first non-silent role in HSRP for a router, but this state is transitory.

*Standby: Here, the Standby router stabilizes. At most a single router in a standby group can be in this state.

*Active: Here, the Active router stabilizes. At most a single router in a standby group can be in this state.

There are only three stable states in HSRP: Listen (which is silent and in which all non-Active and non-Standby routers stabilize), Standby, and Active. Elections in HSRP happen only if a router enters the Speak state, and that state is a transitory one; no router stabilizes in it. From Standby, you can either fall back to Listen, or fall forward to Active or Standby. A new router that comes online and is not entitled for any role will remain completely silent both when coming up and when stabilizing in its Listen state; no one else in the standby group even knows it is there since it doesn't send out any HSRP packets.

The Active

preemption

occurs when a router progressing through Init/Learn/Listen realizes it is entitled to be Active by its higher priority and/or higher IP, and has the

preemption

enabled. In that case, the router will send a Coup message to the group, and immediately assume the Active role itself. The former Active router, upon receiving the Coup message, falls back to the Speak state and determines its new role.

The Standby

preemption

occurs when a router progressing through Init/Learn/Listen realizes it is entitled to be Standby by its higher priority and/or higher IP. There is no Coup message here, though, and the router simply enters the Speak state, sending out its HSRP Hello packets, allowing the existing Standby router to realize that there is someone more entitled. The old Standby will fall back to Listen while the router in the Speak state will eventually promote itself to the Standby role.

This was quite a dissertation and I apologize for making it too long - but I felt it was necessary to explain all these points. Thank you all for the patience with me!

Best regards,
Peter

 

 

Hi @Peter Paluch ,

 There is only one exception here: If there is already a live router in the Standby role, and a new router comes online that has the same priority but a higher IP, it will 

notpreempt

the current Standby. This also makes sense: --> Actually i understand that Standby role is always

preemptive

by default, but in my case your given exception about that is not happening. as i add 1 new router with highest ip than standby and the new router became standby while the previous one gone into listening state.

 

 

Hello Sharanjeet,

Mea culpa, mea culpa, mea maxima culpa!

I was wrong there in one statement! Correctly, it needs to say this: "A standby router with equal priority but a higher IP address will not

preempt

the active router."

So, revising what I wrote earlier: The Standby role is always

preemptive

no exception. What you saw in your lab was in fact expected.

Thank you for standing your ground and having me revisit the docs : )

Best regards,
Peter

 

 

I will summary what happened here for all read this post later 

preempt

prevent the flapping, active down then up then down, if standby change it status then there is drop in traffic, so HSRP prevent old active to become active again unless there is

preempt

OP enable 
NOW

preempt

clear it happened between active and standby 
if we add new Router same priority of OLD active how standby know and start new election ??? 
the answer is database of HSRP in standby 

standby see HSRP from NEW (not found in it database) router it start elect, 
standby see HSRP from OLD (found in it database) router it not start elect unless preempt enable 

that it  
thanks 
MHM
Screenshot (988).pngScreenshot (989).png

Joseph W. Doherty
Hall of Fame
Hall of Fame

An interesting follow-on to your prior HSRP posting.

As already described in this post's replies, and somewhat touched upon in your prior post's replies, interface IP acts as a tie breaker. 

Pre-empting

the current "standby" role based on IP is likely done since it doesn't impact traffic and positions the "better/preferred" standby interface to become the active gateway (probably faster) if active gateway fails.

ygalmizrachi
Level 1
Level 1

From what i understand the preempt is used to force changes in the states of the routers that are astandby or active.

i will explain with a few examples, this changes are executed consecutively without shutting down or disconecting any interface

R1-->phys ip 10.10.10.3 prio 100 no preempt
R2 --> phys ip 10.10.10.4 prio 100 no preempt
in this case
R2 active
R1 standby


R1-->phys ip 10.10.10.3 prio 120 no preempt
R2 --> phys ip 10.10.10.4 prio 100 no preempt
in this case
R2 active
R1 standby


R1-->phys ip 10.10.10.3 prio 120 preempt
R2 --> phys ip 10.10.10.4 prio 100 no preempt
in this case
R1 active
R2 standby

R1-->phys ip 10.10.10.3 prio 120 preempt
R2 --> phys ip 10.10.10.4 prio 120 no preempt
in this case
R1 active
R2 standby


R1-->phys ip 10.10.10.3 prio 120 preempt
R2 --> phys ip 10.10.10.4 prio 120 preempt
in this case
R1 active
R2 standby

 

R1-->phys ip 10.10.10.3 prio 100 preempt
R2 --> phys ip 10.10.10.4 prio 100 preempt
in this case
R1 active
R2 standby


R1-->phys ip 10.10.10.3 prio 100 NO preempt
R2 --> phys ip 10.10.10.4 prio 100 preempt
in this case
R1 active
R2 standby

R1-->phys ip 10.10.10.3 prio 100 NO preempt
R2 --> phys ip 10.10.10.4 prio 110 preempt

in this case
R1 standby
R2 active

 

ygalmizrachi
Level 1
Level 1

there is a funny behavior also:
this changes are executed consecutively
R1-->phys ip 10.10.10.3 prio 100 no preempt
R2 --> phys ip 10.10.10.4 prio 100 no preempt

in this case

R2 active
R1 standby

THE HSRP INTERFACE ON R2 GOES DOWN.

in this case

R1 active

R2 DOWN

R1-->phys ip 10.10.10.3 prio 100 PREEMPT
IS DOWN R2 --> phys ip 10.10.10.4 prio 100 no preempt

HSRP INTERFACE IN R2 GOES UP AGAIN

R1-->phys ip 10.10.10.3 prio 100 PREEMPT
R2 --> phys ip 10.10.10.4 prio 100 no preempt
in this case 
R1 will continue to be ACTIVE

R2 wil go from init to speaker to standby