Gateway Load Balancing Protocol

From Wikipedia, the free encyclopedia - View original article

 
Jump to: navigation, search

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 addresses 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 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.[1]

 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 <Gateway 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.1  glbp 2 ip <Gateway 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.1  no ip redirect                             ! Does not redirect traffic if the router has to Resend to sender.  speed 100  duplex full ! Router bgp <ASN>  Network <Gateway 1 IP> mask 255.255.255.0   ! Virtual Gateway 1 has to be in BGP.  Network <Gateway 2 IP> 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 <Gateway 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 <Gateway 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 <ASN>  Network <Gateway 1 IP> mask 255.255.255.0   ! Virtual Gateway 1 has to be in BGP.  Network <Gateway 2 IP> 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:

 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[edit]

External links[edit]

References[edit]

  1. ^ Cisco IOS Software Release 12.2(33)SXI, New Features and Hardware Support