IP Connectivity · Topic 5 of 5

First Hop Redundancy Protocols

Learn why first hop redundancy protocols exist and how HSRP, VRRP and GLBP share a virtual gateway address so hosts keep working when a router fails.

  • 6 min
  • Exam objective 3.5
  • Includes a diagram
In a nutshell
  • An FHRP gives hosts a gateway that survives the failure of one router.
  • Hosts use a virtual IP address and a virtual MAC address as their gateway.
  • HSRP is Cisco only, with active and standby roles.

What it is

A first hop redundancy protocol keeps a host's default gateway working when one router fails.

Every host has a default gateway, the router it sends traffic to when the destination is outside its own subnet. Most hosts have only one gateway address configured. If that router fails, the hosts cannot leave the subnet, even if a second router is sitting right next to the first.

A first hop redundancy protocol (FHRP) removes that single point of failure. Two or more routers share a virtual IP address, and hosts use it as their default gateway.

One router answers for the address at any time. If it fails, another takes over, with no change needed on the hosts.

How it works

The routers in a group act as one virtual router, and a standby router takes over when the active one stops responding.

The basic idea

The virtual router has:

  • a virtual IP address, which is the hosts' default gateway
  • a virtual MAC address, so that the hosts' ARP entry stays the same after a failover

The routers exchange hello messages to monitor each other. One is chosen to forward traffic for the virtual address, and the other waits.

Hostgateway 192.168.10.254sends trafficR1active routerR1hello messagesR2standby routerHostsame gateway after failuresends trafficR2now active

If the hellos from the active router stop, the standby router takes over the virtual address and virtual MAC address. The hosts keep sending to the same IP and MAC address as before, and they notice at most a brief pause.

The three protocols

FeatureHSRPVRRPGLBP
OriginCisco proprietaryOpen standardCisco proprietary
RolesActive and standbyMaster and backupAVG and AVFs
Load balancingPer group, by using several groupsPer group, by using several groupsBuilt in, across routers in one group
Default priority100100100
Watch out

Do not mix up the role names. HSRP uses active and standby, VRRP uses master and backup, and GLBP uses AVG and AVF.

HSRP (Hot Standby Router Protocol) is the Cisco protocol. One router is active and forwards traffic for the virtual IP address. Another is standby and ready to take over.

  • The router with the highest priority becomes active, and the highest IP address breaks a tie.
  • By default, HSRP does not pre-empt, so a higher priority router that comes back later does not take over unless preempt is configured.
  • Hellos are sent every 3 seconds, and the standby router takes over if it hears nothing for 10 seconds.
  • HSRP version 1 uses virtual MAC 0000.0C07.ACxx and multicast 224.0.0.2. Version 2 uses 0000.0C9F.Fxxx and 224.0.0.102, and also supports IPv6.

VRRP (Virtual Router Redundancy Protocol) does the same job but is an open standard, so it works with other vendors' routers. One router is the master and the others are backups.

VRRP also differs in that the virtual IP address can be the real address of one of the routers, and that pre-emption is on by default.

GLBP (Gateway Load Balancing Protocol) is a Cisco protocol that also shares the load. HSRP and VRRP have one active router per group, so the others sit idle.

In GLBP, one router acts as the active virtual gateway (AVG). It hands out different virtual MAC addresses to different hosts in reply to ARP requests.

Each router in the group, called an active virtual forwarder (AVF), then forwards for one of those MAC addresses. The hosts all use the same gateway IP address, but their traffic is spread across the routers.

Host AARP for gatewayasksAVGanswers ARPMAC 1R1AVF for MAC 1Host BARP for gatewayasksAVGMAC 2R2AVF for MAC 2

Load sharing with HSRP or VRRP

With HSRP or VRRP, you can still share traffic by creating two groups.

For example, router A is active for the VLAN 10 group and standby for the VLAN 20 group, and router B does the opposite. Half the hosts use one virtual address, and half use the other.

A short HSRP example

Two routers share the virtual gateway 192.168.10.254; R1 with priority 110 is active and R2 with priority 100 is standby.

R1 is down and R2 has become active for the virtual address 192.168.10.254, so PC1 keeps the same gateway. This configuration makes one router the preferred gateway.

interface GigabitEthernet0/0
 ip address 192.168.10.2 255.255.255.0
 standby version 2
 standby 1 ip 192.168.10.254
 standby 1 priority 110
 standby 1 preempt

Each router has its own real address on the interface (here .2 and .3). Both are given the same virtual address, 192.168.10.254, and the same group number.

The router with priority 110 becomes active. Hosts are set to use 192.168.10.254 as their gateway.

To check the state:

show standby
show standby brief

The output lists the group, the priority, the state (Active or Standby), the virtual IP address and the addresses of the active and standby routers.

What to remember for the exam

Eight facts cover first hop redundancy.

  • An FHRP gives hosts a gateway that survives the failure of one router.
  • Hosts use a virtual IP address and a virtual MAC address as their gateway.
  • HSRP is Cisco only, with active and standby roles.
  • VRRP is an open standard, with master and backup roles.
  • GLBP is Cisco only and balances load across routers in one group.
  • The highest priority wins. Default priority is 100 for HSRP.
  • HSRP does not pre-empt unless configured to.
  • With HSRP or VRRP, use several groups to share traffic between routers.
Exam tip

If a question asks for load balancing inside one group, the answer is GLBP. For a vendor neutral standard, it is VRRP.

Common mistakes

These five errors are the usual ones.

Giving hosts a real router address as the gateway. Hosts must use the virtual IP, or the failover has no effect.

Giving two routers the same real IP address. Each router needs its own address, and only the virtual address is shared.

Expecting a recovered router to take over at once. Without preempt, the standby router stays active.

Confusing the protocol names for the roles. HSRP uses active and standby. VRRP uses master and backup. GLBP uses AVG and AVF.

Assuming HSRP and VRRP balance traffic by themselves. Only GLBP spreads the load within one group.

Check yourself

Work through these three prompts.

  • Why does a host need no change when its gateway router fails in an FHRP design?

    The hosts use a virtual IP and MAC address, and the standby router takes over both.

  • How do HSRP, VRRP and GLBP compare in terms of standards and load sharing?

    HSRP and GLBP are Cisco only and VRRP is an open standard. HSRP and VRRP share load with several groups, while GLBP balances inside one group.

  • How can two groups share traffic between two routers using HSRP?

    Router A is active for the VLAN 10 group and standby for VLAN 20, and router B does the opposite.

Topic 5 of 5 in IP Connectivity

Test yourself on IP Connectivity

The full Cisco CCNA 200-301 question bank has 1,206 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.