We now come to the final part of the Cisco IOS FHRP series - GLBP (Gateway Load Balancing Protocol). Again, we will look at its features and then the configuration steps required to configure it on the Cisco IOS platform.
What is GLBP?
GLBP is a Cisco proprietary protocol, that unlike HSRP and VRRP allows traffic to be load balanced across multiple routers. With HSRP and VRRP load balancing traffic across both routers can only be performed manually i.e via setting a subset of your VLANs to use R1 as the active router, and the other half to use R2 as the active router.
GLBP is based on 2 key components. They are:
- AVG (Active Virtual Gateway) - Acts as the ARP responder for the GLBP group. These responses consist of the virtual MAC addresses to members of the GLBP group, which the AVG assigns.
- AVF (Active Virtual Forwarder) - A member of a GLBP group. It learns of the AVG based on Hello messages. From the AVG it discovers its virtual MAC address.
GLBP works like so: Each AVF holds a virtual MAC address which is learnt from the AVG. When the client sends an ARP for the VIP (gateway IP), the AVG answers and provides one of the AVF virtual MAC addresses. This, in turn, results in different clients sending their traffic to different routers, based upon the ARP response provided via the AVG.
There are 3 load-balancing options. They are:
- Round Robin - The AVG responds to ARP requests using each of the AVF, equally in a round robin manner. This is the default balancing method.
- Host-Dependent - Allows you to define which hosts will be sent to which AVF.
- Weighted - Allows weights to be assigned to the AVFs so that more traffic can be balanced to a given AVF/router. In addition, you can assign weights to tracked objects, therefore based on a given network condition, the weights can be updated for the AVF, and traffic is balanced accordingly.
GLBP has some similar attributes to that of HSRP.
- STP - if multiple layer switches are being used along with STP, it is recommended not to use GLBP. And instead, use either HSRP and VRRP.
- VIP - The VIP cannot be the IP address of the router's interface.
- Multicast Group - Messages are sent to the multicast group of 22.214.171.124.
- Timers - Uses the same timers as HSRP (Hello=3secs, Hold=10seconds).
- Security - Authentication is supported (MD5 and plaintext).
Within our configuration example, we will perform an initial GLBP setup and then assign weights to our routers. All of which will be based on Figure 1.
Figure 1 - Example topology.
R1(config)#int gi0/2 R1(config-if)# glbp 10 ip 10.0.128.10 R1(config-if)# glbp 10 priority 120 R1(config-if)# glbp 10 preempt
R2(config)#int gi0/2 R2(config-if)# glbp 10 ip 10.0.128.10 R2(config-if)# glbp 10 priority 110 R2(config-if)# glbp 10 preempt
R3(config)#int gi0/2 R3(config-if)# glbp 10 ip 10.0.128.10
To verify we can run the command
show glbp br. This shows us the router that is active for the AVG (first line), along with each of the AVFs.
R1(config-if)#do show glbp br Interface Grp Fwd Pri State Address Active router Standby router Gi0/2 10 - 120 Active 10.0.128.10 local 10.0.128.2 Gi0/2 10 1 - Active 0007.b400.0a01 local - Gi0/2 10 2 - Listen 0007.b400.0a02 10.0.128.2 - Gi0/2 10 3 - Listen 0007.b400.0a03 10.0.128.3 - R2(config-if)#do show glbp br Interface Grp Fwd Pri State Address Active router Standby router Gi0/2 10 - 110 Standby 10.0.128.10 10.0.128.1 local Gi0/2 10 1 - Listen 0007.b400.0a01 10.0.128.1 - Gi0/2 10 2 - Active 0007.b400.0a02 local - Gi0/2 10 3 - Listen 0007.b400.0a03 10.0.128.3 - R3(config-if)#do show glbp br Interface Grp Fwd Pri State Address Active router Standby router Gi0/2 10 - 100 Listen 10.0.128.10 10.0.128.1 10.0.128.2 Gi0/2 10 1 - Listen 0007.b400.0a01 10.0.128.1 - Gi0/2 10 2 - Listen 0007.b400.0a02 10.0.128.2 - Gi0/2 10 3 - Active 0007.b400.0a03 local -
Next, we will configure weights. Our weights will be R1=3, R2=2, R3=1. This means for every 6 ARP requests that come into the AVG, the AVG would answer 3 x ARP requests with R1, 2 x requests with R2 and 1 x ARP request with R3.
R1(config-if)# glbp 10 weighting 3
R2(config-if)# glbp 10 weighting 2
R3(config-if)# glbp 10 weighting 1
We then run a quite show command to validate the weights.
R1# show glbp | inc (Forwarder|weight) Forwarder 1 Active is local, weighting 3 Forwarder 2 Active is 10.0.128.2 (primary), weighting 2 (expires in 9.152 sec) Forwarder 3 Active is 10.0.128.3 (primary), weighting 1 (expires in 10.464 sec)
Note: When troubleshooting
show glbp is a key command, due to the verbose details it provides around the GLBP groups.