• 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
  • 相关阅读:
    我想逗你开心!
    java 操作mysql数据库
    ajaxTest.js
    [译] 如何在React中写出更优秀的代码
    Solaris系统磁盘镜像配置步骤
    初探c++11之for循环篇
    初探c++11之介绍篇
    003:STM32系列命名规则(转)
    006:__Main介绍(ADS下)(转)
    005:DIY 解析STM32启动过程(转)
  • 原文地址:https://www.cnblogs.com/ztguang/p/12644958.html
Copyright © 2020-2023  润新知