Gateway Load Balancing Protocol
Encyclopedia
Gateway Load Balancing Protocol (GLBP) is a Cisco
proprietary protocol
that attempts to overcome the limitations of existing redundant router protocols by adding basic load balancing
functionality.
In addition to being able to set priorities on different gateway routers, GLBP allows a weighting parameter to be set. Based on this weighting (compared to others in the same virtual router group), ARP
requests will be answered with MAC address
es pointing to different routers. Thus, load balancing is not based on traffic load, but rather on the number of hosts that will use each gateway router. By default GLBP load balances in round-robin fashion.
GLBP elects one AVG (Active Virtual Gateway) for each group. Other group members act as backup in case of AVG failure. In case there are more than two members, the second best AVG is placed in the Standby state and all other members are placed in the Listening state. This is monitored using hello and holdtime timers, which are 3 and 10 seconds by default. The elected AVG then assigns a virtual MAC address to each member of the GLBP group, including itself, thus enabling AVFs (Active Virtual Forwarders). Each AVF assumes responsibility for forwarding packets sent to its virtual MAC address. There could be up to four active AVFs at the same time.
By default, GLBP routers use the local multicast address 224.0.0.102 to send hello packets to their peers every 3 seconds over UDP 3222 (source and destination).
Cisco implemented IPv6
support for GLBP in IOS
release 12.2(33)SXI.
Router1#
track 1 interface Serial0/0/0.1 ip routing ! Track 1 is watching Serial0/0/0.1 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Gateway 1 IP.
ip address x.x.x.x 255.255.255.0 Secondary ! Make sure this IP is in the same network as your Gateway 2 IP.
glbp 1 ip ! Your Virtual Gateway IP for Group 1
glbp 1 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 1 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
glbp 2 ip ! Your Virtual Gateway IP for Group 2
glbp 2 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby.
glbp 2 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 2 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
!
Router bgp
Network mask 255.255.255.0 ! Virtual Gateway 1 has to be in BGP.
Network mask 255.255.255.0 ! Virtual Gateway 2 has to be in BGP.
Router2#
track 1 interface Serial0/0/0.1 ip routing ! Track 1 is watching Serial0/0/0.1 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Gateway 1 IP.
ip address x.x.x.x 255.255.255.0 Secondary ! Make sure this IP is in the same network as your Gateway 2 IP.
glbp 1 ip ! Your Virtual Gateway IP for Group 1
glbp 1 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be Standby
glbp 1 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
glbp 2 ip ! Your Virtual Gateway IP for Group 2
glbp 2 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 2 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 2 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
!
Router bgp
Network mask 255.255.255.0 ! Virtual Gateway 1 has to be in BGP.
Network mask 255.255.255.0 ! Virtual Gateway 2 has to be in BGP.
track 1 interface Serial0/0/0.1 ip routing ! Track 1 is watching Serial0/0/0.1 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Virtual Gateway IP.
glbp 1 ip x.x.x.x ! You Virtual Gateway
glbp 1 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 1 load-balancing weighted ! Will Load Balance according to weight.
glbp 1 weighting 160 ! Higher the weight the Higher Priority
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
track 1 interface Serial0/0.101 ip routing ! Track 1 is watching Serial0/0/0.101 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Virtual Gateway IP.
glbp 1 ip x.x.x.x ! You Virtual Gateway
glbp 1 weighting 100 lower 91 upper 99 ! Range of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 1 load-balancing weighted ! Will Load Balance according to weight.
glbp 1 weighting 80 ! Weight is lower on this router, traffic will be directed through the other router
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
Show GLBP
To display Gateway Load Balancing Protocol (GLBP) information, use the show glbp command in privileged EXEC mode.
show glbp [interface-type interface-number] [group-number] [state] [brief]
The following is sample output from the show glbp command:
The following is sample output from the show glbp command with the brief keyword specified:
The following is sample output from the show glbp command that displays GLBP group 10:
The following output shows that the redundancy name has been assigned to the "glbp1" group:
The following output shows GLBP support for SSO mode on an active RP:
The following output shows GLBP support for SSO mode on a standby RP:
Cisco Systems
Cisco Systems, Inc. is an American multinational corporation headquartered in San Jose, California, United States, that designs and sells consumer electronics, networking, voice, and communications technology and services. Cisco has more than 70,000 employees and annual revenue of US$...
proprietary protocol
Proprietary protocol
In telecommunications, a proprietary protocol is a communications protocol owned by a single organization or individual.-Enforcement:Proprietors may enforce restrictions through patents and by keeping the protocol specification a trade secret...
that attempts to overcome the limitations of existing redundant router protocols by adding basic load balancing
Load balancing (computing)
Load balancing is a computer networking methodology to distribute workload across multiple computers or a computer cluster, network links, central processing units, disk drives, or other resources, to achieve optimal resource utilization, maximize throughput, minimize response time, and avoid...
functionality.
In addition to being able to set priorities on different gateway routers, GLBP allows a weighting parameter to be set. Based on this weighting (compared to others in the same virtual router group), ARP
Address Resolution Protocol
Address Resolution Protocol is a telecommunications protocol used for resolution of network layer addresses into link layer addresses, a critical function in multiple-access networks. ARP was defined by RFC 826 in 1982. It is Internet Standard STD 37...
requests will be answered with MAC address
MAC address
A Media Access Control address is a unique identifier assigned to network interfaces for communications on the physical network segment. MAC addresses are used for numerous network technologies and most IEEE 802 network technologies, including Ethernet...
es pointing to different routers. Thus, load balancing is not based on traffic load, but rather on the number of hosts that will use each gateway router. By default GLBP load balances in round-robin fashion.
GLBP elects one AVG (Active Virtual Gateway) for each group. Other group members act as backup in case of AVG failure. In case there are more than two members, the second best AVG is placed in the Standby state and all other members are placed in the Listening state. This is monitored using hello and holdtime timers, which are 3 and 10 seconds by default. The elected AVG then assigns a virtual MAC address to each member of the GLBP group, including itself, thus enabling AVFs (Active Virtual Forwarders). Each AVF assumes responsibility for forwarding packets sent to its virtual MAC address. There could be up to four active AVFs at the same time.
By default, GLBP routers use the local multicast address 224.0.0.102 to send hello packets to their peers every 3 seconds over UDP 3222 (source and destination).
Cisco implemented IPv6
IPv6
Internet Protocol version 6 is a version of the Internet Protocol . It is designed to succeed the Internet Protocol version 4...
support for GLBP in IOS
Cisco IOS
Cisco IOS is the software used on the vast majority of Cisco Systems routers and current Cisco network switches...
release 12.2(33)SXI.
- (Example)Load Balancing
Router1#
track 1 interface Serial0/0/0.1 ip routing ! Track 1 is watching Serial0/0/0.1 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Gateway 1 IP.
ip address x.x.x.x 255.255.255.0 Secondary ! Make sure this IP is in the same network as your Gateway 2 IP.
glbp 1 ip
glbp 1 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 1 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
glbp 2 ip
glbp 2 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby.
glbp 2 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 2 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
!
Router bgp
Network
Network
Router2#
track 1 interface Serial0/0/0.1 ip routing ! Track 1 is watching Serial0/0/0.1 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Gateway 1 IP.
ip address x.x.x.x 255.255.255.0 Secondary ! Make sure this IP is in the same network as your Gateway 2 IP.
glbp 1 ip
glbp 1 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be Standby
glbp 1 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
glbp 2 ip
glbp 2 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 2 load-balancing round-robin ! Distributes Traffic as round-robin, Makes it True Load-balancing.
glbp 2 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
!
Router bgp
Network
Network
- (Example)Load Sharing
- GLBP weighting has the ability to place a weight on each device when calculating the amount of load sharing that will occur through MAC assignment. Each GLBP router in the group will advertise its weighting and assignment. The AVG will act based on that value.
- The only reason you would use this is if you have a larger circuit on the primary router than on the backup router. So the higher weight of 160 will take twice as much traffic as the lower weight of 80. If the weights are 120 and 80 respectively, the primary router will take a quarter more traffic than the backup.
track 1 interface Serial0/0/0.1 ip routing ! Track 1 is watching Serial0/0/0.1 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Virtual Gateway IP.
glbp 1 ip x.x.x.x ! You Virtual Gateway
glbp 1 weighting 100 lower 91 upper 99 ! Threshold of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 1 load-balancing weighted ! Will Load Balance according to weight.
glbp 1 weighting 160 ! Higher the weight the Higher Priority
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
track 1 interface Serial0/0.101 ip routing ! Track 1 is watching Serial0/0/0.101 So it can be weighted.
!
interface GigabitEthernet0/0
ip address x.x.x.x 255.255.255.0 ! Make sure this IP is in the same network as your Virtual Gateway IP.
glbp 1 ip x.x.x.x ! You Virtual Gateway
glbp 1 weighting 100 lower 91 upper 99 ! Range of 91-99 If it fails the weight will drop below 91 and state will be standby
glbp 1 load-balancing weighted ! Will Load Balance according to weight.
glbp 1 weighting 80 ! Weight is lower on this router, traffic will be directed through the other router
glbp 1 weighting track 1 ! The weight is based on the Track 1 interface watching Serial 0/0/0.101
no ip redirect ! Does not redirect traffic if the router has to Resend to sender.
speed 100
duplex full
Show GLBP
To display Gateway Load Balancing Protocol (GLBP) information, use the show glbp command in privileged EXEC mode.
show glbp [interface-type interface-number] [group-number] [state] [brief]
The following is sample output from the show glbp command:
Router# show glbp
FastEthernet0/0 - Group 10
State is Active
2 state changes, last state change 23:50:33
Virtual IP address is 10.21.8.10
Hello time 5 sec, hold time 18 sec
Next hello sent in 4.300 secs
Redirect time 600 sec, forwarder time-out 7200 sec
Authentication MD5, key-string
Preemption enabled, min delay 60 sec
Active is local
Standby is unknown
Priority 254 (configured)
Weighting 105 (configured 110), thresholds: lower 95, upper 105
Track object 2 state Down decrement 5
Load balancing: host-dependent
There is 1 forwarder (1 active)
Forwarder 1
State is Active
1 state change, last state change 23:50:15
MAC address is 0007.b400.0101 (default)
Owner ID is 0005.0050.6c08
Redirection enabled
Preemption enabled, min delay 60 sec
Active is local, weighting 105
The following is sample output from the show glbp command with the brief keyword specified:
Router# show glbp brief
Interface Grp Fwd Pri State Address Active router Standby router
Fa0/0 10 - 254 Active 10.21.8.10 local unknown
Fa0/0 10 1 7 Active 0007.b400.0101 local -
The following is sample output from the show glbp command that displays GLBP group 10:
Router# show glbp 10
FastEthernet0/0 - Group 10
State is Active
2 state changes, last state change 23:50:33
Virtual IP address is 10.21.8.10
Hello time 5 sec, hold time 18 sec
Next hello sent in 4.300 secs
Redirect time 600 sec, forwarder time-out 7200 sec
Authentication MD5, key-string
Preemption enabled, min delay 60 sec
Active is local
Standby is unknown
Priority 254 (configured)
Weighting 105 (configured 110), thresholds: lower 95, upper 105
Track object 2 state Down decrement 5
Load balancing: host-dependent
There is 1 forwarder (1 active)
Forwarder 1
State is Active
1 state change, last state change 23:50:15
MAC address is 0007.b400.0101 (default)
Owner ID is 0005.0050.6c08
Redirection enabled
Preemption enabled, min delay 60 sec
Active is local, weighting 105
The following output shows that the redundancy name has been assigned to the "glbp1" group:
Router# show glbp ethernet0/1 1
Ethernet0/1 - Group 1
State is Listen
64 state changes, last state change 00:00:54
Virtual IP address is 10.1.0.7
Hello time 50 msec, hold time 200 msec
Next hello sent in 0.030 secs
Redirect time 600 sec, forwarder time-out 14400 sec
Authentication text, string "authword"
Preemption enabled, min delay 0 sec
Active is 10.1.0.2, priority 105 (expires in 0.184 sec)
Standby is 10.1.0.3, priority 100 (expires in 0.176 sec)
Priority 96 (configured)
Weighting 100 (configured 100), thresholds: lower 95, upper 100
Track object 1 state Up decrement 10
Load balancing: round-robin
IP redundancy name is "glbp1"
Group members:
0004.4d83.4801 (10.0.0.0)
0010.7b5a.fa41 (10.0.0.1)
00d0.bbd3.bc21 (10.0.0.2) local
The following output shows GLBP support for SSO mode on an active RP:
Router# show glbp
Ethernet0/0 - Group 1
State is Standby
1 state change, last state change 00:00:20
Virtual IP address is 172.24.1.254
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.232 secs
Redirect time 600 sec, forwarder time-out 14400 sec
Preemption disabled
Active is 172.24.1.2, priority 100 (expires in 7.472 sec)
Standby is local
Priority 100 (default)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Load balancing: round-robin
Group members:
aabb.cc00.0100 (172.24.1.1) local
aabb.cc00.0200 (172.24.1.2)
There are 2 forwarders (1 active)
Forwarder 1
State is Listen
MAC address is 0007.b400.0101 (learnt)
Owner ID is aabb.cc00.0200
Time to live: 14397.472 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 172.24.1.2 (primary), weighting 100 (expires in 9.540 sec)
Forwarder 2
State is Active
1 state change, last state change 00:00:28
MAC address is 0007.b400.0102 (default)
Owner ID is aabb.cc00.0100
Preemption enabled, min delay 30 sec
Active is local, weighting 100
The following output shows GLBP support for SSO mode on a standby RP:
RouterRP-standby# show glbp
Ethernet0/0 - Group 1
State is Init (standby RP, peer state is Standby)
Virtual IP address is 172.24.1.254
Hello time 3 sec, hold time 10 sec
Redirect time 600 sec, forwarder time-out 14400 sec
Preemption disabled
Active is unknown
Standby is unknown
Priority 100 (default)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Load balancing: round-robin
Group members:
aabb.cc00.0100 (172.24.1.1) local
aabb.cc00.0200 (172.24.1.2)
There are 2 forwarders (0 active)
Forwarder 1
State is Init (standby RP, peer state is Listen)
MAC address is 0007.b400.0101 (learnt)
Owner ID is aabb.cc00.0200
Preemption enabled, min delay 30 sec
Active is unknown
Forwarder 2
State is Init (standby RP, peer state is Active)
MAC address is 0007.b400.0102 (default)
Owner ID is aabb.cc00.0100
Preemption enabled, min delay 30 sec
Active is unknown
See also
- VRRP Virtual router Redundancy Protocol
- HSRP Cisco-proprietary Hot Standby Router protocol
- Common Address Redundancy ProtocolCommon Address Redundancy ProtocolThe Common Address Redundancy Protocol or CARP is a protocol which allows multiple hosts on the same local network to share a set of IP addresses. Its primary purpose is to provide failover redundancy, especially when used with firewalls and routers. In some configurations CARP can also provide...
- First Hop Redundancy ProtocolsFirst Hop Redundancy ProtocolsA First Hop Redundancy Protocol is a computer networking protocol which is designed to protect the default gateway used on a subnetwork by allowing two or more routers to provide backup for that address; in the event of failure of the/an active router, the backup router will take over the address,...
- Lists of default gateway redundancy protocols