What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams (2024)

You are here: Home / Cisco General / What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams

Written By Lazaros Agapidis

When you configure a host with network parameters, one of the elements that you configure is the default gateway. But what happens if the device acting as the default gateway fails? Isn’t that a single point of failure? Well, yes, it is. To mitigate such failures, we can use what is known as a First Hop Redundancy Protocol (FHRP) to add resilience to our network.

What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams (1)

In this article, I’ll be delving deeper into what FHRP is, how it operates, and how it provides network redundancy. We’ll also examine some of the various protocols that are available to achieve this network robustness (such as HSRP, VRRP, GLBP).

Table of Contents

What is the Default Gateway?

The default gateway which is configured on a network host is the IP address of the device, usually a router, through which communication with other network subnets can take place.

If the destination IP address of a particular communication from a host is outside of its own subnet, that host will forward the packet to the local default gateway for further routing to get to its intended destination.

Within an IP subnet, we usually have a single device acting as the default gateway. On a home or small office network, this would typically be our xDSL modem or our cable modem.

But in larger networks, where high network availability is crucial, it is necessary to eliminate this single point of failure by adding redundancy to the default gateway. That’s where FHRPs come in.

What is an FHRP?

FHRPs allow two or more physical devices to operate as redundant default gateways. If one physical device fails, the other takes over, and the hosts are none the wiser.

The key to FHRPs is that they create what is known as a “virtual IP address” that is used as the address of the default gateway on the hosts.

The physical device that acts as the active gateway adopts this virtual address. If this device fails, the backup device detects this and immediately adopts the virtual IP address, thus continuing to serve arriving packets. The switchover is almost instantaneous, and thus few or no packets are lost in the process.

There are various FHRPs which we’ll talk about shortly, and they may differ slightly in their operation, but the basic idea of functionality is essentially the same.

A closer look at FHRPs

What does a topology where FHRPs are deployed look like? Well, it looks something like this:

What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams (2)

Here we have a network segment composed of a switch with three hosts all on the same subnet. We also have two routers, GW1, and GW2, acting as redundant default gateways.

The IP addresses of their physical interfaces are 192.168.10.2 and 192.168.10.3. Between the two GWs, you can see what is labeled as a “Virtual GW.”

This is not a real physical device, but it simply represents the virtual gateway IP address configured on the hosts on the network. This is the address that is automatically adopted by the gateway that is active.

MORE READING: Passing non-IP Traffic over IPSEC VPN using GRE over IPSEC

Notice that the default gateway configured on Host 3 (and on all hosts) is the virtual gateway of 192.168.10.1.

FHRP operation

So that’s the topology. But what about the protocol in action? Well, let’s look again at our topology, but this time, we are told that GW1 is acting as the active gateway.

What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams (3)

As we can see, GW1 has adopted the virtual gateway IP, and all packets destined for the default gateway of 192.168.10.1 go to GW1.

So, in a sense, GW1 has two IP addresses assigned to its interface. That’s not a completely accurate statement, but it is what it looks like from the point of view of the hosts.

The green line indicates the path that packets that have a destination outside of the local subnet take. In the meantime, GW2 is on standby, and is continuously monitoring the status of GW1.

Remember, these devices have their own IP addresses configured on their physical interfaces, so they can communicate directly with each other over the switch to coordinate FHRP mechanisms using control packets as defined by the FHRP protocol in use.

Now let’s say that GW1 fails. GW2 detects this and immediately adopts the virtual IP address and begins acting as the default gateway.

What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams (4)

In the above diagram, you can see that GW2 has adopted the IP address of the virtual GW, and the new path that the packets take is via GW2.

In this fashion, if one physical device fails, the other device takes over, and thus redundancy is established. The hosts are completely oblivious to any changes that have been made.

Additional details of operation

What has been described so far is the fundamental operation of FHRPs. There are additional details of how this works as well as various ways in which its operation can be enhanced. These are briefly listed below:

Gratuitous ARP

When a gateway adopts a virtual IP address, it must inform all of the hosts on the network of the new MAC address that corresponds to that IP address.

Upon adoption of the virtual IP, a Gratuitous ARP or GARP is sent to all hosts on the network, immediately informing them of the change so that dropped frames will be kept to a minimum.

Layer 3 switches

The example above involved interfaces on routers, but FHRPs can be applied to any Layer 3 interfaces. When using multilayer switches for example, it is possible to create FHRP instances between SVIs on the same subnet.

Thus, two switches that share the same VLANs can create dozens or even hundreds of FHRP pairings, one for each of the SVIs they share.

Tracking interfaces

