Cisco Systems, Inc.(R)    Cisco | Profile | Contacts & Feedback | Help
Cisco SMB Support Assistant
Configure Gateway Load Balancing Protocol on Cisco Routers
Home > Work With My Routers > Cisco Routers > Configure Gateway Load Balancing Protocol on Cisco Routers  
 

Configure Gateway Load Balancing Protocol on Cisco Routers



     Introduction
     Components
     GLBP overview
     Configure GLBP
     Next Step
     Troubleshoot the Procedure
     Related Information



Introduction

This document explains how to configure Gateway Load Balancing Protocol (GLBP) on a Cisco router for redundancy and load balancing.


Back to Top



Components

To perform the steps described in this document, you need to have these items:


Back to Top



GLBP overview

Gateway Load Balancing Protocol (GLBP) is a Cisco proprietary protocol that attempts to overcome the limitations of existing redundant router protocols, like Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP), by adding basic load balancing functionality between a group of redundant routers. HSRP and VRRP protocols allow multiple routers to participate in a virtual router group configured with a virtual IP address. One member is elected to be the active router to forward packets sent to the virtual IP address for the group. The other routers in the group are redundant until the active router fails. These standby routers have unused bandwidth and it is not used by the protocol.

GLBP provides automatic router backup for IP hosts configured with a single default gateway on an IEEE 802.3 LAN. Multiple first hop routers on the LAN combine to offer a single virtual first hop IP router while sharing the IP packet forwarding load. Other routers on the LAN act as redundant GLBP routers that becomes active if any of the existing forwarding routers fail. This is achieved in GLBP using a single virtual IP address and multiple virtual MAC addresses. Hence, it is mandatory that the router supports multiple MAC addresses on the physical interfaces. Each host is configured with the same virtual IP address, and all routers in the virtual router group participate in forwarding packets. The ARP requests from the hosts in the network for the default gateway IP is answered with MAC addresses pointing to different routers in the group. Thus, load balancing is not based on traffic load, but rather on the number of hosts that uses each gateway router. 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 port 3222.

Members of a GLBP group elect one router to be the active virtual gateway (AVG) for that group. Other group members provide backup for the AVG in the event that the AVG becomes unavailable and also actively forward the network traffic and are known as active virtual forwarders (AVFs). The AVG assigns a virtual MAC address to each active member of the GLBP group. A GLBP group allows up to four virtual MAC addresses per group. GLBP supports up to 1024 virtual routers (GLBP groups) on each physical interface of a router, and up to 4 virtual forwarders per group. If there are more than four routers in a GLBP group these routers become secondary virtual forwarders and go into a listen state. They assume the role of AVF when a present AVF fails. Each router assumes responsibility for forwarding packets sent to the virtual MAC address assigned to it by the AVG.

GLBP uses a weighting scheme to determine the forwarding capacity of each router in the GLBP group. The weighting assigned to a router in the GLBP group determines whether it forwards packets and, if so, the proportion of hosts in the LAN for which it forwards packets. Another metric called GLBP gateway priority determines, the role that each GLBP gateway plays and what happens if the AVG fails. Priority also determines if a GLBP router functions as a backup virtual gateway and the order of ascendancy to become an AVG if the current AVG fails. By default, the GLBP gateway preemptive scheme is disabled. A backup virtual gateway can become the AVG only if the current AVG fails, regardless of the priorities assigned to the virtual gateways. Preemption allows a backup virtual gateway to become the AVG, if the backup virtual gateway is assigned a higher priority than the current AVG.

config_gateway_load_bal_protocol_01.gif

In this document two routers are connected to the inside network through interface fastEthernet0/0 via a switch. The fastEthernet0/0 interfaces of the routers are assigned IP addresses 192.168.10.2 and 192.168.10.3 respectively. The default gateway for the hosts in the inside network is the virtual IP address 192.168.10.1 provided by GLBP and not the assigned IP addresses of the fastEthernet0/0 interface. Router A is the AVG for the GLBP group, and is also an AVF with a virtual MAC address. Router B is a member of the same GLBP group and is designated as the AVF with a different MAC address. The default gateway for both of the hosts in the network is 192.168.10.1. However, they get different MAC address resolution via ARP and thus different routers act as their default gateway.


Back to Top



Configure GLBP

Although customizing GLBP is optional but, if you plan to customize GLBP it is a good idea to first customize GLBP before enabling it. This is because, as soon as you enable a GLBP group, that group starts to operate. It is possible that if you first enable a GLBP group before customizing GLBP, the router could take over the control of the group and become the AVG before you have finished customizing the feature.

Follow these steps to configure GLBP on a router:

  1. Connect to the console of the router, refer Create a HyperTerminal Connection.

  2. Get into the interface configuration mode.

    Router#configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)#interface fastEthernet0/0
    
  3. Customize GLBP parameters. This step is optional.

    1. Enter the command glbp group authentication text string if you need to configure open text authentication for the routers in the group. This must be configured in each router of the group as the same.

      Router(config-if)#glbp 1 authentication text cisco
      
    2. Enter the command glbp group forwarder preempt if you need the router to take over as AVF for a GLBP group if it has a higher priority than the current AVF.

      Router(config-if)#glbp 1 forwarder preempt
      
    3. Enter the command glbp group load-balancing to configure the load balancing method to be used by GLBP to allocate the hosts to a gateway router.

      Router(config-if)#glbp 1 load-balancing host-dependent
      
    4. Enter the command glbp group preempt to configure the router to take over as AVG for a GLBP group if, it has a higher priority than the current AVG.

      Router(config-if)#glbp 1 preempt
      
    5. Enter the command glbp group priority level to configure the priority level of the gateway within a GLBP group.

      Router(config-if)#glbp 1 priority 254
      
    6. Enter the command glbp group timers to configure the interval between successive hello packets sent by the AVG in a GLBP group.

      Router(config-if)#glbp 1 timers 5 18
      
  4. In the interface configuration mode enter the command glbp group ip followed by an IP address which is used by GLBP as virtual IP address. This command enables GLBP on the router’s interface. Exit configuration mode and save this configuration.

    Router(config-if)#glbp 1 ip 192.168.10.1
    Router(config-if)#end
    Router#copy running-config startup-config
    

Configure the other routers in the GLBP group with the same steps as of Configuring GLBP. However; change the priority of each router accordingly, if you need to customize these optional features.


Back to Top



Next Step

You have now configured GLBP on your router.

To make further changes to your router, refer to the Router Support Page.

To configure other devices in your network, refer to the Configuration Overview Page.


Back to Top



Troubleshoot the Procedure

This section provides information about common problems that you may encounter. If this information does not solve your problem, contact the SMB Technical Assistance Center (SMB TAC) for assistance.

Problem

Cause(s) and Suggested Solution(s)

Check if GLBP works properly.

Use the command show glbp and check the output, if the virtual IP address is in use and the state is shown as active.


Back to Top



Related Information

Service Requests

  Open a service request
  Update a service request

Feedback

Please rate this site:
++ + +/- - --

Suggestions for improvement:




If Cisco may contact you for more details
or for future feedback opportunities,
please enter your contact information:

Full Name:
Email:



© 1992-2006 Cisco Systems, Inc. All rights reserved. Terms and Conditions, Privacy Statement, Cookie Policy and Trademarks of Cisco Systems, Inc.