Tuesday, August 11, 2009

HSRP: RFC 2281

Studied on HSRP, or hot standby router protocol. It is defined by RFC 2281. It is a cisco proprietary protocol that allows 2 routers or L3 switches some redundancy if one were to fail. It does this by creating a virtual router that has both a virtual mac, and ip address. The two participating routers will be in one of two modes:

Active or standby

This protocol was not defined really for "load balancing"; but more for redundancy. However load balancing may be achieved by assigning two standby groups to an interface, and assigning two seperate virtual ip's. The downside...you have to manually configure your hosts to use either of the gateways in order to load balance (there are other protocols for this!!)

The states for HSRP are as follows:
  1. disabled- the interface is not running hsrp
  2. initial (init)- the interface but has just came up.
  3. learn- the interface is configured, but has not heard from active router
  4. listen- the router knows is virtual ip, but does not know who is primary or standby
  5. speak- the routers are sending hello's and holding the election
  6. standby- the router is a candidate to become the active router and is sending hellos
  7. active- the router is forwading packets sent to the virtual ip address, and is sending hello's
The virtual ip address is configured with hsrp, the mac however is derived automatically from the following address:
  • 0000.0c07.acxx (where xx is the group number in hexidecimal)
It should be noted that you CAN track interfaces with HSRP. If a tracked interface goes down it can dynamically adjust the priority so that the standby router takes over (if programmed properly with the correct priorities and preempt commands).

Commands to configure and show:
(config-if)standby [group #] ip [ip address] -this is the same on both and is the virtual ip
(config-if)standby [group #] priority [0-255] -the highest priority wins active role
(config-if)standby [group #] preempt -forces router to take active role if priority is higher
(config-if)standby [group #] mac-address [xxxx.xxxx.xxxx]
(config-if)standby [group #] authentication [options] - Must match on both routers

show standby

No comments:

Post a Comment