分类: 系统运维
2013-05-28 13:18:13
INTRODUCTION
The purpose of this document is to discuss the options that Cisco Gateway Load Balancing Protocol (GLBP)-one of Cisco First Hop routing Protocols family-offers in regard to load balancing across multiple gateways. For those unfamiliar with GLBP an introductory paper can be found in the reference section of this document.GLBP differs from Cisco Hot Standby Redundancy Protocol (HSRP) and IETF RFC 3768 Virtual Router Redundancy Protocol (VRRP) in that it has the ability to load balance over multiple gateways. Like HSRP and VRRP an election occurs, but rather than a single active router winning the election GLBP elects an Active Virtual Gateway (AVG). The job of the AVG is to assign virtual MAC addresses to each of the other GLBP routers and to assign each network host to one of the GLBP routers.The routers that receive this MAC address assignment are known as Active Virtual Forwarders (AVF).
LOAD BALANCING OPTIONS
How network hosts are assigned to each GLBP router can be altered by using one of four load balancing options outlined below. Please note, these options are not able to be deployed concurrently. There is a negligible CPU difference in the operation of either of these options.1. None2. Weighted3. Host dependent4. Round robin
NONE
If no load-balance algorithm is specified then GLBP will operate in an identical fashion to HSRP, the AVG will only respond to Address Resolution Protocol (ARP) requests with its own Virtual Forwarder (VF) MAC address, and all traffic will be directed to the AVG with no occurrence of load balancing.
WEIGHTED
This is the ability GLBP 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.For example, if there are two routers in a group and router A has double the forwarding capacity of router B, the weighting value of router A should be configured to be double the amount of router B.Example of load balancing using weighted option: Router1#sh run int e0/0!interface Ethernet0/0 ip address 10.0.0.1 255.255.0.0 glbp 1 ip 10.0.0.10 glbp 1 weighting 160 glbp 1 load-balancing weightedendRouter1#Router2#sh run int e0/0!interface Ethernet0/0 ip address 10.0.0.2 255.255.255.0 glbp 1 ip glbp 1 weighting 80 glbp 1 load-balancing weightedendRouter1#sh glbpEthernet0/0 - Group 1 State is Standby 7 state changes, last state change 00:00:59 Virtual IP address is 10.0.0.10 Hello time 3 sec, hold time 10 sec Next hello sent in 0.528 secs Redirect time 600 sec, forwarder time-out 14400 sec Preemption disabled Active is 10.0.0.2, priority 100 (expires in 9.560 sec) Standby is local Priority 100 (default) Weighting 160 (configured 160), thresholds: lower 1, upper 160 Load balancing: weighted Group members: aabb.cc00.0100 (10.0.0.1) local aabb.cc00.0200 (10.0.0.2) There are 2 forwarders (1 active) Forwarder 1 State is Active 1 state change, last state change 00:59:30 MAC address is 0007.b400.0101 (default) Owner ID is aabb.cc00.0100 Preemption enabled, min delay 30 sec Active is local, weighting 160 Forwarder 2 State is Listen 4 state changes, last state change 00:01:09 MAC address is 0007.b400.0102 (learnt) Owner ID is aabb.cc00.0200 Time to live: 14399.532 sec (maximum 14400 sec) Preemption enabled, min delay 30 sec Active is 10.0.0.2 (primary), weighting 80 (expires in 9.532 sec)Router2#sh glbpEthernet0/0 - Group 1 State is Active 2 state changes, last state change 00:30:22 Virtual IP address is 10.0.0.10 (learnt) Hello time 3 sec, hold time 10 sec Next hello sent in 2.760 secs Redirect time 600 sec, forwarder time-out 14400 sec Preemption disabled Active is local Standby is 10.0.0.1, priority 100 (expires in 7.732 sec) Priority 100 (default) Weighting 80 (configured 80), thresholds: lower 1, upper 80 Load balancing: weighted Group members: aabb.cc00.0100 (10.0.0.1) aabb.cc00.0200 (10.0.0.2) local There are 2 forwarders (1 active) Forwarder 1 State is Listen 4 state changes, last state change 00:01:42 MAC address is 0007.b400.0101 (learnt) Owner ID is aabb.cc00.0100 Redirection enabled, 597.732 sec remaining (maximum 600 sec) Time to live: 14397.732 sec (maximum 14400 sec) Preemption enabled, min delay 30 sec Active is 10.0.0.1 (primary), weighting 160 (expires in 7.732 sec) Arp replies sent: 6 Forwarder 2 State is Active 1 state change, last state change 00:59:41 MAC address is 0007.b400.0102 (default) Owner ID is aabb.cc00.0200 Redirection enabled Preemption enabled, min delay 30 sec Active is local, weighting 80 Arp replies sent: 3
HOST DEPENDENT
The MAC address of a host is used to determine which VF MAC address the host is directed towards. This ensures that a host will be guaranteed to use the same virtual MAC address as long as the number of VFs in the GLBP group is constant.Host dependent load balancing will need to be used when using statefull Network Address Translation (NAT) because it requires each host to be returned the same virtual MAC address each time it sends an ARP request for the virtual IP address.Host dependent load balancing is not recommended for situations where there are a small number of end hosts, for example less than 20, unless there is also a requirement that individual hosts must always use the same forwarder. The larger the number of host, the less likely it is to have an imbalance in distribution across forwarders.This method uses an algorithm designed to equally distribute hosts among forwarders, this distribution changes only when the number for forwarders permanently changes.