In this post you’ll read some key points of GLBP and then I’ll invite you to test a sample implementation of GLBP.
GLBP means Gateway Load Balancing Protocol. What an easy definition 😀
It is a VGP (Virtual Gateway Protocol) / FHRP, similar to HSRP and VRRP. It’s one of the strongest kind of VGPs because it is capable of using multiple physical gateways at the same time.
This protocol attempts to overcome the limitations of existing redundant router protocols by adding basic load balancing functionality.
In addition to being able to set priorities on different gateway routers, GLBP allows a weighting parameter to be set. Based on this weighting (compared to others in the same virtual router group), ARP requests will be answered with MAC addresses pointing to different routers. Thus, load balancing is not based on traffic load, but rather on the number of hosts that will use each gateway router. By default GLBP load-balances in round-robin fashion.
GLBP elects one AVG (Active Virtual Gateway) for each group. Other group members act as backup in case of AVG failure. In case there are more than two members, the second best AVG is placed in the Standby state and all other members are placed in the Listening state. This is monitored using hello and holdtime timers, which are 3 and 10 seconds by default. The elected AVG then assigns a virtual MAC address for each member of the GLBP group, including itself, thus enabling AVFs (Active Virtual Forwarders). Each AVF assumes responsibility for forwarding packets sent to its virtual MAC address. There could be up to four active AVFs at the same time.
Here are the key points of GLBP in my point of view:
- Unequal Load Balancing is supported
- Single VIP on multiple VMACs
- GLBP supports IPv6.
- GLBP uses 220.127.116.11 multicast address to send hello packets to their peers every 3 seconds over UDP 3222.
- Hello: 3seconds, Hold: 10seconds
My topology is shown below:
The goal of this configuration is that if one of the links to the active of each GLBP group changed state to down, R1 & R4 continue to be reachable from each other.
Two GLBP groups should be configured, one for each side of the network. Also, we’ve to track both interfaces of GLBP routers to be informed of their link-state and be capable to change the active/standby routers.
Creating two tracking objects of both interfaces for use in GLBP-weighting for both routers:
R2#sr | s track track 1 interface FastEthernet0/0 line-protocol track 2 interface FastEthernet0/1 line-protocol
These commands should be applied to all GLBP interfaces in interface mode:
#Configuring the VIP (Virtual IP) for each GLBP group of both routers interfaces glbp x v.i.p.a #This means that the router with higher priority should be Active and the lower should be Standby. glbp x preempt #Speeding GLBP by lowering the hello and hold timers glbp x timers 1 4 #Enabling weighted Load-Balancing glbp x load-balancing weighted
These commands should be applied just to the interfaces which we want to be the AVG of each GLBP group# in interface mode:
#Prioritizing the router which we want to be AVG; the router with the highest priority will be the AVG. glbp x priority 110 #Applying both tracks to GLBP weighting glbp 1 weighting track 1 decrement 60 glbp 1 weighting track 2 decrement 60 #Configuring the weighting threshold; this command sets the default weight value, and if the value which is tracked by the weighting track be less than the lower-threshold, it will lose AVF state, and if it becomes more than the upper-threshold it will change to AVF state. This can be also configured on the interfaces which we want to act as an AVF, and not only for AVG. glbp x weighting 200 lower 150 upper 180
Useful EXEC Commands:
show glbp show glbp brief R2#show glbp brief Interface Grp Fwd Pri State Address Active router Standby router Fa0/0 1 - 110 Init 192.168.223.100 unknown unknown Fa0/0 1 1 - Init 0007.b400.0101 unknown - Fa0/0 1 2 - Init 0007.b400.0102 unknown - Fa0/1 2 - 110 Active 192.168.234.100 local 192.168.234.3 Fa0/1 2 1 - Listen 0007.b400.0201 192.168.234.3 - Fa0/1 2 2 - Listen 0007.b400.0202 192.168.234.3 -