What is the purpose of a first hop?

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. The virtual IP address is configured in each end user's workstation as a default gateway address and is cached in the host's Address Resolution Protocol (ARP) cache.

In an HSRP or VRRP group, one router is elected to handle all requests sent to the virtual IP address. With HSRP, this is the active router. An HSRP group has one active router, at least one standby router, and perhaps many listening routers. A VRRP group has one active router and one or more backup routers. 

What is the purpose of a first hop?

In the world of I.T, redundancy is regarded as the most important element when implementing and designing a system and/ or Infrastructure. First Hop Redundancy Protocols are commonly used to create redundancy in networking to allow a router or a layer 3 switch to act as a backup gateway on a LAN segment to automatically take over if the primary gateway fails. Without this redundancy, if this router or router interface (that serves as a default gateway) fails, the hosts configured with that default gateway will lose connection from outside networks.

End devices are typically configured with a single IP address for a default gateway. This address does not change when the network topology changes. Instead of configuring a PC with a backup default gateway an FHRP can be used to provide this redundancy seamlessly without the individual configurations on each host.

HSRP / VRRP / GLBP are all examples of first-hop redundancy protocols which we will cover briefly in the blog. They are all very similar in operation with slight differences, so it is important to note the slight differences in operation/configuration of each, along with knowing that FHRP itself is not a protocol but rather describes a specific protocol in use!

HOT STANDBY ROUTER PROTOCOL (HSRP)  the first of the First Hop Redundancy Protocols we will discuss is the first ever created and it is also Cisco proprietary, which means, it will only be used with Cisco devices. HSRP provides hosts a transparent failover mechanism connecting to a primary gateway. This provides users at the access layer with uninterrupted service to the network if the primary gateway becomes inaccessible.  To configure HSRP you enable it on a particular interface and this interface is part of a “standby” group. Besides the physical IP address of the defined interface, there’s a virtual IP address in the same subnet. The idea behind this is to perform, parallel to this, a similar configuration in an interface belonging to another router. This will effectively generate redundancy where two different interfaces from two different devices will share the same virtual IP address. This virtual IP address will then act as the host’s gateway.

Quick Notes

Basic config

  • # int vlan (vlan #)
  • #Stanby (vlan #) ip x.x.x.x
  • #standby (vlan #) priority 100 (default – 100)
  • #stanfby (vlan #) preempt

HSRP interface tracking –

  • #stanby 10 track fa0/3 (decrement) default/blank  is 10
  • Cisco Proprietary
  • States – Standby and Active
  • Highest priority becomes Active
  • Timers hello 3 secs hold 10 secs- timers do not need to match
  • Always watch preemption. If Status does not change as expected, preemption may not be enabled.

THE VIRTUAL ROUTER REDUNDANCY PROTOCOL (VRRP)  VRRP stands for Virtual router redundancy protocol. VRRP is not Cisco propriety and is supported today by vendors all across the world. Network performance is improved by dynamically assigning one of the virtual routers as a default gateway using a VRRP election algorithm. This algorithm increases reliability and provides a fail-over mechanism and support for static routing. The VRRP assigns one of the routers as the master router, which manages the forwarding and routing of traffic toward all the virtual IPs associated with these routers. It also dynamically switches over to another router if the master is unavailable.

The VRRP does have its limitations. Its scope can extend only to a single subnet. The VRRP cannot affect the routing table in any way and it does not promote the IP routes either, Cisco has been trying to patent this particular protocol for some time now.

Quick Notes

Basic Config

  • #vrrp (vlan #) ip x.x.x.x
  • #vrrp (vlan #) priority 100 (default 100)

VRRP interface tracking

  • Create track object – #track (#) interface (interface number) line protocol
  • #vrrp (vlan #) track 1 decrement (default, blank is 10)
  • Not Cisco propriety, industry standard
  • States – Master and Backup
  • Highest priority becomes Master
  • Preemtion enabled by default

