This post is part of a series of revision notes I put together and used for studying CCNP Switch concepts. I am now writing them up on this website so that they might be useful to others.
They formed a part of my notes intended to explain concepts in simple terms. I hope they come in use, but as a reminder, please do not use these notes as any indication of what is sufficient for CCNP level understanding.
Let’s get started.
- HSRP stands for Hot Standby Routed Protocol
- HSRP is a Cisco proprietary protocol, it can only be used with Cisco devices
What It Is
- Essentially a method of resiliency for your Gateways
- Multiple Gateways are configured to act as as a single Logical device
- Only the resources of one physical device at a time are used
- In practise, this means that if one device participating in HSRP goes down then the Logical Gateway will use the resources of another Standby devices instead
- This keeps the Logical Gateway up with minimal downtime
How It Works
- There are 2 states: Active & Standby
- Device in use is the known as Active, others are in the Standby state
- Logical IP used
- Maximum of 256 HSRP Groups on a Device
- Logical MAC address generated in the format: 0000.0C07.ACXX
- 0000.0C is the Cisco Vendor ID
- 07.AC is the HSRP ID
- XX is replaced by the HSRP Standby Group Number
- Hello: Every 3 seconds
- Dead: After 10 seconds
- Default standby priority for a device is 100
- Highest priority becomes the Active gateway
- This feature allows us to monitor a specific interface. If said interface goes down we can decrement from its priority value
- If the interface comes back up, it will add the configured value back to the priority
- The default decrement value is 10, but we can configure it to whatever we want
- The state of a device (whether it is Active or Standby) is based on its priority and decided at boot time
- Consequently, this means that if an interface goes down, only at next reboot another device with higher priority will become active
- This is not ideal, so we use the pre-empt feature to ensure that this switch-over happens immediately in real time
- Preempt configuration must be manually implemented on both Active and Standby devices
- Although the above Preempt feature is useful, what happens if we have a device that (due to some failure) is constantly rebooting?
- If this mentioned device had a higher priority than the other HSRP devices, it would constantly take the Active state by force each time it rebooted then abdicate it once it went down….over and over again!
- In order to prevent such a scenario, we use the Preempt Delay command
- This means that after a Switch with a higher priority has reloaded, the HSRP instance waits to see if the Switch has been up and stable for a certain amount of time before allowing it to preemptively grab the role of the Active Gateway
- Cisco recommends that the delay value is half of the boot time
- This means that the device which has just booted up and is ready to take the role of the Active device should be up, healthy and well for half the normal boot time before it switches over
- Essentially, give a substitute the chance to warm up before passing them the football!
‘Turning on’ HSRP:
Switch(config-if)# standby [GROUP NUMBER] ip [VIRTUAL IP]
- Note that the subnet mask is not needed. It will be assumed to be the same as the interface subnet mask
Switch(config-if)# standby 1 track [TRACKED OBJECT NUMBER] decrement [DECREMENT VALUE]
Switch(config-if)# standby [GROUP NUMBER] preempt
Switch(config-if)# standby [GROUP NUMBER] preempt delay reload [TIME]
Switch(config-if)# standby [GROUP NUMBER] timers msec [HELLO TIMER] msec [DEAD TIMER]
- The minimum value for the dead timer is 600 msec, so no use making the Hello timer as low as it can go (15 msec) as it will still have to wait 600 msec before a device is seen as ‘dead’
We can verify the status of HSRP on a device by using the following commands:
Switch# show standby
Switch# show standby brief
Switch# show redundancy state
Last but not least, I have put together a digital flashcard based on my notes.
Please be aware that neither this post or this flashcard is to be taken as all the information you need to know for HSRP, it just contains the basics and is intended to be used as a supplement to your own notes and studies.
I hope it helps.