The problem GLBP solves
With HSRP or VRRP, one router forwards and the other waits. The standby router and its uplink sit idle until a failure. You can share the load by running two groups with swapped priorities, but that means two gateway addresses, two DHCP pools and manual planning. GLBP puts the load balancing inside one group: one virtual IP, every router forwarding.
AVG and AVF: the two GLBP roles
- The AVG (Active Virtual Gateway) is elected in the group. It owns the virtual IP, answers ARP requests for it, and assigns a virtual MAC address to each forwarder.
- An AVF (Active Virtual Forwarder) is a router that forwards traffic sent to its virtual MAC. The AVG is also an AVF. A group has up to four active AVFs, numbered 1 to 4. Extra routers wait in the listen state.
- Forwarder virtual MACs are
0007.b400.XXYY: XX is the group number in hex (group 10 is0a) and YY is the forwarder number. Forwarder 2 of group 10 is0007.b400.0a02. - The AVG is elected like an HSRP active router: highest priority (default 100), then highest IP address. Preempt for the AVG is off by default.
- Hellos go to
224.0.0.102on UDP port 3222, every 3 seconds with a hold time of 10 seconds by default.
How a host ends up at a particular router
- Host 1 ARPs for the gateway 192.168.10.1. The AVG replies with forwarder 1's MAC,
0007.b400.0a01. - Host 2 ARPs for the same IP. The AVG replies with forwarder 2's MAC,
0007.b400.0a02. - Host 3 gets forwarder 3's MAC the same way.
- Each host sends its off-subnet frames to the MAC it was given, so each router carries a share. The hosts have no idea GLBP exists.
Only the choice of MAC in the ARP reply is balanced. A host keeps the MAC for as long as its ARP entry lives, so balancing is per host, not per flow or per packet.
Load-balancing methods
Round robin is the default and works for most LANs. Weighted uses each forwarder's weight (default 100), so a router with weight 200 gets twice as many hosts as one with 100. Host-dependent keeps one host on one forwarder, which suits designs where a stateful device such as a NAT router or firewall sits behind each gateway and must see both directions of a conversation.
What happens when a forwarder fails
The failure of a forwarder is handled in three steps. First, after the hold time, another router (a secondary forwarder in listen state) takes over the failed router's virtual MAC, so hosts that already cached it keep working. Second, after the redirect timer (10 minutes by default) the AVG stops answering ARP requests with the failed router's MAC. Third, after the timeout (4 hours) the AVG removes it from the group.
If the AVG fails, the standby AVG takes over the virtual IP and the AVG role. The forwarders keep forwarding throughout.
Weighting and tracking
An AVF has a weight (default 100). You can reduce it when an uplink fails. Two thresholds control what happens: if the weight falls below the lower threshold the router stops forwarding, and it resumes when the weight rises above the upper threshold. This is GLBP's version of HSRP tracking: it stops the router from keeping hosts that would be forwarded into a dead uplink.
How to configure GLBP on Cisco IOS
Commands are based on Cisco IOS / IOS XE documentation and haven't been run on a lab device here. GLBP is not available on every platform; check your hardware.
! R1: AVG
interface GigabitEthernet0/0
ip address 192.168.10.2 255.255.255.0
glbp 10 ip 192.168.10.1
glbp 10 priority 110
glbp 10 preempt
glbp 10 load-balancing round-robinGroup 10, virtual IP .1. R1's higher priority makes it the AVG, and preempt lets it take the role back. Round robin is the default; it is written out for clarity.
! R2 and R3 (use .3 and .4)
interface GigabitEthernet0/0
ip address 192.168.10.3 255.255.255.0
glbp 10 ip 192.168.10.1Same group and virtual IP. R2 and R3 learn the group from the AVG; they need no priority unless one should be the standby AVG.
track 1 interface GigabitEthernet0/1 line-protocol
interface GigabitEthernet0/0
glbp 10 weighting 100 lower 70 upper 90
glbp 10 weighting track 1 decrement 40If the uplink fails, the weight drops from 100 to 60. That is below the lower threshold of 70, so this router stops forwarding until the uplink returns and the weight climbs above 90.
Hosts must use the virtual IP, 192.168.10.1, as their default gateway, exactly as with the other FHRPs.
Reading show glbp brief
R1#show glbp brief Interface Grp Fwd Pri State Address Active router Standby router Gi0/0 10 - 110 Active 192.168.10.1 local 192.168.10.3 Gi0/0 10 1 - Active 0007.b400.0a01 local - Gi0/0 10 2 - Listen 0007.b400.0a02 192.168.10.3 - Gi0/0 10 3 - Listen 0007.b400.0a03 192.168.10.4 -
show glbp for the timers, load-balancing method and counts of hosts per forwarder.GLBP faults and what to check
On small screens, swipe sideways or focus the diagram and use the arrow keys.
When GLBP is the wrong choice
- Other vendors' routers must share the gateway: GLBP is Cisco only.
- The platform does not support it, which is the case on several Layer 3 switch families.
- Stateful devices behind the routers cannot cope with the same host's traffic arriving through different paths.
- The routers have different uplink capacities and nobody will maintain the weights.
Exam tip: GLBP is the one that load balances in a single group. Know AVG and AVF, up to four forwarders, the 0007.b400.XXYY virtual MAC, that the AVG answers ARP with different forwarder MACs, round robin as the default method, and that it is Cisco proprietary.
GLBP facts for the exam
- One virtual IP; the AVG answers ARP and assigns forwarder MACs.
- Up to four active AVFs per group; virtual MAC 0007.b400.XXYY.
- Hellos to 224.0.0.102, UDP 3222; hello 3 s, hold 10 s.
- Load balancing: round robin (default), weighted, host-dependent.
- Timers: redirect 10 minutes, timeout 4 hours.
- Verify with show glbp brief.
Test yourself on GLBP
How does GLBP make different hosts use different routers while they all have the same default gateway IP?
How many AVFs can be active in one GLBP group?
Which virtual MAC could belong to GLBP group 10, forwarder 2?
Which GLBP load-balancing method always gives the same host the same forwarder?
A GLBP forwarder fails. After which timer does the AVG stop giving out its MAC in ARP replies?