Cisco HSRP: Way to go forward with nice technology

May 21st, 2009 by admin

Few weeks ago I was working with several Cisco layer three switches, to be precise those were Cisco 3560 series. The part of the scenario was to provide stable and powerful fail over technology  in case that one of those switches goes down from some reason (I don’t know why, but when I am talking about downtime on the cisco devices i am always thinking of lightening although i don’t have any experience with cisco devices going down from that reason). To simplify scenario, i will talk about two switches in active/standby configuration.

How to achieve that? Is there light at the end of tunnel? Yes, there is a light! And it is called HSRP. HSRP stands for Hot Standby Router Protocol and that is first-hop redundancy protocol designed to allow for transparent fail-over of the first-hop router. Yes, i know it sounds ultra complicated and tuff, but I would say that it is just that fist impression that we have when dealing with something new.

When HSRP is configured on a network segment, it provides a virtual MAC address and an IP address that is shared among a group of routers running HSRP. The address of this HSRP group is referred to as the virtual IP address. One of these devices is selected by the protocol to be the active router. The active router receives and routes packets destined for the MAC address of the group. For n routers running HSRP, n + 1 IP and MAC addresses are assigned.

HSRP detects when the designated active router fails, at which point a selected standby router assumes control of the MAC and IP addresses of the Hot Standby group. A new standby router is also selected at that time.

HSRP uses a priority mechanism to determine which HSRP configured router is to be the default active router. To configure a router as the active router, you assign it a priority that is higher than the priority of all the other HSRP-configured routers. The default priority is 100, so if you configure just one router to have a higher priority, that router will be the default active router.

Devices that are running HSRP send and receive multicast User Datagram Protocol (UDP)-based hello messages to detect router failure and to designate active and standby routers. When the active router fails to send a hello message within a configurable period of time, the standby router with the highest priority becomes the active router. The transition of packet forwarding functions between routers is completely transparent to all hosts on the network.

OK, now when we know how cool is HSRP and what nice benefits it is providing to us, it is time to configure it. As you will see, it is simple straight forward process:

1. enable
Enables privileged EXEC mode.
2. configure terminal
Enters global configuration mode.
3. interface FastEthhernet0/5
Configures an interface type and enters interface configuration mode.
4. ip address 192.168.1.10 255.255.255.0
Specifies an IP address for an interface.
5. standby 1 priority 110
Configures HSRP priority (default priority is 100).
6. standby 1 preempt delay minimum 380
Configures HSRP preemption and preemption delay. By default, the router that comes up later becomes the standby.
7. standby 1 ip 192.168.1.254
Activates HSRP.
8. end
Returns to privileged EXEC mode.
9. show standby brief
Displays HSRP information.
10. show standby FastEthernet0/10
Displays HSRP information about specific interface.

Follow the procedure for all devices that you would like to work with HSRP and enjoy. There is lot more features that you can configure with HSRP like authentication, object tracking and so on, but I am not having intention to explain those in details. I strongly encourage you to dig deeper about HSRP because it is really good and fully working technology that can make your day to day job (or life) easier.

Posted in IT, cisco, networks | No Comments »

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.