Hot standby routing protocol - HSRP - Part-1
- By Huzaifah Ahmad
- Published 02/13/2009
- HSRP , CCIE , CCNP , Cisco
-
Rating:




In this 2 part article series I will walk you through the features of Hot Standby Router Protocol (HSRP), configuration of Hot Standby Router Protocol (HSRP) using command line & demystifying Hot Standby Router Protocol (HSRP).
Before we jump in straight to the configuration you need to make it clear in your mind that Hot Standby Router Protocol (HSRP) is NOT a “Routing Protocol". This protocol does not update the routing tables in anyways whatsoever.
There was a growing need for a solution in the market at that time which would provide high availability for routers / switches @ Layer 3 for LAN users. To be honest I am not entirely sure if there were any companies which were providing high availability back than & if there were they were surely not on routers / switches itself, you would have to use a 3rd party products which would in turn sit in between the users & routers / switches.
If you have all the money in your budget there are many products available in the market and one of which I have worked on personally is BIG IP. A fantastic product indeed but comes at a price, this product does much more than simply what HSRP does so let me not go into the details of BIG IP.
What was Hot Standby Router Protocol (HSRP) developed for?
The name itself answers this question. :) To provide High availability to a specific L3 ip address on your LAN.
Does every network require HSRP implemented?
Yes & No. :)
Yes! You need it if you require high availability for your gateway.
No! If you can afford your gateway to be down for an acceptable period of time due to various planned / unplanned downtime.
Planned: Maintenance work OR reboots, etc.... Unplanned: Hardware failures, accidental change to the running config, etc...
Do I have an alternate solution to compare against?
Yes! There are a few options one of which is:
VRRP (Open Standard) From what I recollect reading sometime back Cisco also helped in the development of VRRP.
I will discuss VRRP in my upcoming articles soon!!!
HSRP Key Features:
1. Cisco Proprietary Protocol. ( RFC 2281 )
2. Multicast Address = 224.0.0.2 (all routers)
3. Default Priority = 100
4. Virtual Mac ADD = 000.0c07.ac.XX ( XX = HSRP Group no )
5. HSRP Group no = ( 0 - 255 )
6. UDP Port 1985
7. Security.
PRIORITY: The default priority is ( 100 ). If this setting has been left unchanged an "election occurs" and the highest ip address in the Hot Standby Router Protocol (HSRP) group wins the election. However if the priority has been changed the router with the highest priority becomes the "Active Router". In majority of the cases you would change the priority to control the behaviour yourself.
Virtual MAC: The default "Virtual Mac Add" can be changed if the need arises under some circumstances. In majority of the scenarios you will never have to change the mac-address settings. The default mac add is a reserved address as explained above which makes it uniqute on your network.
This virtual mac is tied in with the virtual ip add which acts as a "Virtual Router" to all the users. This in turn provides high availability & reduces overhead. The thing to keep in mind is the virtual ip add and the physical ip add on the interface, the subnets need to be the same.
HSRP Group no: The group number does not matter which one you use between the range of 0-255, but to keep in mind is this range will sometimes be limited depending on the device you are working on so dont panic.
Something very important to keep in mind is that the group number is significant only locally on that interface. What I mean by saying that is if you have Hot Standby Router Protocol (HSRP) running on two switches with the following vlans VLAN 2, VLAN 5, VLAN 9. Now you can have Hot Standby Router Protocol (HSRP) group no 5 running under all SVI interfaces for each VLAN. Yes! that is correct. The group number limitation is only on each interface locally....
Generally I have seen two common ways the group numbers are allocated for ease of use and I will share them with you:
Example:
-----------
a. Use the same group number which corresponds to the VLAN number. i.e. VLAN = 25 then HSRP Group no = 25
b. Lets say your two routers are called [ Router1 & Router2 ] so the HSRP Group Number will be 21 (Primary Router (Router2) & Secondary (Router1) 2 & 1 = 21) . The reason some choose this sort of design so they know [ Router2 ] was designed to be the primary router at the time of the installation & Implementation.
But all said and done there is no right and wrong about using Hot Standby Router Protocol (HSRP) group numbers the choice is yours what best fits your design and ease of use and documentation.
Different HSRP States:
----------------------------------
Has various states if all goes well and the configuration is correct the routers participating in the group will have one these ( 3 states ) Active / Standby / listen.
Disabled
Init
Listen
Speak
Standby
Active
I will end this Part 1 of the article here as enough of the theory on Hot Standby Router Protocol (HSRP) & we will see how to configure this using command line in the Part 2 of the series.
Spread The Word
Article Series
-
Hot standby routing protocol - HSRP - Part-1
Related Articles
Comments












