FHRP (First Hop Redundancy protocol)
I) HSRP- Hot Standby Router Protocol (Cisco proprietary)
II) GLBP – Gateway Load Balancing Protocol (Cisco proprietary)
III) VRRP – Virtual Router Redundancy Protocol
HSRP (Hot Standby Router Protocol)
HSRP is a Cisco Proprietary FHRP protocol which is used to provide redundancy
a) HSRP is a Layer 7 protocol
b) HSRP uses UDP 1985
c) HSRP is cisco proprietary
d) Multicast address [Link] for v1 and [Link] for v2
e) virtual mac [Link] where XY is group number (0-255)
f) Maximum 16 routers that can be aggregated
Timers -
a) Hello – 3 sec
b) Hold time – 10 sec
Router Modes -
a) Active – Router which forwards data plane traffic
b) Standby – Router which waits till Active router is no longer functioning
c) Listen –
Election Criteria -
a) Highest Priority (Default 100)
b) Highest Physical Interface IP
Important**
i) By default Preemption is disabled
ii) Preemption works only on the basis of priority
iii) By default preemption delay is 0
Election process if Preemption is disabled -
i) Routes should be configured with same group number and Every group require different
virtual IP.
ii) Every router will become standby first and wait for hello messages from other routers. If
no hello is received, Router becomes active.
iii) If preemption is disabled, active router will only be elected once. Whereas routers in
standby and listen can change their state depending on their physical interface IP.
iv) After active router is elected, election will only take place for standby
v) If Active router goes down, it’ll take 10 seconds for standby router to become active and
router in Listen state with highest physical interface IP will become Standby.
Election process if Preemption is Enabled -
Preemption – A feature of HSRP that re-enforces election
i) Election will always take place for Both active and standby if priority is configured
(preemption only works if priority is configured 1-255, default 100). (High bandwidth link
example)
ii)
HSRP Versions -
i) HSRP Version 1 -
a) Group numbers range 0-255
b) Max 16 routers
c) Only supports Ipv4
d) Virtual mac – [Link]
e) Multicast IP address – [Link]
ii) HSRP Version 2 -
a) Group number range 0-4096
b) Max Routers
c) Supports Both IPv4 and IPv6
d) Virtual mac – [Link]
e) Multicast IP address – [Link]
HSRP States
“debug standby events” command for debugging
i) Down -
i) Init – HSRP is just configured and router isn’t part of any group yet. In this state,
Interface comes up which was shut and was configured with HSRP or HSRP is just
configured on the interface. Additionally, Device refreshes it’s ARP table for interfaces.
ARP reload here shows ARP table being refreshed when interface came up.
Screenshot above shows HSRP is now enabled But router doesn’t know Group Number or
Virtual IP yet. After this, State changes from Init → Listen
In Init state, ARP table is refreshed and HSRP is enabled.
ii) Learn -
iii) Listen – Device is in passive monitoring in Listen state. It knows Virtual IP but is
neither active or standby router. No hello are sent in this state as only Active and
Standby can send messages. Devices which aren’t elected as Active or Standby falls back to
this state.
When the Standby device goes down, device in Listen state follows the election criteria and
takes place of Standby device. But if there is no standby device in the network, device still
waits to hear hello messages from other HSRP enabled devices which might be present in
network.
Screenshot above shows Standby timer expired. This is the timer during which device
listens for hello messages from other router. When this timer expired, device changed it’s
state from Listen to Speak.
iv) Speak – In this state, devices actively participate in election to become Standby. They
send hello packets with field called state set to “Speak”. Every device follows election
process which is Highest Priority (default 100) then Highest physical Interface IP. One
device becomes Standby while others fall back to Listen.
Screenshot above shows a hello packet during Speak state.
Or
If there is only single HSRP enabled device in the network, it sends hello messages with
state set to Speak and device moves to Standby as there is no other device to compete with.
Screenshot above shows device was in Speak state when Standby timer expired and then,
device changed it’s state to Standby.
v) Standby – In Standby state, device has successfully completed the election and is now
primary backup of the Active device in the group. Device monitors Active router by hello
messages which contains State = Active in them. When Standby device stops receiving
hello messages from Active device, Standby device takes over.
Or
If there is no Active device in the network, Standby device waits till Active router hearing
timer expires and then it becomes active itself. Screenshot below shows exactly that
happening.
First line in the screenshot shows Active timer expired and in next line, Standby router
becoming Active with log Active router is local being displayed.
vi) Active – In Active state, Router is responsible for forwarding all the traffic sent to
Virtual IP. In addition to this, Active router response to ARP request from clients and
hello message from active router contains State = Active.
When Router just enters the Active state, it does several things which are explained below
with screenshots.
a) Active router knows about Standby router (so the routers in Listen state) and Active
router generates a log showing the Standby router’s IP.
Standby Router is not known in the screenshot above. **I’ll add it here tomorrow**
b) Active Router adds entry of virtual IP and the virtual mac in the mac address table and
activates Virtual MAC so that traffic sent to virtual IP can be accepted on layer 2.