• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2239
  • Last Modified:

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
0
tech2010
Asked:
tech2010
  • 3
1 Solution
 
denver218Commented:
Below is the HSRP configuration for two Cisco 2821 routers configured in HSRP:

ROUTER1

interface GigabitEthernet0/0
 ip address 192.168.12.15 255.255.255.0
 duplex auto
 speed auto
 standby 1 ip 192.168.12.17
 standby 1 priority 110
 standby 1 preempt
 standby 1 track GigabitEthernet0/1
 no mop enabled
!
interface GigabitEthernet0/1
 ip address 1.1.1.15 255.255.254.0
 duplex auto
 speed auto
 standby 2 ip 1.1.1.17
 standby 2 priority 110
 standby 2 preempt
 standby 2 track GigabitEthernet0/0

ROUTER 2
interface GigabitEthernet0/0
 ip address 192.168.12.16 255.255.255.0
 duplex auto
 speed auto
 standby 1 ip 192.168.12.17
 standby 1 priority 100
 standby 1 preempt
 standby 1 track GigabitEthernet0/1
 no mop enabled
!
interface GigabitEthernet0/1
 ip address 1.1.1.16 255.255.254.0
 duplex auto
 speed auto
 standby 2 ip 1.1.1.17
 standby 2 priority 100
 standby 2 preempt
 standby 2 track GigabitEthernet0/0
0
 
tech2010Author Commented:
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
0
 
denver218Commented:
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.  
0
 
ipajonesCommented:
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
0

Featured Post

What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now