Friday, September 17, 2004

Configuring the Hot Standby Router Protocol

Hey friends,

A cool friday after hectic weeks. So lets see a little more on HSRP and how you can tweak it to your own benefit.

Some Theory for HSRP is below :

The Hot Standby Router Protocol (HSRP) provides high network availability because it routes IP traffic from hosts on Ethernet, FDDI, or Token Ring networks without relying on the availability of any single router. HSRP is used in a group of routers for selecting an active router and a standby router. (An active router is the router of choice for routing packets; a standby router is a router that takes over the routing duties when an active router fails, or when preset conditions are met.)

HSRP is useful for hosts that do not support a router discovery protocol (such as ICMP Router Discovery Protocol [IRDP]) and cannot switch to a new router when their selected router reloads or loses power. Because existing TCP sessions can survive the failover, this protocol also provides a more transparent recovery for hosts that dynamically choose a next hop for routing IP traffic.

When the 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.

Devices that are running HSRP send and receive multicast UDP-based hello packets to detect router failure and to designate active and standby routers.


Now coming to the real commands :

Step 1. Enable HSRP

Gateway1(config-if)# standby [group-number] ip [ip-address [secondary]]
Gateway1(config-if)# standby 5 ip 10.10.10.1


Above 5 is my HSRP group ID and 10.10.10.1 is my HSRP ip.

Step 2. Configuring HSRP Group Attributes

A.
Gateway1(config-if)# standby [group-number] timers [msec] hellotime [msec] holdtime

Configures the time between hello packets and the hold time before other routers declare the active router to be down.

Gateway1(config-if)# standby 5 timers 7 30

Hello Packets would be sent after every 30 msecs and after 7 unsuccessful attempts the backup router would take over as the active HSRP router.


B.
Gateway1(config-if)# standby [group-number] priority priority

Set the Hot Standby priority used in choosing the active router. The priority value range is from 1 to 255, where 1 denotes the lowest priority and 255 denotes the highest priority. Specify that, if the local router has priority over the current active router, the local router should attempt to take its place as the active router.

Gateway1(config-if)# standby 5 priority 50


C.
Gateway1(config-if)# standby [group-number] preempt [delay {minimum delay | reload delay | sync delay}]

Gateway1(config-if)# standby 5 preempt


D.
Gateway1(config-if)# standby [group-number] track type number [interface-priority]

Configures the interface to track other interfaces, so that if one of the other interfaces goes down, the Hot Standby priority of the device is lowered.

This has some analogy to the route dampening policy in BGP routing protocol to prevent CPU over loads.I generally dunn use it so not putting it here.


E.
Gateway1(config-if)# standby [group-number] authentication text string

Selects an authentication string to be carried in all HSRP messages.

This is something like my a password authentication between the two (or a group) of routers.

Gateway1(config-if)# standby 5 authentication my_personal-string



Well looks like i have written a lot till the next time .

Nitin

1 Comments:

At 7/30/2010 12:41:00 AM, Blogger Unknown said...

In addressing the router enables wireless networking connection, really amazing what Technology has changed these days. I like meeting new things. This is why i have come to this blog, I find it very interesting.This is like
costa rica investment opportunities really interesting too.

 

Post a Comment

<< Home