免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 10470 | 回复: 8
打印 上一主题 下一主题

[网络管理] CentOS6.4双网卡做端口聚合,但只有一个口在聚合口中 [复制链接]

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-01-01 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-07-23 20:33 |只看该作者 |倒序浏览
服务器是DELL R720,网卡是Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe,安装了64位的CentOS6.4系统。

我将服务器其中的em1,em3两块千兆网卡做bond,设置成mode=0时能够正常工作,达到负载均衡的效果。

现在我希望能够将两块1G网卡带宽扩大至2G。设置为mode=4,并且在交换机那一端也做了端口汇聚的设置。但用netperf测试时,发现流量只走其中一块网卡走,并且查看 /proc/net/bonding/bond0 文件内容如下:

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

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: slow
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 1
        Actor Key: 17
        Partner Key: 1
        Partner Mac Address: 00:00:00:00:00:00

Slave Interface: em1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:5a:47:ef
Aggregator ID: 1
Slave queue ID: 0

Slave Interface: em3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:5a:47:f1
Aggregator ID: 2
Slave queue ID: 0


Number of ports: 1 这里正常情况下应该是2吧。请问是什么原因导致我遇到的这个问题呢?

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
2 [报告]
发表于 2013-07-23 20:58 |只看该作者
交换机那边的聚合模式和linux的一样吗

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-01-01 06:20:00
3 [报告]
发表于 2013-07-23 21:12 |只看该作者
交换机那边也是设置成LACP方式的。但我不确定是不是设置一定正确,因为第一次做这个设置。

我想知道如果交换机那边没有做设置,或者设置不正确,是不是会导致我服务器这一端的两个网卡Aggregator ID不全都在LACP的ID中的情况。

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
4 [报告]
发表于 2013-07-23 21:18 |只看该作者
本帖最后由 chenyx 于 2013-07-23 21:19 编辑

那你找网络管理员,查看下交换机端口组的状态吧,最好能在交换机上debug

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-01-01 06:20:00
5 [报告]
发表于 2013-07-23 21:20 |只看该作者
刚才确实是我交换机设置有问题,现在已经设置好了,查看信息如下

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer3+4 (1)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: slow
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
        Aggregator ID: 3
        Number of ports: 2
        Actor Key: 17
        Partner Key: 410
        Partner Mac Address: d0:67:e5:d7:a3:ca

Slave Interface: em1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:53:d8:f5
Aggregator ID: 3
Slave queue ID: 0

Slave Interface: em3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:53:d8:f7
Aggregator ID: 3
Slave queue ID: 0

这样看起来应该是正确的。但实际传输的时候,我在交换机上看流量,仍然所有流量只会从其中一个口走,请问这是为什么呢?

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-01-01 06:20:00
6 [报告]
发表于 2013-07-23 21:24 |只看该作者
console#show lacp port-channel 1

Actor:
      system priority:                1
      system mac addr:                D067.E5D7.A3CC
Partner:
      system priority:                65535
      system mac addr:                90B1.1C53.D8F5

交换机上查看信息如下,我发现交换机上的Partner的MAC地址是em1的地址,不是Partner Mac Address的地址,会不会是这个原因导致。这个需要在什么地方来设置正确呢,是系统上面还是交换机上面

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-01-01 06:20:00
7 [报告]
发表于 2013-07-25 22:02 |只看该作者
请问我目前的配置还有什么地方有问题吗
我看了网上的很多相关配置的文章,感觉我的配置已经和别人说的一样了,就是不知道为什么会达不到流量同时走两个网口,达到2G的效果。

论坛徽章:
0
8 [报告]
发表于 2017-10-30 15:50 |只看该作者
我也遇到您曾经遇到的问题,请问达到2G了吗?谢谢

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
9 [报告]
发表于 2017-11-16 17:10 |只看该作者
回复 6# number321

这个原因 的可能性比较大.

试着 把 em1  down一下. 看看流量会不会切换到 em3 上.


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP