09-02-2019 07:09 AM - edited 09-02-2019 07:11 AM
The HSRP priority value is decremented by 10 when a failure occurs....What is use of this HSRP priority decrement process...
As far as i understand, when the active router fails the standby router waits for the holddown timer and take over the active mode.. Then why the priority of the active router is decremented by 10
Solved! Go to Solution.
09-02-2019 07:27 AM
You are looking at a very simplistic view of HSRP: 2 routers running HSRP, one is the active and the other is the standby, and if the active router fails then the standby router takes over as active. And no need for priority. But let me describe a somewhat more complex scenario: you have 2 routers running HSRP, one is the active and the other is the standby. The outbound interface (not the interface running HSRP but the interface that gets to the Internet) goes down. What happens? Traffic is still sent to the active router, but the active router can not forward it directly to the Internet and must forward traffic to the standby to be forwarded to the internet. What you would like is the ability to failover the HSRP active role based on losing the outbound interface. And that is what priority can do. You configure HSRP to monitor the outbound interface and if the outbound interface goes down then it decrements its priority. When the active router priority becomes lower than the priority of the standby router then the standby router can take over as the active router (assuming that the standby has been configured with preempt). This is the reason HSRP uses priority. Here is an article that discusses the topic. I hope that you find it informative.
HTH
Rick
09-02-2019 07:30 AM
Hello Abin,
the key concept here is pre-emption + tracking.
we can make a router HSRP Active router with priority 105 until its WAN interface is up , then we can lower the priority to 95 if the WAN interface fails (using tracking) so that the other router with default priority 100 can pre-empt if having an higher priority.
In this way we can choice the HSRP active role based on effective and current network topology and we can change the Active role on the fly if a fault happens on a link different from the link where HSRP messages are exchanged.
This does not make HSRP a routing protocol, it makes it a First Hop Redundancy Protocol with some routing awareness.
Modern object tracking goes beyond simple looking for the state of other interfaces allowing to check other info.
Hope to help
Giuseppe
09-02-2019
11:22 AM
- last edited on
03-01-2024
11:22 PM
by
Translator
As described by both Rick and Giuseppe, priority allows the change of the "hot/active" gateway router to a standby router, even though the original "hot/active" router is still "active". As they also mentioned, for this to work, you also need to add the
preempt
command, generally on all the routers you want to shift the gateway on. This includes the "original/preferred" router, so that when its tracked interface comes back on-line, it again takes over as the "hot/active" gateway.
09-02-2019 11:23 AM
There are several parts to the answer to your questions:
- no you do not need to use 105. This is a value frequently used because it works well with other default values (priority of other HSRP router, and default amount to decrement). But you can use any value (including 150) if you wish.
- if you do use 150 as the priority of the active router and if you use the default priority of 100 for the standby router then in configuring HSRP you must configure the decrement amount to be at least 51.
- I do not understand this part of your question "Is there any rule to select the priority value such that subtracting 10 from active priority should be a value less than standby priority? " I suppose such a rule would be that the priority of the active router must be no more than 9 greater than the priority of the standby router.
HTH
Rick
09-02-2019 07:14 AM
Hi there,
Typically you would configure object tracking alongside HSRP. Then a track object crosses a threshold this state change is used by HSRP to decrement (or increment) the priority value.
cheers,
Seb.
09-02-2019 07:27 AM
You are looking at a very simplistic view of HSRP: 2 routers running HSRP, one is the active and the other is the standby, and if the active router fails then the standby router takes over as active. And no need for priority. But let me describe a somewhat more complex scenario: you have 2 routers running HSRP, one is the active and the other is the standby. The outbound interface (not the interface running HSRP but the interface that gets to the Internet) goes down. What happens? Traffic is still sent to the active router, but the active router can not forward it directly to the Internet and must forward traffic to the standby to be forwarded to the internet. What you would like is the ability to failover the HSRP active role based on losing the outbound interface. And that is what priority can do. You configure HSRP to monitor the outbound interface and if the outbound interface goes down then it decrements its priority. When the active router priority becomes lower than the priority of the standby router then the standby router can take over as the active router (assuming that the standby has been configured with preempt). This is the reason HSRP uses priority. Here is an article that discusses the topic. I hope that you find it informative.
HTH
Rick
09-02-2019 07:30 AM
Hello Abin,
the key concept here is pre-emption + tracking.
we can make a router HSRP Active router with priority 105 until its WAN interface is up , then we can lower the priority to 95 if the WAN interface fails (using tracking) so that the other router with default priority 100 can pre-empt if having an higher priority.
In this way we can choice the HSRP active role based on effective and current network topology and we can change the Active role on the fly if a fault happens on a link different from the link where HSRP messages are exchanged.
This does not make HSRP a routing protocol, it makes it a First Hop Redundancy Protocol with some routing awareness.
Modern object tracking goes beyond simple looking for the state of other interfaces allowing to check other info.
Hope to help
Giuseppe
09-02-2019 11:07 AM
@Giuseppe Larosa Thanks for the reply...
Do i need to use priority value 105 itself for enabling outbound interface tracking... what if i am using 150 for the active router (as cisco is saying that priority can have values 0-255) and using the default value 100 for the standby router...150-10=140 is still a higher priority than standby priority.....Is there any rule to select the priority value such that subtracting 10 from active priority should be a value less than standby priority?
09-02-2019 11:19 AM
The default decrement value is 10 but it can be any value between 1 - 255.
So as long as you subtract a large enough number to make your standby preempt then you can use any numbers within the accepted range you like.
Jon
09-02-2019 11:23 AM
There are several parts to the answer to your questions:
- no you do not need to use 105. This is a value frequently used because it works well with other default values (priority of other HSRP router, and default amount to decrement). But you can use any value (including 150) if you wish.
- if you do use 150 as the priority of the active router and if you use the default priority of 100 for the standby router then in configuring HSRP you must configure the decrement amount to be at least 51.
- I do not understand this part of your question "Is there any rule to select the priority value such that subtracting 10 from active priority should be a value less than standby priority? " I suppose such a rule would be that the priority of the active router must be no more than 9 greater than the priority of the standby router.
HTH
Rick
09-02-2019 12:49 PM
I am glad that our explanations have been helpful. Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.
HTH
Rick
09-03-2019 10:49 AM
@Richard Burts @Seb Rupik @Giuseppe Larosa @Jon Marshall @Joseph W. Doherty
Thanks everyone for the explanations... All your explanations really helps me a lot.. Thanks
09-02-2019 11:29 PM
Hello Abin,
as explained by Jon and Rick you are not constrained to use the priority value 105, because the amount of priority decrement can be changed for each tracked object from default 10 to another value so that it makes for example:
Priority_base_value - decrement_pri_tracked_object = 150 - 60 = 90.
I have seen in some networks the use of priority value 255 on the HSRP active router.
The intention of this usage is to be sure that no other device can take over.
However, there are cases when we would like to add a new device and to make it the new active HSRP router (for migration purposes).
So I would not use the 255 value for this reason.
HSRP can be protected with MD5 authentication.
Hope to help
Giuseppe
09-02-2019
11:22 AM
- last edited on
03-01-2024
11:22 PM
by
Translator
As described by both Rick and Giuseppe, priority allows the change of the "hot/active" gateway router to a standby router, even though the original "hot/active" router is still "active". As they also mentioned, for this to work, you also need to add the
preempt
command, generally on all the routers you want to shift the gateway on. This includes the "original/preferred" router, so that when its tracked interface comes back on-line, it again takes over as the "hot/active" gateway.
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