Gateway Load-Balancing Protocol
Problem
You want to use a first hop redundancy protocol that automatically load-balances among the participating routers.
Solution
You configure GLBP on an interface using the glbp command:
Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#interfaceRouter1(config-if)#FastEthernet0/0ip addressRouter1(config-if)#172.22.1.3 255.255.255.0glbp1ipRouter1(config-if)#172.22.1.1exitRouter1(config)#endRouter1#
As with HSRP and VRRP, you must configure other members of the same GLBP group to use the same virtual IP address:
Router2#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router2(config)#interfaceRouter2(config-if)#FastEthernet0/0ip addressRouter2(config-if)#172.22.1.2 255.255.255.0glbp1ipRouter2(config-if)#172.22.1.1exitRouter2(config)#endRouter2#
Discussion
In Recipe 22.4, we showed a way of using HSRP to load-balance between two active redundant routers on a LAN segment. There are two reasons why this solution was somewhat less than ideal, though. First, it required configuring different default gateway addresses on half of the end devices on a LAN segment. And second, the load balancing must be done by hand and is completely static. GLBP provides a much more elegant solution to the same problem that doesn’t have these shortcomings.
In the examples, we have enabled GLBP with a single command, simply defining the group number and virtual IP address:
Router1(config-if)# ...