In the example shown, the failure of GW1 triggers GW2 into becoming the active router. But what happens if GW1 doesn’t fail, but its link to the Internet fails like so?

What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams (5)

GW1 will continue to act as the active gateway because GW2 still detects that it is up. But packets are dropped because of the failed link.

To deal with such eventualities, it is possible to track specific interfaces or reachability to particular destinations using IP SLAs.

MORE READING: Understanding IP Prefix Lists in TCP/IP Networks (With Cisco Examples)

You can configure what will happen if a particular SLA fails. In the above scenario, if you can configure an SLA on GW1 that will examine the reachability of a particular IP address on the Internet. As long as the SLA is met, GW1 remains the active gateway. If the SLA fails, it will hand off the active status to GW2.

Even more details

Some additional features that are available from some or all FHRPs include:

  • Authentication – providing secure communication between gateways
  • Preemption – the ability of one gateway to assume the role of the active device over another even if the other is healthy
  • Priority settings – preemption can take place using priority values that can change dynamically based on various real-time conditions (such as SLAs for example)
  • Proprietary and open protocols – some protocols are proprietary to Cisco while others are open standards

Popular FHRPs

There are several FHRPs that are supported by Cisco routers and Layer 3 switches that can be deployed. Below is a brief description of each and of their capabilities. A comparison table that summarizes these characteristics follows.

Hot Standby Redundancy Protocol (HSRP)

HSRP is a Cisco proprietary protocol that provides network redundancy for IP networks, ensuring high availability of the default gateway in a network.

Multiple routers participate in HSRP by creating a virtual router with a virtual IP address. One router is elected as the active router and another as the standby router. If the active router fails, the standby router takes over, ensuring continuous network availability.

Virtual Router Redundancy Protocol (VRRP)

VRRP is a standards-based protocol (defined in RFC 5798) similar to HSRP but not limited to Cisco devices.

It allows multiple routers to participate in a virtual router group, sharing a virtual IP address. The protocol designates one router as the master, which handles traffic sent to the virtual IP address. If the master router fails, another router in the group takes over as the master, maintaining network continuity.

Gateway Load Balancing Protocol (GLBP)

GLBP is another Cisco proprietary protocol that not only provides redundancy but also load balancing. GLBP allows multiple routers to share the load of being the default gateway for a subnet.

Unlike HSRP and VRRP, where only one router actively forwards traffic, GLBP can distribute traffic among multiple routers.

This enhances both redundancy and efficient use of network resources by balancing the load among all participating routers.

Comparison Table of Various FHRP Protocols

FeatureHSRPVRRP GLBP
Protocol TypeProprietary (Cisco)Open Standard (RFC 5798)Proprietary (Cisco)
RedundancyYesYesYes
Load BalancingNoNoYes
Master/Active Router TerminologyActive and Standby RoutersMaster and Backup RoutersActive Virtual Gateway (AVG) and Active Virtual Forwarders (AVFs)
Virtual IP AddressYesYesYes
PreemptionOptionalYesYes
Priority SettingYesYesYes
AuthenticationYesYesYes
Number of Routers SupportedMultiple, but only one active at a timeMultiple, but only one active at a timeMultiple, with load balancing
Failover TimeTypically within secondsTypically within secondsTypically within seconds
Configuration ComplexityModerateSimpleMore complex due to load balancing
Support for Multivendor EnvironmentLimited to Cisco devicesYesLimited to Cisco devices

Conclusion

FHRPs play a critical role in ensuring network availability and reliability by providing seamless failover capabilities.

While HSRP and VRRP offer robust redundancy, GLBP extends these benefits with added load balancing, making it ideal for optimizing network performance.

Understanding the differences and strengths of each protocol allows network administrators to choose the most suitable solution for their specific network requirements.

Related Posts

  • Comparison of BGP Confederations vs Route Reflectors
  • What are BGP Confederations-Explanation and Discussion (With Cisco Example)
  • What is BGP Route Reflector – Explanation and Discussion (with Cisco Example)
  • What is a Wildcard Mask – All About Wildcard Masks Used in Networking
What is Cisco FHRP (First Hop Redundancy Protocol) Explained With Diagrams (2024)

FAQs

What is FHRP first hop redundancy protocol? ›

A first hop redundancy protocol (FHRP) is a computer networking protocol which is designed to protect the default gateway used on a subnetwork by allowing two or more routers to provide backup for that address; in the event of failure of an active router, the backup router will take over the address, usually within a ...

What is Cisco first hop redundancy? ›

First Hop Redundancy Protocol (FHRP) is a hop redundancy protocol that is designed to provide redundancy to the gateway router within the organization's network by the use of a virtual IP address and virtual MAC address. To implement FHRP, there should be two or more routers that will be used as a gateway router.

