05-03-2012 11:21 AM - edited 03-07-2019 06:29 AM
All,
I've been in another discussion about glbp and now I have a question. I can't find anything on Cisco's site about how the algorithm is figured, so here's my question. According to a site that I found, it stated that a weight of 150 on 1 router and a weight on 100 on router 2 would result in 3 packets to 150 for every 2 packets on router 2. How do you figure out how many packets one router would receive over another?
Thanks!
John
05-03-2012 11:46 AM
GLBP's weighted load balancing obviously is not per-packet. GLBP LB works in a source-MAC-based fashion. AVG knows about MAC addresses of routers in it's GLBP group and when it see ARP request it replies with some MAC. It uses different router's MACs answering to different hosts in a proportional schema. Weights for the proportion are assigned in a configuration.
05-03-2012 11:49 AM
Yes, but how is it that they get a 3:2 ratio? I've seen this in more than one place and I've also seen it based on percentages of how much traffic will be sent to AVF 2 vs. AVF 3.
05-03-2012 11:56 AM
Hello John,
GLBP load balancing is performed based on ARP activity on a population of hosts in the common subnet.
As a result of this:
if only one client exists no load balancing occurs and only one AVF serves this unique host for all the time the ARP entry is valid in host's ARP cache.
If many client hosts exist AVG answers to ARP requests for default gateway in such a way to build a load distribution over active AVFs. This can use one of few load balancing algorithms (round-robin, host-dependent, weighted)
glbp group load-balancing [host-dependent | round-robin | weighted]
The weighting can allow to select active forwarders because it is influenced by tracking of other interfaces.
if weighting of a node is over the configured threshold the node is an active AVF.
For these reasons talking of per packet load balancing in GLBP is not correct: it is flow based depending on the ARP reply received by each client host.
Also I suppose that the comparison of weighting of the different AVFs is performed only when the load balancing algorithm configured is weighted. In all other cases the weighting is only compared locally to the threshold to decide if the node can be an active AVF or not.
see
www.cisco.com/en/US/docs/ios-xml/ios/ipapp_fhrp/configuration/12-4t/fhp-glbp.html#GUID-1A23B304-3BDF-45C4-AFFD-99B2AF5A858E
Edit:
if there is a 3:2 ratio in weighting values on two AVFs and algorithm is weighted of N hosts in subnet 3/5 N hosts will be served by node1 and 2/5 N by node2 but this does not ensure a 3:2 ratio in traffic volumes outbond (exiting the common subnet) just in the flows sourced by those N client hosts.
it is just the way AVG answers to ARP requests that takes care of the weighting values ratios in weighted mode.
Hope to help
Giuseppe
.
05-03-2012 12:10 PM
Giuseppe,
Thanks for the response. If I have 3 routers and I want to send 25% of my traffic to RouterA and 75% of my traffic to RouterB what should my weights be changed to and how do you figure that?
Thanks,
John
05-03-2012 12:21 PM
Hello John,
my poor understanding is that you cannot achieve 25% / 75% on traffic volumes you can just approximate this in terms of how a population of 100 client hosts ( just for doing an example) is served by active AVFs.
So in your case you can get 75 hosts served by AVF1 and 25 hosts served by AVF2 but if in those 25 hosts there is a SQL DB that executes a DB replication of 100GB to another server in another IP subnet, traffic volumes ratios can even be reverted.
(you need weighted and weighting 30 10 respectively)
Once the client host has built its own ARP entry for default gateway it will use it until next ARP request. Traffic in the other direction (from outside world to common subnet, return path) is not controlled at all.
Statistically you get also traffic volume distribution over the two AVFs but with no guarantees.
Hope to help
Giuseppe
05-03-2012 12:21 PM
I found it
If you have 3 routers: A, B, and C with weights of 50, 100, 125, the calculation is like:
A=50 / (50 + 100 + 125) = 18%
B = 100 / (50 + 100 + 125) = 36%
C = 125 / (50 + 100 + 125) = 45%
Total = 99% (I rounded in areas above)
05-03-2012 12:24 PM
Hello John,
now I see what you were looking for.
I agree it should be this way
Best Regards
Giuseppe
05-03-2012 12:30 PM
Thanks for the rating
01-13-2017 06:03 AM
Thank you all for the info on GLBP. It was exactly what I was looking for. I did have a follow up question. were did you get the (50+100+125) numbers from? Are those all the weights added up? If I wanted a different percentage I would add up the different weights? I am assuming that is the case but just wanted to follow up.
Also, lets say I have RT1- 50%, RT2- 25%, RT3 25%. If R3 goes down how does that 25% get dived up? Does RT1 and R2 split that percentage or does R1 get 50% of what R3 had and R2 gets 25% of it?
Thanks for all the help,
Brian
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide