cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4644
Views
47
Helpful
10
Replies

HSRP priority decrement

ABINTHOMAS6431
Spotlight
Spotlight

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

4 Accepted Solutions

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

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.

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3560/software/release/12-2_52_se/configuration/guide/3560scg/swhsrp.html#47890

 

HTH

 

Rick

HTH

Rick

View solution in original post

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

 

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame

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.

View solution in original post

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

 

 

HTH

Rick

View solution in original post

10 Replies 10

Seb Rupik
VIP Alumni
VIP Alumni

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.

 

https://www.cisco.com/c/en/us/td/docs/switches/blades/3040/software/release/12-2_44_se/configuration/guide/swhsrp.html#wp1083935

 

cheers,

Seb.

Richard Burts
Hall of Fame
Hall of Fame

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.

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3560/software/release/12-2_52_se/configuration/guide/3560scg/swhsrp.html#47890

 

HTH

 

Rick

HTH

Rick

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

 

@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? 

 

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

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

 

 

HTH

Rick

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

HTH

Rick

@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

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

 

Joseph W. Doherty
Hall of Fame
Hall of Fame

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.

Review Cisco Networking products for a $25 gift card