How to use bonding to increase the throughput?
http://csie.nqu.edu.tw/smallko/sdn/mininet-link-aggregate.htm
[Description]
In linux system, you can bond multiple networkinterfaces to increase bandwidth. I will show how to do it in this lecture. Inthe experimental environment, I will create 4 hosts, i.e. h1, h2, h3, and h4.h2 will be configured as a switch. There are 2 interfaces in h1. I will bondthese two interfaces to become one logical interface, i.e. bond0. h3 and h4 arejust normal hosts. In the first experiment, no bonding is used. In the secondexperiment, bonding is used to evaluate the performance for comparison.
[Note] If you don't install the bridgetool, please use "sudo apt-get install bridge-utils" command to install related software.
[mininet script]
#!/usr/bin/env python from mininet.cli import CLI from mininet.link import Link,TCLink,Intf from mininet.net import Mininet from mininet.node import RemoteController from mininet.term import makeTerm
if '__main__' == __name__: net = Mininet(link=TCLink) h1 = net.addHost('h1', mac='00:00:00:00:00:11') h2 = net.addHost('h2', mac='00:00:00:00:00:22') h3 = net.addHost('h3', mac='00:00:00:00:00:23') h4 = net.addHost('h4', mac='00:00:00:00:00:24') linkopts={'bw':1} net.addLink(h1, h2, cls=TCLink, **linkopts) net.addLink(h1, h2, cls=TCLink, **linkopts) net.addLink(h2, h3, cls=TCLink, **linkopts) net.addLink(h2, h4, cls=TCLink, **linkopts) net.build() h2.cmd("sudo ifconfig h2-eth0 0") h2.cmd("sudo ifconfig h2-eth1 0") h2.cmd("sudo ifconfig h2-eth2 0") h2.cmd("sudo ifconfig h2-eth3 0") h2.cmd("sudo brctl addbr mybr") h2.cmd("sudo brctl addif mybr h2-eth0") h2.cmd("sudo brctl addif mybr h2-eth1") h2.cmd("sudo brctl addif mybr h2-eth2") h2.cmd("sudo brctl addif mybr h2-eth3") h2.cmd("sudo ifconfig mybr up") CLI(net) net.stop() |
[Execution]
Experiment 1
start iperf TCPserver at h1 with port 5566 and another iperf TCPserver at h1 with port 6666
start iperfclient at h3 and h4 and see the results
Experiment 2.
bonding setting at h1
performance evaluation (We can see that thethroughput has increased for h3-h1 and h4-h1 communications)
Dr. Chih-Heng Ke
Department of Computer Science andInformation Engineering, National Quemoy University, Kinmen,Taiwan
Email: smallko@gmail.com