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.




