Switching / Routing Redundancy (Page 3 of 4)
29 Nov 2004 @ 09:29AM

Updated: 19 Jan 2010 @ 09:34AM
Hot Standby Router Protocol

There are three main components to an HSRP. Those are:

Active router: Actively forwarding packets and transmits hello packets.
Backup router: Ready to take over for active router should the active fail. Also transmits hello packets.
Virtual/Phantom router: A nonexistant router that represents a consistently reachable ip and mac address.


Any additional routers in an HSRP group listen to hello packets but do not respond. They function as normal routers in that they forward ip packets sent specifically to them, but they don't participate in the HSRP group unless needed to fill the role of an active or standby router. These routers remain in an HSRP "init" state.

If the standby router fails to receive hello packets from the active router for a preset period of time, it sees the active router as down and becomes active itself. If both the active and standby routers fail, any remaining routers contend for active and backup positions. The router with the highest HSRP priority is chosen as active router, while ties are broken by the lowest MAC address. The default HSRP priority is 100 and is configurable.

There can be up to 255 standby groups in a LAN. Multiple HSRP groups can also exist on a VLAN, port-channel, and Bridge Group Virtual Interface (BVI) interfaces.

The virtual ip address must be within the same subnet as in use on the LAN, though it must be unique on the subnet, including addresses assigned to other HSRP groups. Any packets sent to this virtual ip address are processed by the active router. Also, the router replies to any ARP requests sent to the virtual mac address.

The HSRP mac address follows the format of 0000.0c07.ac??. The first three bytes, 00000c, defines the vendor code. The second set, 07ac, indicates that this MAC address belongs to an HSRP virtual router. The final two digits define the group ID number of the HSRP group. Use the show standby command to display the virtual ip and mac addresses in use on a router.
Comments (0)
19 Jan 2010 @ 09:30AM
by Satis

Updated: 19 Jan 2010 @ 09:30AM
HSRP Packet Structure



Keep in mind that, after the initial election of Active and Standby routers, only the Active and Standby routers still send HSRP messages.
Comments (0)
HSRP States of Operation

Routers in HSRP go through the following states of operation:

StateDescription
InitialThe initial state is before any HSRP activities begin. This state is typically entered due to a configuration change, or when an interface first comes up.
LearnThe learning state is when the router has not yet determined the virtual IP address or seen an authenticated hello message from the active router. At this point, the router is still waiting for a message from the active router.
ListenThe listening states indicates that the router has learned the virtual IP address, but it neither the active nor the standby router. It only listens to hello messages from these routers. Any routers that are not the active or standby routers remain in this state.
SpeakThe speak state enables a router to send periodic hello messages and actively participate in the election of active and standby routers. A router must know the virtual IP address before it can enter this state.
StandbyThe standby state is only held by one router, which is ready to take over the role of active router should that router fail. It listens to hello messages from the active router and also sends its own hello messages.
ActiveThe active state is held by only one router which takes care of all forwarding of packets sent to the virtual mac address. This router broadcasts periodic hello messages.
Comments (0)
HSRP router states

HSRP routers will be in one of three possible states:

Active: A router in the active state is actively forwarding packets sent to the virtual router. There can be only one active router. Active routers transmit hello packets.
Standby: A router in the standby state is waiting for the active router to fail so it can take over. There can be only one standby router. Standby routers transmit hello packets.
Init: A router in the init state is watching hello packets for either active or standby routers to fail so that it can take over the specified slot. There can be any number of init routers. Routers in the init state do not transmit hello packets.
Comments (0)
HSRP Comamnds

In order to configure a router as a member of an HSRP standby group, enter the following commands:

Router(config-if)#standby group-number ip virtual-ip-address

The group-number is an optional argument that specifies to the interface which group number the interface is a member of. If not specified, the group defaults to 0.

The virtual-ip-address specifies the IP address of the HSRP virtual router.

For example:

Router(config)#int fa0/0
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)#standby 1 ip 10.1.1.65
1w0d: %STANDBY-6-STATECHANGE: Standby: 1:
FastEthernet0/0 state
Speak -> Standby
1w0d: %STANDBY-6-STATECHANGE: Standby: 1:
FastEthernet0/0 state
Standby -> Active

Comments (0)