I have created an channel group with LACP, I know that single TCP session will be sent over a single line. My hashing algorithm is set to source mac address. So how can I be sure that the bandwidths of member links are summed.

UPD: Our friend suggests to say, that tweaking hashing algorithm on a live production is not a good idea, you can break something.

  • If the hashing algorithm uses the source MAC address, everything from that MAC address will use the same member link. – Ron Maupin Jun 15 '16 at 14:01
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 10 '17 at 4:17

The easiest way would be to set up a VM and then run iperf on your PC as well as the VM. Doing this ensures you have two hosts with different MAC addresses.

  • That may not help. – Edik Mkoyan Jun 15 '16 at 14:43
  • Can you please explain why you think that? If the hashing algorithm is based on source MAC address, using devices with different MAC addresses is the ONLY way it will work. If it doesn't work initially, the OP can keep changing the VM's MAC address until it does work. – OzNetNerd Jun 15 '16 at 20:20
  • Actually you fixed yourself, they might need to change mac addresses until it will work, but for a novice that has no enough lack to get the lucky mac address that may be a reason for making a wrong decision. Actually my D-Link 3627 supports also source IP and destination IP hashing, and I do not see why mac address is the only way to do that, why can't IPs be changed for example? – Edik Mkoyan Jun 16 '16 at 7:56
  • Adn one more thing, you hardly can find a device that supports hashing based only on mac addresses. – Edik Mkoyan Jun 16 '16 at 7:57

Another option is to use two TCP streams and run two iperf clients, each on the same subnet, and one iperf server. The server should provide the SUM information. Use -B on the client to select a bind IP address which will select the source interface for each stream. The bind() will in turn look up the source IP (and hence source mac address) though you'll probably want a policy route for this.


Well first of all, if your switch does not support L4 parameters in hashing algorithm, then two hosts will exchange data using the same link. If you are using two pairs of hosts to check if the link's bandwidth is doubled then 0.5 probability that each pair will use a separate physical link. Simply change the hashing algorithm parameter on your switch or, add some more host pairs to increase the probability of using separate links.

On the other hand, u can use -u flag to send out udp segments, but make sure that your clients can reach your servers, even if your server is down, the client will show the bandwidth of outgoing segments that may not reach the server.

  • Not all devices can support L4 hashing. Even if the OP's device does, they'll have a similar problem to the MAC issue - they'll need to keep changing their iperf config until it uses the other link. Also, why would you suggest the OP use additional hosts when VMs would be easier to set up and achieve the same result? Finally, using UDP won't male a different if the port numbers are the same as TCP uses. If using L4 hashing the OP can continue using TCP and simply change the port numbers iperf uses. – OzNetNerd Jun 15 '16 at 20:27
  • 1
    One other thing that is worth mentioning - it's not a good idea to suggest someone make a change to their network if you don't know the details of their setup. For example, suggesting the OP change their hashing algorithm from source MAC to port based could cause unexpected issues if there is a specific reason why source MAC was chosen in the first place. – OzNetNerd Jun 16 '16 at 0:12
  • Thanks for comments, OzNetNerd you already suggested to use vms, and I think you explained clearly, I do not see the point of repeating. Look at the topic, I think it is clear that everything we are talking about is about testing, particularity making sure that LACP sums the bandwidths, if there is someone that will tweak the algorithm on the production network, then he will do that someday without our help, and actually that is the learning path for many people. – Edik Mkoyan Jun 16 '16 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.