How to Configure the Gateway Load Balancing Protocol (GLBP)

Share This

Gateway Load Balancing Protocol (GLBP) is the Cisco-proprietary FHRP. It is also allowing load sharing between a group of redundant routers. Gateway Load Balancing Protocol is specially designed to overcome the limitations of HSRP and VRRP.

In HSRP and VRRP, only the active/master router can forward traffic while all the standby/backup routers are idle but Gateway Load Balancing Protocol overcome this problem, all routers in the GLBP group can be efficiently utilized and forward traffic, so in addition to redundancy we also get load balancing. We can configure GLBP in Cisco IOS router using three types of an algorithm: round-robinweighted, or host-dependent.

The routers participating in the Gateway Load Balancing Protocol group are called Active Virtual Forwarder (AVF). Like HSRP, there is still one router that must control the Gateway Load Balancing Protocol operation, and this router is called the Active Virtual Gateway (AVG). An Active Virtual Gateway (AVG) is elected when GLBP is activated on the network, and it has the task to decide the next AVF that will be used to forward the packet based on the selected algorithm. A router with AVG role by default also acts as AVF at the same time.

Gateway Load Balancing Protocol

The Gateway Load Balancing Protocol configuration on Cisco router is easy and mostly similar to the configuration of Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP). We will use the same topology for GLBP configuration that we have used for configuration of the HSRP.

Each gateway will be configuring in a GLBP group with the same group number, and at least one gateway in the GLBP group must be configured with the virtual IP address to be used by the group. We can use the “glbp group ip” command to enable GLBP from the global configuration mode. The configuration on both Router2 and Router3 is as under:

Router2:

  • Router2>enable
  • Router2#config terminal
  • Router2(config)# interface gigabitEthernet 0/1
  • Router2(config-if)#no shutdown
  • Router2(config-if)#ip address 192.168.10.2 255.255.255.0
  • Router2(config-if)#glbp 1 ip 192.168.10.1
  • Router2(config-if)glbp 1 priority 110
  • Router2(config-if)#glbp preempt
  • Router2(config-if)#glbp 1 load-balancing round-robin
  • Router2(config-if)#exit
  • Router2(config)#do wr

Router3:

  • Router3>enable
  • Router3#config terminal
  • Router3(config)# interface gigabitEthernet 0/1
  • Router3(config-if)#no shutdown
  • Router3(config-if)#ip address 192.168.10.3 255.255.255.0
  • Router3(config-if)#glbp 1 ip 192.168.10.1
  • Router3(config-if)glbp 1 priority 100
  • Router3(config-if)#glbp preempt
  • Router3(config-if)#glbp 1 load-balancing round-robin
  • Router3(config-if)#exit
  • Router3(config)#do wr

We are using GLBP group number 1 and virtual IP 192.168.10.1, and this virtual IP address should be configured on each router. We also configured the priority for both routers to elect as AVG, the priority of the Router2 is 110, and the priority of Router1 is 100. The default priority value of GLBP is 100. Router with the highest priority number will be elected as the AVG.

If failure happens on the AVG, the next router with the highest priority value will granted to the role of AVG. The preempt is enable on both router, this means that they can get back the AVG role from current AVG if they have higher priority.

We can verify GLBP configuration, using the command show glbp brief from any of the GLBP members. To verify GLBP configuration, we can simply issue command show glbp brief from any of the GLBP members:

GLBP Round-Robin Algorithm

Round-robin is the default load balancing algorithm with the Gateway Load Balancing Protocol configuration. With the round-robin algorithm, AVG will reply to each ARP request for the GLBP virtual IP with each AVF’s virtual MAC address in turns, so all AVFs will be used equally.

GLBP Weighted Algorithm

The weighted algorithm allocates traffic to each AVF based on the weight value assigned to them. An AVF with bigger weight value will get more traffic redirected to it. The range of the weighting is from 1 to 254 and the default weight value is 100. The router with higher weight value will be assigned more traffic to the router with less weight value. The configuration command for the above example scenario is as follows:

Router2:

  • Router2>enable
  • Router2#config terminal
  • Router2(config)# interface gigabitEthernet 0/1
  • Router2(config-if)#glbp 1 load-balancing weighted
  • Router2(config-if)#glbp 1 weight 150
  • Router2(config)#do wr

Router3:

  • Router3>enable
  • Router3#config terminal
  • Router3(config)# interface gigabitEthernet 0/1
  • Router3(config-if)#glbp 1 load-balancing weighted
  • Router3(config-if)#glbp 1 weight 200
  • Router3(config)#do wr

GLBP Host-Dependent

This algorithm uses the MAC address of the host to determine which virtual MAC address to direct the host to use. This algorithm usually guarantees the same virtual MAC address that is previously assigned if the number of active virtual forwarders (AVF) does not change. Under some situations, this comes up to the best option, for example in the case of stateful NAT. The configuration of the Gateway Load Balancing Protocol host-dependent for the above topology is as under:

Router2:

  • Router2>enable
  • Router2#config terminal
  • Router2(config)# interface gigabitEthernet 0/1
  • Router2(config-if)#glbp 1 load-balancing host-dependant
  • Router2(config)#do wr

Router3:

  • Router3>enable
  • Router3#config terminal
  • Router3(config)# interface gigabitEthernet 0/1
  • Router3(config-if)#glbp 1 load-balancing host-dependant
  • Router3(config)#do wr

Advantages of Gateway Load Balancing Protocol

GLBP allows automatic selection and simultaneous use of multiple available gateways in addition to automatic failover between those gateways. Various routers share the load of frames that, from a client viewpoint, are sent to a single default gateway address.

We can fully make use of network resources without the administrative burden of configuring multiple groups and managing multiple default gateway configurations. Gateway Load Balancing Protocol has the following characteristics:

  • GLBP allows full use of network resources on all devices without the administrative burden of creating multiple groups.
  • GLBP provides a single virtual IP address with several virtual MAC addresses.
  • GLBP routes traffic to a single gateway distributed across multiple routers.
  • In the event of failure and change provides automatic rerouting.
(Visited 53 times, 53 visits today)
Share This