Link to home
Start Free TrialLog in
Avatar of tech2010
tech2010

asked on

How to configure HSRP on cisco devices

Can someone give configuration of how to configure HSRP on cisco asa/pix and catalysts and routers? thanks
Avatar of denver218
denver218
Flag of United States of America image

ASKER CERTIFIED SOLUTION
Avatar of denver218
denver218
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tech2010
tech2010

ASKER

Thanks denver218, can you please explain how failover will work in case one router goes down, will there be few seconds timeout or does it failover to second router instantly? also i guess the router with low priority will be the primary router as in your example which is router2?


- what does "preempt" and "track" command means?
- why you have to configure two interface on each router, should only gigabitethernet0/0 not enough on both router with standby ips?

Thanks
HSRP will provide non-disruptive failover in most cases.  The default priority is "100", so in Router 1 we change this to "110" to make router1 as Active.

Standby Preempt - command enables the Hot Standby Router Protocol (HSRP) router with the highest priority to immediately become the active router. Priority is determined first by the configured priority value, and then by the IP address. In each case, a higher value is of greater priority. When a higher priority router preempts a lower priority router, the router sends a Coup message. When a lower priority active router receives a Coup message or a Hello message from an active, higher priority router, the router changes to the Speak state and sends a resign message.

Track - It will track an interface and when the tracked link is down, the active router will mark its priority as low to allow the Standby Router to take over.

I configured HSRP on both interfaces so I have WAN and LAN redundancy on both interfaces.  
You don't necessarily need 2 interfaces on each router to be enabled with HSRP it depends on the requirements.  The example config posted above by @denver218 has 2 HSRP groups created with 1 interface from each router creating one HSRP group with a VIP and the other configured interface on each router creating a second HSRP group.

preempt:
You're incorrect, it is the router with the HIGHEST priority that becomes the active device.  However, without preempt enabled the device which boots up first can become active even if it has a lower priority than then device it is paired with.  With preempt enabled irrespective of boot time the device with the highest priority will become active.

track:
This is used for example to track an interface such that if the tracked inteface's link fails the HSRP priority of the router is decremented such that failover occurs and the standby device becomes active.  In the example above since no decrement value is specified the default decrement of 10 is being used.

In the example above R1 will be active and R2 will be standby for both HSRP groups.  If you were using 2 groups, i.e. 2 VIPS to provide redundancy then you might make one router active for group 1 and the other router active for group 2.

In terms of failover it depends on why/when the failover is occuring.  In the case of a tracked interface this can be pretty instant as the 2 HSRP paired devices can still communicate, however if the failover is due to a failed link between the HSRP devices or the failure of the active device itself than the standby would have to wait the dead-timer (default - 3secs) before becomming active.

This is quite a big topic to answer but hopefully the above will provide a starting point.

http://en.wikipedia.org/wiki/HSRP

The link provided above as well as the link provided by @denver218 should also help you read up on HSRP.

--IJ