GLBP allows automatic selection and simultaneous use of all
available gateways in the group. The members of a GLBP group elect one gateway
to be the Active Virtual Gateway (AVG) for that group. Other members of the
group provide backup for the AVG should it become unavailable. The AVG assigns
a virtual MAC address to each member of the GLBP group. All routers become
active virtual forwarder (AVF) for frames address to that virtual MAC address
. As clients send
ARP requests for the address of the default gateway, the AVF sends these
virtual MAC addresses in the ARP replies. A GLBP group can have up to four
group members.
GLBP supports these operational modes for load balancing
traffic across multiple default routers servicing the same default gateway IP
address:
-
Weighted load-balancing algorithm – The amount of load directed to a
router is dependent upon the weighting value advertised by that router.
-
Host-dependent load-balancing algorithm – A host is guaranteed to
use the same virtual MAC address as long as that virtual MAC address is
participating in the GLBP group.
-
Round-robin load-balancing algorithm – As clients send ARP requests
to resolve the MAC address of the default gateway, the reply to each client
contains the MAC address of the next possible router in round-robin fashion.
Each routers MAC address takes turns being included in address-resolution
replies for the default gateway IP address.
GLBP automatically manages the virtual MAC address assignment,
determines who handles the forwarding, and ensures that each station has a
forwarding path in the event of failures to gateways or tracked interfaces. If
failures occur, the load-balancing ratio is adjusted among the remaining active
virtual forwarders so that resources are used in the most efficient way.
As shown in Figures
and
, by default,
GLBP will attempt to balance traffic on a per-host basis using the round-robin
algorithm. When a client sends an ARP message for the gateway IP address, the
AVG will return the MAC address of one of the active virtual forwarders. When a
second device sends an ARP message, the AVG returns the next virtual MAC from
the list.
Having each resolved a different MAC address for the default
gateway, clients A and B will send their routed traffic to separate routers
although they both have the same default gateway address configured. Each GLBP
router is an active virtual forwarder for the virtual MAC address to which it
has been assigned.
Like HSRP, GLBP can be configured to track interfaces.
In Figure
–
, the WAN link
from router R1 is lost. GLBP detects the failure.
Because interface
tracking was configured on R1, the job of forwarding packets for virtual MAC
address 0000.0000.0001 will be taken over by the secondary virtual forwarder
for the MAC, router R2. Therefore the client sees no disruption of service nor
does it need to resolve a new MAC address for the default gateway.