HSRP
- Hot Standby Router Protocol is an FHRP protocol
- HSRP uses a Virtual IP (VIP) and MAC address to allow for automated gateway failover
- The hosts use the VIP as their default gateway address
- If the active gateway fails, the standby gateway will take over
- Hello messages are sent ever 3 seconds by default by routes in the active, standby, or speak states
- Only routers in the standby state listen for routers, and takes over if the span between hello messages exceeds the hold time (def. 10 seconds)
- VRRP (Virtual Router Redundancy Protocol) is identical to HSRP, except it uses
vrrp instead of standby for its configuration
FHRP Virtual MAC Addresses
- Virtual MAC addresses
- HSRPv1: 0.c07.acXX or 00:00:0c:07:ac:XX
- HSRPv2: 0.c9f.fXXX or 00:00:0c:9f:fX:XX
- VRRP: 0.5e00.1XX or 00:00:5e:00:01:XX
- V = 5e00
- 05e001 (Oh 5-ee hundred and 1)
- GLBP: 7.b400.XXYY or 00:07:b4:00:XX:YY
- G =/= 5, so G = b400
- 7B400
- 224.0.0.2
- 224.0.0.9
- 224.0.0.18
- 224.0.0.102
HSRP operations
- Both routers have a normal physical IP address and MAC address on their HSRP interface
- Unique addresses area used on both routers
- They both also have the HSRP VIP and MAC address configured on the interface
- The same addresses are used on both routers
- When they come online, one is elected to HSRP active router, the other is standby
- The active router owns the virtual IP and MAC address and responds to ARP requests
- All traffic for the VIP goes through the active router
- The routers send hello messages to each other over their HSRP interface
- If the standby router stops receiving hellos from the active, it will transition to be the active router
- It will take ownership of the VIP and MAC address and respond to ARP requests
HSRP Router States
- There are 6 HSRP states
- Init
- When the link first comes up
- Learn
- The HSRP device is attempting to learn the VIP
- Listen
- The device has learned the VIP
- The device is listening for hello messages from other (active/standby) HSRP devices
- If a device is not elected to either active or standby, it remains in the Listen state
- Speak
- The device sends hello messages and participates in the Active router election
- Standby
- The device is actively listening to hello messages from the Active router
- The default hold time is 10 seconds, roughly 3x the hello time
- Active
- The device receives data for and manages the VIP
- Sends hello messages ever 3 seconds (by default)
Advanced Topics
- Priority and Preemption
- Router priority can be set, with the higher value being preferred
- Default value is 100
- Preemption allows a router to take
Active when it comes online
- Default, preemption is disabled because it can be more stable if there is a fault with the primary router
- HSRP Version
- Version 2 introduced minor improvements
- Default version is 1
- Both routers must be on the same version
- Standby Groups
- Multiple HSRP "Standby groups" can be configured on interface, allowing for "load balancing" between VLANs or different clients
- e.g., R1 is priority in standby 1 10.10.10.1/24, and R2 is priority in standby 2 10.10.20.1/24
HSRP Configuration
- Configure both router interfaces with their IP and "standby IP" (Virtual IP)
- Example: VIP is 10.10.10.1
R1Config# int g0/1
Config-if# ip address 10.10.10.2 255.255.255.0
Config-if# no shut
Config-if# standby 1 ip 10.10.10.1
Config-if# standby 1 priority 110
Config-if# standby 1 preempt
Config-if# standby version 2
R2Config# int g0/1
Config-if# ip address 10.10.10.3 255.255.255.0
Config-if# no shut
Config-if# standby 1 ip 10.10.10.1
Config-if# standby 1 priority 90
Config-if# standby version 2
- Verification
#sho standby
OSI or TCP/IP Layer
CCNA Exam Topic
#extop-3-5
Contributors
Sources