GLBP: GLBP is Gateway Load balancing Protocol which provide the first hop redundancy along with multiple load balancing method for IP packets. It allows a group of routers to share IP traffic load on default gateway on LAN.
GLBP performs a similar function to the Hot Standby Redundancy Protocol (HSRP) and the Virtual Router Redundancy Protocol (VRRP) but with little difference.
In GLBP, It involves the two or more group of routers to acts as default gateway, these group of router has same virtual gateway IP address.
GLBP also provides load balancing method by multiple routers (gateways) using a single virtual IP address and multiple virtual MAC addresses.
GLBP load balances the traffic among all routers who are in a group instead of allowing a single router to handle the whole load while the other routers remain idle. You should configure each host with the same virtual IP address, and all routers in the virtual group participate in forwarding packets. GLBP members communicate between each other using periodic hello messages.
In GLBP to provide first hop redundancy and Load balancing, it uses following components:
- AVG (Active Virtual Gateway)
- AFG (Active Forwarded Gateway)
Active Virtual Gateway: Active Virtual Gateway is elected which has highest priority and if the priority is same then highest real IP address becomes the AVG. Once AVG is active it assigns a virtual MAC address to each member of the GLBP group and each member is the active virtual forwarder (AVF) for its assigned virtual MAC address, forwarding packets sent to its assigned virtual MAC address.
A member in a group can be in the active, standby, or listen state. GLBP uses a priority algorithm to elect one gateway as the AVG and elect another gateway as the standby virtual gateway. The remaining gateways go into the listen state.
The AVG also answers Address Resolution Protocol (ARP) requests for the virtual IP address. Load sharing is achieved when the AVG replies to the ARP requests with different virtual MAC addresses.
As soon as GLBP group member discovers the AVG by hello message, they request for virtual MAC address for same IP address acting as Gateway.
The AVG assigns the next MAC address based on the load-balancing algorithm selected. A gateway that is assigned with a virtual MAC address by the AVG is the primary virtual forwarder. The other members of the GLBP group that learn the virtual MAC addresses from hello messages are secondary virtual forwarders.