Hello, You will not be able to get an exact match on 1/3 - 2/3 traffic sharing since 3 is not a power of two. If you want to get something closer, you may try to increase the values to get a better approximation.
For instance, 43 and 85 have a sum of 128 with 43/128 = 0.3359375, which is close to the 0.33333 you are looking for. - Pierre Le 10 janv. 2018 à 07:36, 薛欣颖 <[email protected]<mailto:[email protected]>> a écrit : Hi Neale, I know what you mean. What should I do to match exactly I configured? And ignore constraints 'a load-balance is always a power of 2'. Thanks, Xyxue From: Neale Ranns (nranns)<mailto:[email protected]> Date: 2018-01-09 20:58 To: 薛欣颖<mailto:[email protected]>; vpp-dev<mailto:[email protected]> Subject: Re: [vpp-dev] question about load balance Hi Xyxue, It does match your configuration. You requested a 2:1 ratio un-equal cost load balancing, you got a 5:3, which VPP considers to be close enough. It’s not exact because the number of buckets in a load-balance is always a power of 2. /neale From: <[email protected]<mailto:[email protected]>> on behalf of 薛欣颖 <[email protected]<mailto:[email protected]>> Date: Tuesday, 9 January 2018 at 12:26 To: vpp-dev <[email protected]<mailto:[email protected]>> Subject: [vpp-dev] question about load balance Hi guys, I'm testing routing load balance. There is a question : When I configured 1:2 , the actual effect 3:5. My configuration and more info is shown below: configuration: ip route add 4.1.1.1/24 via ip4-address 1.1.1.2 interface host-eth0 weight 1 ip route add 4.1.1.1/24 via ip4-address 2.1.1.2 interface host-eth4 weight 2 The actual effect: 4.1.1.0/24 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:22 buckets:8 uRPF:29 to:[0:0]] [0] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800 [1] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800 [2] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800 [3] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800 [4] [@5]: ipv4 via 2.1.1.2 host-eth4: 000c296db08c2c534a0393540800 [5] [@5]: ipv4 via 1.1.1.2 host-eth0: 000c296db078fc4dd4dad8af0800 [6] [@5]: ipv4 via 1.1.1.2 host-eth0: 000c296db078fc4dd4dad8af0800 [7] [@5]: ipv4 via 1.1.1.2 host-eth0: 000c296db078fc4dd4dad8af0800 How can I make the actual effect the same as my configuration? Thanks, Xyxue ________________________________ _______________________________________________ vpp-dev mailing list [email protected]<mailto:[email protected]> https://lists.fd.io/mailman/listinfo/vpp-dev
_______________________________________________ vpp-dev mailing list [email protected] https://lists.fd.io/mailman/listinfo/vpp-dev
