Skip to Content
Cisco IOS Cookbook, 2nd Edition
book

Cisco IOS Cookbook, 2nd Edition

by Kevin Dooley, Ian Brown
December 2006
Intermediate to advanced
1188 pages
72h 8m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS Cookbook, 2nd Edition

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 terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ip address 172.22.1.3 255.255.255.0
Router1(config-if)#glbp 1 ip 172.22.1.1
Router1(config-if)#exit
Router1(config)#end
Router1#

As with HSRP and VRRP, you must configure other members of the same GLBP group to use the same virtual IP address:

Router2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router2(config)#interface FastEthernet0/0
Router2(config-if)#ip address 172.22.1.2 255.255.255.0
Router2(config-if)#glbp 1 ip 172.22.1.1
Router2(config-if)#exit
Router2(config)#end
Router2#

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)# ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

Brad Edgeworth, Aaron Foss, Ramiro Garza Rios
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596527225Supplemental ContentErrata Page