Configure first hop redundancy protocols (HSRP, VRRP)

3.4 IP Services

📘CCNP Encore (350-401-ENCORE-v1.1)


1. What are First Hop Redundancy Protocols (FHRPs)?

FHRPs are protocols that provide backup routers for hosts in a network. They ensure that if the primary router fails, another router can take over immediately, so devices can still reach the network without disruption.

Key concept:

  • Devices (like servers or computers) usually have a default gateway.
  • If that gateway fails, they cannot communicate outside their local network.
  • FHRPs allow multiple routers to share a virtual IP. The network devices always use this virtual IP as their default gateway.
  • If one router fails, another router takes over the virtual IP automatically.

Think of it as high availability for gateways.


2. Common FHRPs

The main FHRPs you need to know for the exam are:

ProtocolCisco Proprietary?Default Protocol TypeKey Points
HSRP (Hot Standby Router Protocol)YesActive/StandbyOnly one router is active; others are standby.
VRRP (Virtual Router Redundancy Protocol)No (standards-based)Master/BackupOne master router handles traffic; others are backups.
GLBP (Gateway Load Balancing Protocol)YesLoad-sharingAllows load balancing among multiple routers. (Less emphasized for basic FHRP exams)

For CCNP 350-401, HSRP and VRRP are primary.


3. How HSRP Works

  1. Virtual IP & MAC:
    • HSRP creates a virtual IP that hosts use as their gateway.
    • It also creates a virtual MAC address for the gateway.
  2. Roles of Routers:
    • Active Router: Handles all traffic sent to the virtual IP.
    • Standby Router: Monitors the active router. If it fails, the standby becomes active.
    • Other Routers: Can be in listening state.
  3. Election & Priority:
    • Routers have a priority value (0–255). Higher priority → more likely to be active.
    • Default priority is 100.
    • The active router is elected based on highest priority.
    • If priorities are equal, the router with the highest IP address becomes active.
  4. Timers:
    • Hello timer: How often routers send HSRP hello messages (default: 3 seconds).
    • Hold timer: How long standby waits before declaring active router dead (default: 10 seconds).

HSRP States

StateDescription
InitialStarting up. Not participating yet.
LearnKnows the virtual IP but doesn’t know active router yet.
ListenKnows virtual IP & active router. Waiting to become active/standby.
SpeakSending hello messages; election occurs here.
StandbyWaiting to take over if active fails.
ActiveForwarding traffic to hosts.

4. How VRRP Works

VRRP is similar to HSRP but has some differences:

  1. Roles:
    • Master Router: Forwards packets sent to the virtual IP.
    • Backup Routers: Take over if master fails.
  2. Election & Priority:
    • Uses a priority value (1–255). Higher priority → master.
    • Default priority: 100.
    • Ties are broken by highest IP address.
  3. Timers:
    • Advertisement interval: How often master sends VRRP messages (default: 1 second).
  4. Key Difference from HSRP:
    • HSRP is Cisco proprietary; VRRP is open standard.
    • VRRP defines the router forwarding traffic as Master instead of Active.

5. Exam-Focused Commands

HSRP Example:

interface GigabitEthernet0/1
 ip address 192.168.1.2 255.255.255.0
 standby 1 ip 192.168.1.1       # Virtual IP
 standby 1 priority 110          # Optional: set priority
 standby 1 preempt               # Allow router to take over if it has higher priority

Explanation:

  • standby 1 ip 192.168.1.1 → sets the virtual IP.
  • priority 110 → sets this router to be more likely active.
  • preempt → allows router to take over if it becomes higher priority after a reboot.

VRRP Example:

interface GigabitEthernet0/1
 ip address 192.168.1.3 255.255.255.0
 vrrp 1 ip 192.168.1.1
 vrrp 1 priority 120
 vrrp 1 preempt

Explanation:

  • Similar to HSRP but uses vrrp instead of standby.

6. Key Exam Tips

  1. Roles and terminology matter:
    • HSRP → Active/Standby.
    • VRRP → Master/Backup.
  2. Default priorities and timers:
    • Know that HSRP default priority is 100, hello 3s, hold 10s.
    • VRRP default priority 100, advertisement 1s.
  3. Preemption:
    • Without preempt, a router with higher priority cannot take over until active fails.
  4. Virtual IP is always the gateway for hosts:
    • Physical router IPs are secondary; hosts only use virtual IP.
  5. Multiple routers can share one virtual IP:
    • Ensures high availability in IT networks (for example, web servers or DNS servers).

7. Summary Table – HSRP vs VRRP

FeatureHSRPVRRP
ProprietaryCiscoStandard (RFC 5798)
RolesActive / StandbyMaster / Backup
Default Priority100100
Virtual MACYesYes
PreemptionOptionalOptional
UseGateway redundancy for Cisco networksGateway redundancy for mixed vendors

Key Takeaways for the Exam:

  • Understand what HSRP and VRRP do – provide redundancy for default gateways.
  • Know roles, states, and election process.
  • Know basic commands and configuration options (IP, priority, preempt).
  • Recognize differences between HSRP (Cisco only) and VRRP (standard).
  • Focus on virtual IP and MAC addresses, as these are what hosts rely on.

Buy Me a Coffee