GATEWAY LOAD BALANCING PROTOCOL (GLBP): – HSRP and VRRP have some great features but load balancing with these protocols is more of a workaround than a native behaviour. The Gateway Load Balancing Protocol is a Cisco proprietary protocol designed to overcome the limitation of the existing redundant router protocols. GLGP uses the same concepts as with HSRP/VRRP, but the terminology is different and the behaviour is much more dynamic. Instead of having just one active router performing forwarding for the virtual router address, all routers in the group can participate and offer load balancing by forwarding a portion of the overall traffic. The advantage of that is, one of the clients has to be pointed toward a specific gateway address, and they can all have the same default set to the virtual IP address. The load balancing is provided completely through the use of virtual router MAC addresses in ARP replies returned to the client send an ARP reply with the virtual MAC address of a selected router in the group. The result is that all clients use the same gateway address but have different MAC addresses for it. 

Quick Notes

Basic Config

  • #int (interface number)
  • #glbp (#) ip x.x.x.x
  • #glbp (#) preempt
  • #glbp (#) priority 100
  • Cisco Propriety
  • Active Virtual Gateway and Active Virtual Forwarder
  • Each member of a GLBP group is an active forwarder
  • Timers hello 3 secs hold 10 secs-

In every host within the organization’s network, there should be a need for a router as the default gateway for every host to connect to the Internet. But what if the gateway router goes offline or the default gateway IP is changed during configuration?

Replacing the gateway router will cause a longer service interruption to the users within the organization, and that is not a reactive way to handle the issue. This is where FHRP will take place.

The below diagram is an example of a network topology without FHRP implementation:

What is the purpose of a first hop?

What is First Hop Redundancy Protocol (FHRP)?

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. The virtual IP address and virtual MAC address will be used on both the router. The virtual IP address will be the default gateway IP address for all the devices inside the organization’s network. One router will be used as an active router (gateway router), and the other router will be standby. If the active router goes offline, the standby router will take its place to be the gateway router for all the hosts.

The below diagram is an example of network topology with FHRP implemented:

What is the purpose of a first hop?

First Hop Redundancy Protocol (FHRP) Options

We have three ways to implement FHRP. These are by using the following First Hop Redundancy Protocols:

  1. Hot Standby Router Protocol (HSRP)

HSRP, or Hot Standby Router Protocol, is a Cisco-proprietary router redundancy protocol that enables a cluster of routers to cooperate, and all routers are willing to be a default router. All the routers within the cluster will have the same virtual IP address and virtual mac address.

The Two Hot Standby Router Protocol (HSRP) Router States:

  • Active Router– the router that actively sends and receives a packet to the host within the organization. It is the default gateway router. Only one active router will be selected among the cluster of routers.
  • Standby Router– the router/s that in case the incumbent active router will go offline, among the standby router will be chosen as the active router.

If the active router goes offline, router failover will occur. These changes will not affect the hosts. The host keeps the same IP address and MAC address setting. The default gateway IP address will be the same still on all hosts. There will be no changes on the host’s ARP table as the gateway router’s virtual MAC address will be the same. Changes in failover only happen on router and switch, and hosts are not affected.

NOTE
Preemption in HSRP is not enabled by default. Preemption must be configured manually on the router.

  1. Virtual Router Redundancy Protocol (VRRP)

VRRP, Virtual Router Redundancy Protocol, is a vendor-neutral redundancy protocol that groups a cluster of physical routers (two or more routers) to produce a new single virtual router. It enables redundancy by assigning the same virtual gateway IP address and MAC address on all physical routers within the VRRP group. Currently, VRRP is at version 2. It almost has the same concept as HSRP. The only difference is that preemption is enabled by default on VRRP, while on HSRP, it needs to be configured manually.

Two states of Virtual Router Redundancy Protocol (VRRP):

  • Master Router– It is the current default gateway of all the hosts within the organization. It is actively sending and receiving packets to the hosts.
  • Backup Router – The backup router will take the role of the master router during the failover or when the master router goes offline.

NOTE
VRRPv3 supports IPv6 and is more scalable than VRRPv2.

  1. Gateway Load Balancing Protocol (GLBP)

As compared to HSRP and VRRP, Gateway Load Balancing Protocol is a bit different. With GLBP, routers within the group are allowed to do load balancing. To put it simply, all the traffic that is transmitted to the default gateway IP address will be load-balanced one at a time or in a round-robin manner among the routers within the group. GLBP has the same state as HSRP, which is called active and standby. The mechanism of GLBP’s active and standby state is the same as HSRP’s active and standby state.

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training:

What is the purpose of a first hop?