V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
alams
V2EX  ›  Linux

CentOS 6 7 双网卡绑定 Bonding 使用 mode 6 带宽无法叠加的问题

  •  
  •   alams · 2018-03-01 15:55:43 +08:00 · 4683 次点击
    这是一个创建于 2238 天前的主题,其中的信息可能已经有所发展或是发生改变。
    有两台服务器在同一个千兆交换机上,一台 CentOS6,一台 CentOS7,每台服务器都接着两根网线。

    我想将两根网线绑定在一起做成能够互通 2000M 的速度。能够在传输文件的时候达到 200M 的速度。

    在配置完成后在测试的过程中,使用 scp 和 iperf 都只能达到 1000M 的速度。

    ****************************************

    [root@root ~]# iperf -c 192.168.200.254
    ------------------------------------------------------------
    Client connecting to 192.168.200.254, TCP port 5001
    TCP window size: 22.5 KByte (default)
    ------------------------------------------------------------
    [ 3] local 192.168.200.253 port 11080 connected with 192.168.200.254 port 5001
    [ ID] Interval Transfer Bandwidth
    [ 3] 0.0-10.0 sec 1.09 GBytes 940 Mbits/sec


    [root@root ~]# iperf -s
    ------------------------------------------------------------
    Server listening on TCP port 5001
    TCP window size: 85.3 KByte (default)
    ------------------------------------------------------------
    [ 4] local 192.168.200.254 port 5001 connected with 192.168.200.253 port 11079
    [ 4] 0.0-10.0 sec 1.09 GBytes 939 Mbits/sec


    ****************************************

    CentOS 7

    Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

    Bonding Mode: adaptive load balancing
    Primary Slave: None
    Currently Active Slave: eno1
    MII Status: up
    MII Polling Interval (ms): 100
    Up Delay (ms): 0
    Down Delay (ms): 0

    Slave Interface: eno1
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 1
    Permanent HW addr: 08:94:ef:43:e2:78
    Slave queue ID: 0

    Slave Interface: eno2
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 1
    Permanent HW addr: 08:94:ef:43:e2:79
    Slave queue ID: 0


    CentOS 6

    Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

    Bonding Mode: adaptive load balancing
    Primary Slave: None
    Currently Active Slave: eth0
    MII Status: up
    MII Polling Interval (ms): 100
    Up Delay (ms): 0
    Down Delay (ms): 0

    Slave Interface: eth0
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 0
    Permanent HW addr: 6c:ae:8b:3a:ce:ba
    Slave queue ID: 0

    Slave Interface: eth1
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 0
    Permanent HW addr: 6c:ae:8b:3a:ce:bb
    Slave queue ID: 0
    5 条回复    2018-03-02 12:25:42 +08:00
    asilin
        1
    asilin  
       2018-03-01 16:17:11 +08:00
    恩,那是因为你没有弄明白 bonding 的用途:只叠加机器的出口带宽(1000M -> 2000M);

    你拿两个 bonding 机器之间相互测试带宽,瓶颈都在于每一个机器的入口带宽(1000M),所以不论怎么测,都是 1000M ;

    建议看下 kernel 文档中关于 bonding 的部分。
    alams
        2
    alams  
    OP
       2018-03-01 16:32:01 +08:00
    @asilin 我试过用两台服务器往配置了 bonding 的机器发送数据,每台机器的带宽都能达到 1000M。这样表示入口带宽能够达到 2000M,这样相当于是有两个链接。

    请问有其他方法可以达到我上面的那种要求在同一个请求里出口和入口的带宽都叠加到 2000M 吗。
    br00k
        3
    br00k  
       2018-03-01 16:41:01 +08:00
    交换机支持链路聚合吗?
    alams
        4
    alams  
    OP
       2018-03-01 16:43:59 +08:00
    @br00k 支持的,试过在 mode 0 的模式下做链路聚合,但也是只能跑 1000M 的速度。 在使用 mode 6 模式的时候就会出现网络异常,同交换机内无法 Ping 通。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2728 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 15:43 · PVG 23:43 · LAX 08:43 · JFK 11:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.