cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
3702
Views
16
Helpful
21
Replies

Issue with HSRP Preemption

Hi,

I am using HSRP in my lab with a default priority. But, having issue whenever my active router goes down, and later when it comes up then it is continuing with standby status not the active. I enabled Preemption that is also not working.

when my new active router goes down then the first active become active.

R1-> active --> goes down --> comes up --> becomes standby not active

R2-> standby-->becomes active

It is working fine with VRRP but not with HSRP.

Any help is appreciated

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @Sharanjeet_Kumar,

could you please share your HSRP config ?

Preemption is a feature in HSRP that allows a higher priority router to take over the active role if it becomes available again after a failure. Based on your description, it appears that preemption is not working as expected.

Waiting for your outputs, there are a few factors to consider:

--Verify the priority settings on both routers (R1 and R2). The router with the higher priority will become the active router. Ensure that R2 has a higher priority than R1 when both routers are up and running.

--Double-check that preemption is enabled on both routers. It should be enabled for the router that you want to regain its active status when it comes back up. You can enable preemption using the following command on the active router:

standby [group-number] preempt

--In HSRP, there is an option to track interfaces. If the tracked interface goes down, the router's priority is decreased, and if it comes back up, the priority is increased. If tracking is configured, it can impact preemption. Ensure that tracking is set up correctly and isn't causing any conflicts.

--Check the HSRP version on both routers (version 1 or version 2). Make sure that both routers are using the same version to avoid any compatibility issues.

Thanks.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

21 Replies 21

default priority<<- issue here, you must config active with higher priority

Hi @MHM Cisco World ,

No, i want to use default Priority.

You can not use default priority and preempte

the standby see priority of active same so it keep it status 

@Sharanjeet_Kumar,

does the standby have lower priority than 100 ?

--If at any time the elections show multiple routers with the same priority values, then the highest physical IP address will be elected.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Hi M02@rt37 ,

It is not working like you said, not electing Active based on highest interface ip address, whichever is coming up early or on which i am running

hsrp

first becoming Active. Ideally it should be but in this case it is not happening.

 

 

Hello @Sharanjeet_Kumar,

please share your configuration here, we could ALL check that.

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

I am attaching the configuration file for R1 and R2.

 

@Sharanjeet_Kumar 

You have the same priority: the

default value [100]

Configure priority 110 on the Router you want to be the primary!

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Might there be misunderstanding of interface IP usage during HSRP preemption?

I believe interface IP is just a tie breaker when HSRP priority is the same.

Examples;

3 routers all with preempt (or not) and same HSRP priority.  Active router fails, which of the other two routers becomes active?  Interface IPs compared.

The just failed router comes back on-line.  Even if it has a better IP, as it does not have a better priority, it will not preempt.

If the 3 routers had preempt but priorities of 90, 100 and 110, best priority becomes active.

Interface IP, alone, will not preempt, but it will otherwise tie break.

Basically, interface IP consideration is like HSRP's priority without preempt.

If you want active preemption, besides enabling preemption you need to set explicit HSRP priorities.  (I suspect the reasoning behind this, you must explicitly configure taking over an active gateway, not needing to rely on interface IP assignment.)

 

Unfortunately the way the protocol works is highest priority no matter what you want to use.

Take a look at this documentation. Its highest priority and then highest interface IP address (not Virtual IP). So if you wanted the first router to pre-empt and they both have the same priority then you could reconfigure HSRP so the router you wanted to be active has the higher interface IP.

https://www.cisco.com/c/en/us/support/docs/ip/hot-standby-router-protocol-hsrp/9234-hsrpguidetoc.html#anc29

(look under the preemption section)

 

My assumption is you configured one router first (probably the one you wanted to be active) and gave it a lower IP (as people tend to do). Then you configured the secondary device with maybe the next highest IP. So that's probably why its choosing the second router over the first when the priority is equal.

Hope that helps

-David

I do not understand why the original poster is so insistent on using default priority. My initial reaction was (similar to several other responses) that with equal priority the preemption would not work. The easy solution is to make priority of one router higher than the other router. But David provides a helpful suggestion that managing the IP addresses might be a way to get preemption to work with default priority on both routers. Give it a try and let us know the results.

HTH

Rick

After doing some digging and reading @Joseph W. Doherty comments it appears he is correct in the case of the highest IP is the tie breaker when priority is the same initially. But once the device loses active status and comes back it will remain in Standby even if preemption is enabled. Preemption is only related to priority (default or configured). 

-David

David

Yes, a tie breaker is important when an election is being held, and IP address is a factor then. But if the active HSRP peer fails and then comes back, it is not an election and there is no need for tie breaker. When the router rejoins the HSRP environment the only factor active for preemption will be priority.

So I will repeat my previous question: why is the original poster so insistent on using default priority for both routers? It is pretty clear at this point that if both routers have the same priority (whether it is default or is some other value does not matter) then preemption will not work.

HTH

Rick

Rick, my reading of David's 2nd posting is that he does now acknowledge interface IP is only used as a tie breaker, which . . .

"But if the active HSRP peer fails and then comes back, it is not an election and there is no need for tie breaker."

Hypothetically, and very unlikely, suppose the active gateway fails but there were 3 routers in the HSRP group.  Two with priority 100, one with priority 90, and both of the 100 priority routers fail and later restart at same time (like if they were on the same electrical branch circuit).  Also assuming all have preempt, I would expect the interface IP to determine which priority 100 router replaces the priority 90 router.  Again, a very unlikely case.

"So I will repeat my previous question: why is the original poster so insistent on using default priority for both routers?"

Indeed, only OP can answer that, but supposing you wanted to make minimal config changes.  For a router pair, you only need to configure preempt on the preferred router's interface, and adjust only one router's interface's HSRP priority, either the preferred to be higher than default or the non-preferred to be lower than default.  (In the past, I've set preempt and a higher than default priority on the preferred router - works just fine.  However, if you "track" something on the preferred router to drop its priority below the default, you then will need to set preempt on the secondary routers, while leaving it to use the default priority.)