What is the Cisco protocol for redundancy? ›

HSRP is Cisco's standard method of providing high network availability by providing first-hop redundancy for IP hosts on an IEEE 802 LAN configured with a default gateway IP address. HSRP routes IP traffic without relying on the availability of any single router.

What is the overview of FHRP? ›

FHRP creates a virtual shared router from at least two physical routers. The endpoints always forward packets to the same default gateway address. The virtual router is based on a shared virtual IP address and virtual Ethernet MAC address.

What's the purpose of using FHRP? ›

IP routing redundancy is designed to allow for transparent fail-over at the first-hop IP router. Both HSRP and VRRP enable two or more devices to work together in a group, sharing a single IP address, the virtual IP address.

What is the benefit of first hop redundancy protocol? ›

FHRP allows multiple routers to act as a backup for each other in case one of them fails or becomes unreachable. This way, the network can avoid losing connectivity to the default gateway and ensure uninterrupted traffic flow.

What is redundancy in Cisco? ›

Connection redundancy prevents open connections from ceasing to respond when the active CSM-S fails and the standby CSM-S becomes active.

What is the purpose of the Cisco redundant power system? ›

It helps ensure uninterrupted operation and protection against power supply failures by provid- ing failover for Cisco switches and routers.

Which one is the industry standard for first hop redundancy protocol? ›

HSRP operates at the data link layer (Layer 2) and is widely used in Cisco environments. 2) Virtual Router Redundancy Protocol (VRRP): Similar to HSRP, VRRP is an industry-standard FHRP.

Why are redundancy protocols needed? ›

Put simply: more redundancy equals more reliability. It also helps with distributed site management. The idea is that if one device fails, another can automatically take over. By adding a little bit of complexity, we reduce the probability that a failure will take the network down.

What are the two servers for redundancy? ›

Server redundancy is based on two main types of configuration: Primary and secondary (or back-up) server : Here, a secondary server is ready to take over in the event of failure of the primary server. Data can be replicated in real time or at regular intervals.

Which of the following is a Cisco proprietary first hop redundancy protocol? ›

Hot Standby Router Protocol - (HSRP)HRSP is a Cisco-proprietary FHRP that is designed to allow for transparent failover of a first-hop IPv4 device.

What is the need for FHRP? ›

FHRP ensures that if the first hop fails, another device can take over and continue to provide connectivity for devices on the network. FHRP is important because it provides redundancy for the first hop of a network. If the first hop fails, devices on the network will lose connectivity.

What is the purpose of using first hop redundancy protocol on a specific subnet? ›

What is the purpose of using First Hop Redundancy Protocol on a specific subnet? The routers in the FHRP group share a virtual MAC and Virtual IP and that acts as the Default Gateway for the HOSTS. It provides redundancy is case a router fails, no need to change the default gateway information.

Is FHRP Cisco-proprietary? ›

The FHRP (First Hop Redundancy Protocol) implementation that is a Cisco-proprietary protocol and supports IPv4 load sharing is called HSPRP (Hot Standby Router Protocol). HSRP enables a set of routers to work together to present the appearance of a single virtual router to the hosts on a local area network (LAN).

How does a first hop redundancy protocol such as HSRP provide resiliency? ›

Increased Reliability and Availability: By automatically switching to a backup gateway when the primary fails, FHRPs minimize downtime and ensure continuous network service. Load Balancing: Some FHRPs support load sharing among multiple gateways, distributing traffic loads to optimize network performance.

What does the common address redundancy protocol do? ›

The Common Address Redundancy Protocol or CARP is a computer networking protocol which allows multiple hosts on the same local area network to share a set of IP addresses. Its primary purpose is to provide failover redundancy, especially when used with firewalls and routers.

What is IP routing redundancy protocol? ›

The Virtual Router Redundancy Protocol (VRRP) is a computer networking protocol that provides for automatic assignment of available Internet Protocol (IP) routers to participating hosts.

Top Articles
Latest Posts
Article information

Author: Ms. Lucile Johns

Last Updated:

Views: 5896

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ms. Lucile Johns

Birthday: 1999-11-16

Address: Suite 237 56046 Walsh Coves, West Enid, VT 46557

Phone: +59115435987187

Job: Education Supervisor

Hobby: Genealogy, Stone skipping, Skydiving, Nordic skating, Couponing, Coloring, Gardening

Introduction: My name is Ms. Lucile Johns, I am a successful, friendly, friendly, homely, adventurous, handsome, delightful person who loves writing and wants to share my knowledge and understanding with you.