Although both considered protocols offer
authentication of messages, the best practice is to
avoid any FHRP authentication configuration (Nadas,
2010). The risk of authentication misconfiguration is
that the network can operate more coordinators at the
same time, which causes non-deterministic behavior,
asymmetric flows or even black holing of traffic.
3.2 HSRP: Theory of Operation
The complete Hot Standby Router Protocol
specification is proprietary and not officially
published by Cisco Inc. However, some information
may be reconstructed from various public sources
such as RFC 2281 (Li et al., 1998), patent US8213439
B2 (Natarajan, 2004), and online pages (Cisco
Systems, 2009), (Cisco Systems, 2016).
From a group of candidate routers, HSRP elects
so-called Active router based on priority (in the
range from 0 to 255 with default value 100). The
Active router plays the role of a coordinator as
described in the previous subsection. The HSRP
election process is by default non-preemptive. The
HSRP group member with the second highest priority
(named Standby router) backs up the functionality
of the Active router. Only Active router forwards
traffic from the hosts. All other HSRP routers
periodically check the operability of Active node and
Standby node waiting to substitute them.
HSRP exists in two versions. Both versions
leverage UDP on port 1985 as the transport protocol.
HSRPv1 delivers redundancy of IPv4 default
gateway. HSRPv1 sends control messages to (all
routers) multicast address 224.0.0.2. HSRPv1
employs 8 bit long HSRP group identifier (values in
the range from 0 to 255) unambiguous for a single
interface/link. HSRPv1 virtual MAC has syntax
00:00:0c:07:ac:XX, where last byte’s XX is equal to
8 bits long HSRPv1 virtual group identifier. HSRPv2
extends functionality to achieve the sub-second
switchover between gateways and supports IPv6.
HSRPv2 routers send multicast messages using IPv4
address 224.0.0.102 or IPv6 address ff02::66.
HSRPv2 offers 12-bit long HSRP group identifier
(values in the range from 0 to 4095) accommodated
in the virtual MAC address of the form
00:00:0c:9f:fX:XX, where XXX is HSRPv2 group
identifier. HSRPv1 uses a different packet format
compared to HSRPv2 which employs type-length-
value protocol field approach.
Protocol fields Op Code in both headers specify
the type of HSRP message:
Hello – HSRP Hello messages notify other
members of the HSRP group about sender’s
parameters. Based on this parameters, the election
of Active and Standby occurs. After the election,
only Active and Standby routers generate any
HSRP messages;
Coup – If HSRP group is configured with
preemption, then the new group member with the
highest priority announces its right to become
Active router with HSRP Coup;
Resign – Group member, which no longer wants
to be Active, sends HSRP Resign message and
abstains from its role;
Advertisements – HSRP devices use this message
to inform about their group state activity or
passivity for ICMP redirects.
HSRP works with two timers which values are also
part of HSRP header. These timers must be
synchronized within the whole HSRP group.
Hellotime is the period between two consecutive
HSRP Hellos. Hellotime default value is 3 seconds.
Each HSRP group member maintains two Holdtimers
– one for Active and one for Standby router. If
Holdtime expires, Active/Standby is considered
unreachable, and election process is initialized.
Holdtime is reset with the each reception of HSRP
Hello. Suggested Holdtime value is at least 3× larger
than Hellotime in order to provide enough time for
any delayed
HSRP Hello to reach recipients.
Holdtime default value is 10 seconds.
Describing HSRP in more detail is beyond the
scope of this paper. To design a simulation model of
HSRP we have created a finite-state machine (FSM)
outlining overall HSRP functionality. HSRP process
transits through following states:
Init – There is single HSRP instance per group per
interface, which is being (re)initialized;
Learn – HSRP process can be started with
incomplete configuration. Group member learns
missing parameter values from received HSRP
Hellos during this state.
Listen – Passive member of HSRP group checks
availability of current Active/Standby and listens
for HSRP Hellos from these routers;
Speak – Router considers itself as a new candidate
for Active or Standby router role and periodically
announces candidacy via HSRP Hellos;
Standby – A single member from HSRP group
acts as a watch dog of Active router. Standby can
swiftly transit from this to Active state substituting
functionality of current Active;
Active – A single member with the superior
parameters (i.e., priority and IP address) remains
in this state as long as it serves as the Active router
for a group.