Understanding GLBP: Gateway Load Balancing Protocol

Gateway Load Balancing Protocol (GLBP) is a Cisco proprietary solution for load balancing and redundancy in an IP network. Other known first-hop redundancy protocols (FHRPs) are Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP).

 

Gateway Load Balancing Protocol (GLBP) has two roles:

  1. Active Virtual Gateway (AVG) – One AVG per group, and it’s responsible for replying to initial ARP requests for the Virtual IP address (VIP).
  2. Active Virtual Forwarder (AVF) – AVG assigns different virtual MAC addresses to the Active Virtual Forwarders (AVFs). This is done when AVG replies to the initial ARP request from a host. ARP replies are unicast and are not heard by other hosts on the same broadcast segment. AVF is responsible for routing traffic received from assigned hosts. A host can use the same virtual MAC address of an AVF as long as it is reachable.

 

GLBP Configuration

For the GLBP configuration example, we will use the topology below.

GLBP

First, we need to define the instance ID and VIP.
AVG+AVF:

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int gi0/1
R1(config-if)#ip address 10.10.10.3 255.255.255.0
R1(config-if)#glbp 10 ip 10.10.10.1
R1(config-if)#
*Mar  7 16:46:31.376: %GLBP-6-STATECHANGE: GigabitEthernet0/1 Grp 10 state Speak -> Active
*Mar  7 16:46:42.603: %GLBP-6-FWDSTATECHANGE: GigabitEthernet0/1 Grp 10 Fwd 1 state Listen -> Active

 

AVF:

R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int gi0/0
R2(config-if)#ip address 10.10.10.2 255.255.255.0
R2(config-if)#glbp 10 ip 10.10.10.1
R2(config-if)#
*Mar  7 16:51:56.659: %GLBP-6-FWDSTATECHANGE: GigabitEthernet0/0 Grp 10 Fwd 2 state Listen -> Active

 

For our verification, let’s use the ‘show glbp brief’ command for the high-level status and the ‘show glbp’ for the detailed status.

R1#show glbp brief
Interface   Grp  Fwd Pri State    Address         Active router   Standby router
Gi0/1       10   -   100 Active   10.10.10.1      local           10.10.10.2
Gi0/1       10   1   -   Active   0007.b400.0a01  local           -
Gi0/1       10   2   -   Listen   0007.b400.0a02  10.10.10.2      -
R1#show glbp
GigabitEthernet0/1 - Group 10
  State is Active
    1 state change, last state change 00:09:47
  Virtual IP address is 10.10.10.1
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.272 secs
  Redirect time 600 sec, forwarder timeout 14400 sec
  Preemption disabled
  Active is local
  Standby is 10.10.10.2, priority 100 (expires in 9.440 sec)
  Priority 100 (default)
  Weighting 100 (default 100), thresholds: lower 1, upper 100
  Load balancing: round-robin
  Group members:
    5000.0008.0001 (10.10.10.3) local
    5000.0009.0000 (10.10.10.2)
  There are 2 forwarders (1 active)
  Forwarder 1
    State is Active
      1 state change, last state change 00:09:35
    MAC address is 0007.b400.0a01 (default)
    Owner ID is 5000.0008.0001
    Redirection enabled
    Preemption enabled, min delay 30 sec
    Active is local, weighting 100
  Forwarder 2
    State is Listen
    MAC address is 0007.b400.0a02 (learnt)
    Owner ID is 5000.0009.0000
    Redirection enabled, 599.456 sec remaining (maximum 600 sec)
    Time to live: 14399.456 sec (maximum 14400 sec)
    Preemption enabled, min delay 30 sec
    Active is 10.10.10.2 (primary), weighting 100 (expires in 10.624 sec)

 

For other optional configurations, we can use the commands below:

  • Preemption – Allow a more preferred router to take AVG status from another router.
glbp <instance-id> preempt

 

  • Priority – Default priority is 100. A higher priority number is preferred.
glbp <instance-id> priority <1-255>

 

  • Timers – The default hello timer is 3 seconds. The default hold timer is 10 seconds.
R1(config-if)#glbp 10 timers ?
<1-60> Hello interval in seconds
msec Specify hello interval in milliseconds
redirect Specify timeout values for failed forwarders

 

  • Authentication – A router will ignore incoming GLBP packets from routers that do not have the same authentication configuration for a GLBP group.
R1(config-if)#glbp 10 authentication ?
md5 MD5 authentication
text Plain text authentication

 

Gateway Load Balancing Protocol Load Balancing

By default, GLBP will load balance traffic using the round-robin method. But we can change it by using the following command:

R1(config-if)#glbp 10 load-balancing ?
  host-dependent  Load balance equally, source MAC determines forwarder choice
  round-robin     Load balance equally using each forwarder in turn
  weighted        Load balance in proportion to forwarder weighting

 

Let’s try changing it from round-robin to weighted.

R1(config-if)#glbp 10 load-balancing weighted 
R1(config-if)#glbp 10 weighting 50

 

For verification, let’s use the ‘show glbp’ command.

R1#sh glbp | inc weight
  Load balancing: weighted
    Active is local, weighting 150
    Active is 10.10.10.2 (primary), weighting 100 (expires in 11.424 sec)

 

Increasing the weight of newer and bigger routers allows them to take more traffic than older and smaller routers.


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: