How to configure Hot Standby Router Protocol (HSRP) with Cisco routers
When high-availability isn’t a priority but a requirement, router redundancy is mandatory. As every router has its own layer 3 address, it would be useful to have the possibility to use a single layer-3 address able to “move” from a router to another. Hot Standby Router Protocol (HSRP), a proprietary protocol developed by Cisco, allows to decouple the IP addresses from the physical interfaces and to associate them to groups of interfaces, providing hardware redundancy.
Technically speaking, HSRP sends its hello message to the multicast address 224.0.0.2 (all the routers inside the network) using the 1985 UDP port, to contact the other HSRP-enabled routers and estabilish the priorities between them: the primary router – with the higher priority – will work as virtual router (with its own IP and MAC addresses) and it will be used by the hosts as gateway; in case of failure of the primary router, the router with the second highest priority will become the default gateway.
(more…)