Saturday, September 27, 2008

Gateway Load Balancing Protocol (GLBP)




GLBP or Gateway Load Balancing Protocol


A cisco proprietary protocol that is another default gateway router redundancy protocol that sits alongside HSRP and VRRP. With the later protocols one router is active within the group. This can reduce the upstream forwarding capabilities. GLBP removes this potential limitation by enabling more than 1 router to be active at the same time.

This extra forwarding capability is achieved by the GLBP protocol responding with multiple MAC addresses when it receives ARP requests. As such the algorithm used to load balance is NOT true ‘load balancing’ in the manner that this word is often used to describe. In reality it will distribute load based on the source of the traffic.

One router in the GLBP group is defined as the AVG (Active Virtual Gateway) and it farms out the virtual mac addresses. Other routers in the group act as AVF (Active Virtual Forwarders) and are each assigned their own vmac. N.B. The AVG is also defined as an AVF member of the group. If a router in the group fails the vmac assigned to the failed router is re-assigned to another member in the group to ensure default gateway availability is maintained. Within a GLBP group there are up to 4 vmacs shared among up to 1024 possible member routers.

Router 2
interface fasthernet 0/0
glbp 1 ip 10.0.0.254
Router 3
interface fasthernet 0/0
glbp 1 ip 10.0.0.254


From R1 and R7 in the example i ping the default gateway address of 10.0.0.254 and then examine the router arp tables:


Router_1#s arp inc 10.0.0.254
Internet 10.0.0.254 2 0007.b400.0101 ARPA FastEthernet0/0

Router_7#s arp inc 10.0.0.254
Internet 10.0.0.254 1 0007.b400.0102 ARPA FastEthernet0/0


As displayed they each have a different mac address for the default gateway. We can examine the GLBP status on router 2 and determine the vmac address of each router


Router_2#s glbp brief
Interface Grp Fwd Pri State Address Active router Standby route
Fa0/0 1 - 100 Active 10.0.0.254 local 10.0.0.3
Fa0/0 1 1 7 Active 0007.b400.0101 local -
Fa0/0 1 2 7 Listen 0007.b400.0102 10.0.0.3 -


It can be seen from the output that R2 owns 0007.b400.0101 and R3 owns 0007.b400.0102. GLBP is working!


GLBP can then be tweeked to optimise the load balancing capabilities. The commands glbp {group} load-balancing [host-dependent round-robin weighted ] can be used.

GLBP weighting can even be used to decide when a router can become eligible to become an AVF within a group.


Here i introduce glbp weighting to R3. With the applied config r3 will be an AVF as long as its weighting remains above the lower threshold of 96.


Router 3

track 10 interface fastehernet 1/0 ip routing
interface fasethernet 1/0
glbp 1 weighting 100 lower 96 upper 99
glbp 1 weighting track 10 decrement 50


When i applied the config upstream interface fa1/0 was fully operational. I then proceeded to take down the interface, and consequently the glbp weight was decremented by 50 and the router was no longer eligible to be an AVF.


This can be seen from the output of the show glbp command on R2:


Router_2#s glbp brief
Interface Grp Fwd Pri State Address Active router Standby route
Fa0/0 1 - 100 Active 10.0.0.254 local 10.0.0.3
Fa0/0 1 1 7 Active 0007.b400.0101 local -
Fa0/0 1 2 7 Active 0007.b400.0102 local -


The active virtual forwarder for both VMACS is now router 2 (10.0.0.2).

No comments: