GLBP

GLBP

Description

The Gateway Load Balancing Protocol (GLBP) is a Cisco proprietary protocol designed to overcome the limitations of existing redundant router protocols.

To provide a virtual router, multiple switches (routers) are assigned to a common GLBP group. Instead of having just one active router performing forwarding for the virtual router address, all routers in the group can participate and offer load balancing by forwarding a portion of the overall traffic.

The advantage is that none of the clients has to be pointed toward a specific gateway address; they can all have the same default gateway set to the virtual router IP address. The load balancing is provided completely through the use of virtual router MAC addresses in ARP replies returned to the clients. As a client sends an ARP request looking for the virtual router address, GLBP sends back an ARP reply with the virtual MAC address of a selected router in the group. The result is that all clients use the same gateway address but have differing MAC addresses for it.

How it works

One router is elected the active virtual gateway (AVG). This router has the highest priority value, or the highest IP address in the group, if there is no highest priority. The AVG answers all ARP requests for the virtual router address. Which MAC address it returns depends on which load-balancing algorithm it is configured to use. In any event, the virtual MAC address supported by one of the routers in the group is returned.

Up to four virtual MAC addresses can be used in any group. Each of these routers is referred to as an active virtual forwarder (AVF).

Routers participating in GLBP must monitor each other’s presence so that another router can assume the role of a failed router. To do this, the AVG sends periodic hello messages to each of the other GLBP peers. In addition, it expects to receive hello messages from each of them.

If no hello messages are received from a member, the AVG will wait a period of time which is defined by redirect timer. After the timer expired, the AVG will no longer use the MAC address for that router but the router should continue forwarding the traffic if the client tries to use it.

However, it is not reasonable to keep this state long. Therefore, there is another timer, timeout, that defined how long should the router continues to accept the traffic for the old MAC address. After it expired, the router will not accept those traffic.

MAC Address

0007.b4xx.xxyy

The 16-bit value denoted by xx.xx represents six 0 bits followed by a 10-bit GLBP group number. The 8-bit yy value is the virtual forwarder number.

Enabling GLBP

Switch(config-if)# glbp group ip [ip-address [secondary]]

Group numbers range from 0 to 1023.

If the ip-address is not given in the command, it is learned from the active router in the group.

GLBP Load Balancing

You can use one of the following load-balancing methods in a GLBP group:

  • Round robin : Each new ARP request for the virtual router address receives the next available virtual MAC address in reply. Traffic load is distributed evenly across all routers participating as AVFs in the group, assuming that each of the clients sends and receives the same amount of traffic. This is the default method used by GLBP.
  • Weighted : The GLBP group interface’s weighting value determines the proportion of traffic that should be sent to that AVF. A higher weighting results in more frequent ARP replies containing the virtual MAC address of that router. If interface tracking is not configured, the maximum weighting value configured is used to set the relative proportions among AVFs. The weight can be set in each router using the following command:
    (config-if)# glbp group weighting [weight]
    
  • Host dependent : Each client that generates an ARP request for the virtual router address always receives the same virtual MAC address in reply. This method is used if the clients have a need for a consistent gateway MAC address. (Otherwise, a client could receive replies with different MAC addresses for the router over time, depending on the load-balancing method in use.)

On the AVG router (or its successors), use the following interface configuration command to define the method:

Switch(config-if)# glbp group load-balancing [ round-robin | weighted | host-dependent ]

Show Command

Switch# show glbp [ group ] [ brief ]

Switch-A# show glbp brief
Interface Grp Fwd Pri State Address Active router Standby router
Vl50 1 - 200 Active 192.168.1.1 local 192.168.1.11
Vl50 1 1 7 Active 0007.b400.0101 local -
Vl50 1 2 7 Listen 0007.b400.0102 192.168.1.11 -
Vl50 1 3 7 Listen 0007.b400.0103 192.168.1.12 -
Switch-A#
Switch-B# show glbp brief
Interface Grp Fwd Pri State Address Active router Standby router
Vl50 1 - 150 Standby 192.168.1.1 192.168.1.10 local
Vl50 1 1 7 Listen 0007.b400.0101 192.168.1.10 -
Vl50 1 2 7 Active 0007.b400.0102 local -
Vl50 1 3 7 Listen 0007.b400.0103 192.168.1.12 -
Switch-B#
Switch-C# show glbp brief
Interface Grp Fwd Pri State Address Active router Standby router
Vl50 1 - 100 Listen 192.168.1.1 192.168.1.10 192.168.1.11
Vl50 1 1 7 Listen 0007.b400.0101 192.168.1.10 -
Vl50 1 2 7 Listen 0007.b400.0102 192.168.1.11 -
Vl50 1 3 7 Active 0007.b400.0103 local -
Switch-C#
Switch-A# show glbp
Vlan50 - Group 1
State is Active
7 state changes, last state change 03:28:05
Virtual IP address is 192.168.1.1
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.672 secs
Redirect time 600 sec, forwarder time-out 14400 sec
Preemption enabled, min delay 0 sec
Active is local
Standby is 192.168.1.11 , priority 150 (expires in 9.632 sec)
Priority 200 (configured)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Load balancing: round-robin
There are 3 forwarders (1 active)
Forwarder 1
State is Active
3 state changes, last state change 03:27:37
MAC address is 0007.b400.0101 (default)
Owner ID is 00d0.0229.b80a
Redirection enabled
Preemption enabled, min delay 30 sec
Active is local, weighting 100
Forwarder 2
State is Listen
MAC address is 0007.b400.0102 (learnt)
Owner ID is 0007.b372.dc4a
Redirection enabled, 598.308 sec remaining (maximum 600 sec)
Time to live: 14398.308 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.1.11 (primary), weighting 100 (expires in 8.308 sec)
Forwarder 3
State is Listen
MAC address is 0007.b400.0103 (learnt)
Owner ID is 00d0.ff8a.2c0a
Redirection enabled, 599.892 sec remaining (maximum 600 sec)
Time to live: 14399.892 sec (maximum 14400 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.1.12 (primary), weighting 100 (expires in 9.892 sec)
Switch-A#

Properties

Per-interface Properties

priority

Description: Priority
Values: 1 to 255
Default: 100
Command:

Switch(config-if)# glbp group priority level

hello timer, hold timer

Description: Hellotime, holdtime Values: 1 to 60 seconds or 50 to 60000 milliseconds, up to 180 seconds or 180000 milliseconds
Default: 3 seconds, 10 seconds Command:

Switch(config-if)# glbp group timers [msec] hellotime [msec] holdtime

Timer values will be learned from the AVG if it is no configured manually.

holdtime should at least three times greater than the hellotime

redirect timer, timeout timer

Description: The period of time before the AVG stops to use the MAC address for a failed member. The period of time before the AVF stops to use the MAC address and the clients refresh their ARP entries.
Values: 0 to 3600 seconds, 700 to 64800 seconds
Default: 600 seconds, 14400 seconds
Command:

Switch(config-if)# glbp group timers redirect redirect timeout

preempting

Description: Preempting Values: [Enabled | Disabled]
Default: Enabled
Command:

Switch(config-if)# glbp group preempt [delay minimum seconds]

weight

Description: Used to determine when a router can and cannot be the AVF
Values: 1 to 254
Default: 100
Command:

Switch(config)# track object-number interface type member/module/number { line-protocol | ip routing }

The object-number is an arbitrary index (1 to 500). The condition that triggers an adjustment can be line-protocol (the interface line protocol is up) or ip routing . (IP routing is enabled, the interface has an IP address, and the interface is up.)

Next, you must define the weighting thresholds for the interface with the following interface configuration command:

Switch(config-if)# glbp group weighting maximum [ lower lower ] [ upper upper ]

The upper ( default maximum ) and lower (default 1) thresholds define when the router can and cannot be the AVF, respectively.

Switch(config-if)# glbp group weighting track object-number [ decrement value ]

When the tracked object fails, the weighting is decremented by value (1 to 254, default 10).

Example

Configuring GLBP Load Balancing
Switch-A(config)# interface vlan 50
Switch-A(config-if)# ip address 192.168.1.10 255.255.255.0
Switch-A(config-if)# glbp 1 priority 200
Switch-A(config-if)# glbp 1 preempt
Switch-A(config-if)# glbp 1 ip 192.168.1.1
Switch-B(config)# interface vlan 50
Switch-B(config-if)# ip address 192.168.1.11 255.255.255.0
Switch-B(config-if)# glbp 1 priority 150
Switch-B(config-if)# glbp 1 preempt
Switch-B(config-if)# glbp 1 ip 192.168.1.1
Switch-C(config)# interface vlan 50
Switch-C(config-if)# ip address 192.168.1.12 255.255.255.0
Switch-C(config-if)# glbp 1 priority 100
Switch-C(config-if)# glbp 1 ip 192.168.1.1

results matching ""

    No results matching ""