How to Configure GLBP in Cisco IOS Routers?

2023 SEASON SALE Networking and Security Showcase In-stock ICT products at exclusive discounts

Gateway Load Balancing Protocol (GLBP) as the name implies can be used to configure Gateway redundancy between a group of routers and at the same time load balance the traffic across all of them. GLBP is similar to the High availability protocols Hot Standby Redundancy Protocol (HSRP) & Virtual Router Redundancy Protocol (VRRP) except for the load balancing capabilities wherein HSRP and VRRP, the standby routers are configured for redundancy and act as standby only and become active only when the active router fails.

The advantage of GLBP is it provides load balancing over multiple routers (gateways) using a single virtual IP address and multiple virtual MAC addresses. The forwarding load is shared among all routers in a GLBP group rather than being handled by a single router while the other routers stand idle. Each host is configured with the same virtual IP address, and all routers in the virtual router group participate in forwarding packets. GLBP members communicate between each other through hello messages sent every 3 seconds to the multicast address 224.0.0.102, User Datagram Protocol (UDP) port 3222 (source and destination).

Here, I’m using two Cisco 2811 routers to configure GLBP on Fast Ethernet 0/0 interfaces and they track their gateway interfaces Serial 0/0/0 which affects the GLBP behavior

Enable Interface and assign IP Address

Router1# conf term

Router1(config)# int fa0/0

Router1(config-if)# no shut

Router1(config-if)# ip address 192.168.0.2 255.255.255.0

Enable GLBP & assign a GLBP group Virtual IP

Router1(config-if)# glbp 1 ip 192.168.0.1

This commands enables GLBP on the interface and assigns the Virtual IP Address 192.168.0.1 for the GLBP group 1. Each physical interface can take upto 1024 GLBP groups and 4 virtual MAC-Addresses for each group.

Set GLBP Redirect Timers

Router1(config-if)# glbp 1 timers redirect 5 3600

This command sets the time interval (5 seconds) between which the Active Virtual Gateway (AVG) redirects clients to an Active Virtual Forwarder (AVF) in the event of a failure and the time interval 3600 seconds to set the timeout period in seconds before a secondary virtual forwarder becomes invalid.

Enable Preempt

Router1(config-if)# glbp 1 preempt

This command configures the router to take over as Active Virtual Gateway (AVG) for a GLBP group if it has a higher priority than the current AVG. This is disabled by default. You can configure a minimum delay time in seconds before which the preemption takes place as below.

Router1(config-if)# glbp 1 preempt delay minimum 60

Track object for GLBP

Router1(config-if)# glbp 1 weighting track 1 100

Specifies an object (“1” here is basically a track definition we will do later on. This could be an Interface “line protocol” or “IP routing”) to be tracked that affects the weighting of a GLBP gateway. The value 100 specifies a reduction in the weighting of a GLBP gateway when a tracked object fails.

Set Tracked Object

From the Global Configuration mode, let us define the Tracked object (referred in the glbp weighting command).

Router1(config)# track 1 interface serial 0/0/0 line-protocol

or with ip routing

Router1(config)# track 1 interface serial 0/0/0 ip routing

With ideally same paramters except for the actual IP address of the GLBP interface, lets configure the Router 2

Router2# conf term

Router2(config)# int fa0/0

Router2(config-if)# no shut

Router2(config-if)# ip address 192.168.0.3 255.255.255.0

Router2(config-if)# glbp 1 ip 192.168.0.1

Router2(config-if)# glbp 1 timers redirect 5 3600

Router2(config-if)# glbp 1 preempt

or with delay time

Router2(config-if)# glbp 1 preempt delay minimum 60

Router2(config-if)# glbp 1 weighting track 1 100

Router2(config)# track 1 interface serial 0/0/0 line-protocol

or with ip routing

Router1(config)# track 1 interface serial 0/0/0 ip routing

Thats done. Now the 2 routers have their Fast Ethernet 0/0 interface in a GLBP group “1” tracking their individual gateway interfaces (serial0/0/0).

To show the GLBP status, use

Router1# sh glbp

FastEthernet0/0 – Group 1
State is Active
15 state changes, last state change 3w2d
Virtual IP address is 192.168.0.1
Hello time 3 sec, hold time 10 sec
Next hello sent in 0.964 secs
Redirect time 5 sec, forwarder time-out 3600 sec
Preemption enabled, min delay 0 sec
Active is local
Standby is 192.168.0.3, priority 100 (expires in 9.976 sec)
Priority 100 (default)
Weighting 100 (default 100), thresholds: lower 1, upper 100
Track object 1 state Up decrement 100
Load balancing: round-robin

Group members:
0000.1111.1111 (192.168.0.2) local
0000.2222.2222 (192.168.0.3)
There are 2 forwarders (1 active)
Forwarder 1
State is Active
3 state changes, last state change 3w2d
MAC address is 0000.1111.1111 (default)
Owner ID is 0011.1111.1111
Redirection enabled
Preemption enabled, min delay 30 sec
Active is local, weighting 100
Arp replies sent: 63569
Forwarder 2
State is Listen
6 state changes, last state change 3w1d
MAC address is 0000.2222.2222 (learnt)
Owner ID is 0022.2222.2222
Redirection enabled, 4.976 sec remaining (maximum 5 sec)
Time to live: 3599.976 sec (maximum 3600 sec)
Preemption enabled, min delay 30 sec
Active is 192.168.0.2 (primary), weighting 100 (expires in 9.976 sec)
Arp replies sent: 63546

To troubleshoot the following debug commands are useful.

debug condition glbp

debug glbp errors

debug glbp events

debug glbp packets

debug glbp terse

Reference from itsyourip.com

More CISCO and Network Tips:

Cisco First Hop Redundancy Protocols: HSRP, VRRP, GLBP

How to Configure GLBP?

GLBP Overview and Features

GLBP & GLBP Basic Configuration

Share This Post

Post Comment