Achieve Network Redundancy with a “Hot” Little Protocol

Stelios AntoniouReliability is an extremely important aspect in networking.

A network that has been designed without the provision of redundancy is a network with a limited life span.

Customers demand to have 100% service availability, while more and more time sensitive services are injected into networks such as voice and video over IP. These services need to be reliable, hence redundancy is a prerequisite in this case.

Cisco’s proprietary Hot Standby Routing Protocol (HSRP) has been designed to provide the software intelligence needed for your extra hardware to successfully provide redundancy in your network.

In this article we’ll take a look at HSRP’s operation in detail and examine, with the help of sample network diagrams, how to configure and enable HSRP.


The "Hot" in HSRP

There are several key points of HSRP’s operation. Some might say these are the things that put the hot in HSRP:

  • For enabling HSRP all you need is 2 or more Cisco routers that will be configured to work in groups. These routers provide redundancy so that when the primary group router goes down, the standby router takes over all routing functions of the primary one.
  • A group of routers running HSRP share a virtual MAC address and a virtual IP address. Therefore, the active router is responsible for routing packets destined for its virtual MAC address. The active router is also responsible for responding to ARP requests from hosts, providing them with its virtual MAC address.

    On the other hand, hosts within a given group need to configure their default gateway with the virtual IP address of the router within their group and not with the IP address of the router’s physical interface.
  • HSRP uses a configurable priority value to determine which HSRP router within a given group is to be the default master router.

    The router with the highest priority becomes the master and the others become standby. The default priority is 100. In case more than one router shares the same priority value then the router with the highest IP address becomes the primary router.
  • When HSRP is configured with Object Tracking, the priority of a router can change dynamically when the object that the router is tracking goes down.

    For example if the line protocol state of an interface is used as a tracked object, then when it goes down the active router’s priority is decreased and the next available router with the higher priority becomes the active router.

HSRP Addressing

HSRP enabled routers exchange HSRP HELLO packets between each other. These HELLO packets are destined to the multicast IP address 224.0.0.2 on UDP port 1985. It’s a good idea to write that down, because I have seen cases where a forgotten access list has prevented the transmission of these messages.

The router with the highest priority will become the active router. Regardless of which router becomes active and which becomes standby, all routers exchange HELLO packets at regular intervals.

The active router makes use of the virtual HSRP MAC address. This MAC address has a standard address scheme. It is composed of 0000.0C07.ACxy where xy is the configured HSRP group number in hexadecimal notation.


Configuring HSRP with Object Tracking

Configuring HSRP is not that hard. All the necessary configurations are performed in the Interface Configuration Mode of the router. Thes are all the steps:

  1. Configure the IP address on the Ethernet interface
  2. Configure the virtual IP address using the standby command and specify the HSRP group number
  3. Configure the desired priority value for the HSRP to select the appropriate master router within the specified group
  4. Configure standby preempt so that the master router will always be the primary router as long as it is available
  5. Specify the tracked object for the specified HSRP group

Similar configuration is done on all HSRP enabled routers. Remember to always configure standby routers with a lower priority then your master router.


Sample HSRP Enabled Network

The following diagram presents a typical HSRP network design. The necessary configuration commands for both routers are provided. Notice the configured priorities and the Virtual IP address which is also configured on the clients as default gateway.



Network Redundancy with HSRP - 1



Network Redundancy with HSRP - 2


Achieveing Load Sharing with HSRP

In cases you have more than one path to a given destination, HSRP can be configured in such a way as to provide load sharing behavior. The following sample network diagram presents such a case:



Network Redundancy with HSRP - 3

RouterA is the active router for group 1 and the standby router for group 2, while RouterB is the active router for group 2 and the standby router for group 1.

The configuration commands for the above network are:



Network Redundancy with HSRP - 4


Creating a Reliable Network with HSRP

With HSRP you can sleep peacefully at night. The sophistication of the protocol allows for dynamic and transparent network topology changes in order to achieve high network reliability with uninterrupted operation.

At any time you can check the status of HSRP and identify your master and standby routers by issuing the show standby command. A change in HSRP status triggers a syslog message alarm which indicates that a router switchover has taken place.


Master HSRP and Other Protocols with Cisco Certification Training!

Cisco Certification TrainingWe offer Cisco training for all levels — beginner to advanced!

Whether you’re going for your CCENT or your CCNP — we got you covered!

And unlike other training materials out there, we include everything you need to pass your exams — complete coverage of exam objectives, real world examples, and plenty of practice exam questions.

Find out more & see what our Cisco Certification Training has to offer!

Tagged:, , , , , ,

2 Responses to “Achieve Network Redundancy with a “Hot” Little Protocol”

  • Rudy Says:

    Where have I heard this before sounds freakishly familar;

    “HSRP uses a configurable priority value to determine which HSRP router within a given group is to be the default master router.”

    Not terribly important it just rang familar from some long ago reading of course unrelated to Cisco Routers.

    How often do primary routers fail? Was thinking about the set up in one of the courses believe it had to do with Frame Relay and ISDN, primary and secondary paths. Is that still used? Is there a high failure rate in that case also?

  • Stelios Says:

    There is no single answer to your question. Primary routers do fail sometimes. The scary thing is that you never know when you might come accross a total or even a partial crash.Resilience in a network is a major issue when factors such as reliability, ongoing service and stability are of great importance. In an ISP environment service interaption is a “no case”. Everything, both hardware and software are double. Some are working in active-standby mode, some in load sharing.There are cases that you can not tolerate even the possibility of downtime.
    Yes, actually ISDN connection is often used as a secondary option when the primary connection fails. The failure rate in this case can not be measured. It could be high but it could also be inexistent. It depends on the carrier network, network hardware, configuration, resilience…

Leave A Comment: