系统相关
首页 > 系统相关> > Linux接口RX数据包丢弃了LACP而没有进行loadbalacing

Linux接口RX数据包丢弃了LACP而没有进行loadbalacing

作者:互联网

操作系统:CentOS 6.6 / 64bit / Kernel 2.6.32-504.30.3.el6.x86_64

我有以下配置的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: 7
    Number of ports: 2
    Actor Key: 17
    Partner Key: 3
    Partner Mac Address: a4:56:30:c6:0d:00

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: 9c:8e:99:0d:1a:f2
Aggregator ID: 7
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: 9c:8e:99:0d:1a:f4
Aggregator ID: 7
Slave queue ID: 0

modprobe.conf中

alias bond0 bonding
options bond0 mode=4 miimon=100

思科交换机配置:

interface Port-channel1
 description Linux-bond0
 switchport access vlan 10

interface GigabitEthernet0/7
 switchport access vlan 10
 spanning-tree portfast
 spanning-tree guard root
 channel-protocol lacp
 channel-group 1 mode active
!
interface GigabitEthernet0/8
 switchport access vlan 10
 spanning-tree portfast
 spanning-tree guard root
 channel-protocol lacp
 channel-group 1 mode active
!

问题

我在Linux上的bond0和eth0接口上获得RX数据包丢弃(但不是在eth1上)

bond0 : RX packets:575214161 errors:0 dropped:6407 overruns:0 frame:0
eth0 : RX packets:573623915 errors:0 dropped:6410 overruns:0 frame:0
eth1 : RX packets:1590356 errors:0 dropped:0 overruns:0 frame:0

我检查了MRTG以查看交通流量及其约30mbps

但有趣的是.我看到eth0上的所有30mbps流量,eth1几乎没有kbps流量.这意味着我的链接没有正确的负载平衡?

cacti报告以下数据. LACP应该在两个链接上共享流量吗?

eth0: 30mbps
eth1: 600kbps 

解决方法:

我不担心丢包.算一算,你的总丢失率不到.001%.

就负载平衡而言,您可能需要(重新)配置交换机上使用的负载分配算法(因为它是切换到不平衡的服务器流量).思科在here上有一些相当不错的文档,但要复制到这个答案中太过分了.还要注意,分发算法将流量流分配给物理接口,这意味着如果只有一个流,它将只使用一个物理接口.

标签:linux,ethernet,cisco,bonding
来源: https://codeday.me/bug/20190815/1662072.html