
본딩, 특히 802.3ad 모드를 사용하여 스위치 Netgear ProSafe GSM7248V2가 있는 2개의 1Gbps NIC가 있는 Linux 서버를 연결하려고 합니다. 결과는 매우 혼란스럽습니다. 다음에 무엇을 시도할지에 대한 힌트를 주시면 감사하겠습니다.
서버 측에서는 이것이 내 /etc/network/interfaces입니다:
auto bond0
iface bond0 inet static
address 192.168.1.15/24
gateway 192.168.1.254
dns-nameservers 8.8.8.8
dns-search my-domain.org
bond-slaves eno1 eno2
bond-mode 4
bond-miimon 100
bond-lacp-rate 1
bond-xmit_hash_policy layer3+4
hwaddress aa:bb:cc:dd:ee:ff
스위치 구성은 다음과 같습니다.
(GSM7248V2) #show port-channel 3/2
Local Interface................................ 3/2
Channel Name................................... fubarlg
Link State..................................... Up
Admin Mode..................................... Enabled
Type........................................... Dynamic
Load Balance Option............................ 6
(Src/Dest IP and TCP/UDP Port fields)
Mbr Device/ Port Port
Ports Timeout Speed Active
------ ------------- --------- -------
0/7 actor/long Auto True
partner/long
0/8 actor/long Auto True
partner/long
(GSM7248V2) #show lacp actor 0/7
Sys Admin Port Admin
Intf Priority Key Priority State
------ -------- ----- -------- -----------
0/7 1 55 128 ACT|AGG|LTO
(GSM7248V2) #show lacp actor 0/8
Sys Admin Port Admin
Intf Priority Key Priority State
------ -------- ----- -------- -----------
0/8 1 55 128 ACT|AGG|LTO
(GSM7248V2) #show lacp partner 0/7
Sys System Admin Prt Prt Admin
Intf Pri ID Key Pri Id State
------ --- ----------------- ----- --- ----- -----------
0/7 0 00:00:00:00:00:00 0 0 0 ACT|AGG|LTO
(GSM7248V2) #show lacp partner 0/8
Sys System Admin Prt Prt Admin
Intf Pri ID Key Pri Id State
------ --- ----------------- ----- --- ----- -----------
0/8 0 00:00:00:00:00:00 0 0 0 ACT|AGG|LTO
나는 xmit "layer3+4"가 스위치의 로드 밸런스 유형 6과 가장 호환된다고 믿습니다. 첫 번째 놀라운 점은 스위치가 LACP 파트너의 MAC 주소를 볼 수 없다는 것입니다.
서버 측에서 이것은 /proc/net/bonding/bond0의 내용입니다:
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
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: fast
Min links: 0
Aggregator selection policy (ad_select): stable
System priority: 65535
System MAC address: ac:1f:6b:dc:2e:88
Active Aggregator Info:
Aggregator ID: 15
Number of ports: 2
Actor Key: 9
Partner Key: 55
Partner Mac Address: a0:21:b7:9d:83:6a
Slave Interface: eno1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: ac:1f:6b:dc:2e:88
Slave queue ID: 0
Aggregator ID: 15
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
system priority: 65535
system mac address: ac:1f:6b:dc:2e:88
port key: 9
port priority: 255
port number: 1
port state: 63
details partner lacp pdu:
system priority: 1
system mac address: a0:21:b7:9d:83:6a
oper key: 55
port priority: 128
port number: 8
port state: 61
Slave Interface: eno2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: ac:1f:6b:dc:2e:89
Slave queue ID: 0
Aggregator ID: 15
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 0
details actor lacp pdu:
system priority: 65535
system mac address: ac:1f:6b:dc:2e:88
port key: 9
port priority: 255
port number: 2
port state: 63
details partner lacp pdu:
system priority: 1
system mac address: a0:21:b7:9d:83:6a
oper key: 55
port priority: 128
port number: 7
port state: 61
내가 이것을 올바르게 이해한다면 이는 Linux 본딩 드라이버가 모든 수집기 세부 정보(키, 포트 번호, 시스템 우선 순위, 포트 우선 순위 등)를 올바르게 결정했음을 의미합니다. 그럼에도 불구하고 네트워킹 서비스를 다시 시작한 후 dmesg에서 다음을 수신합니다.
[Dec14 20:40] bond0: Releasing backup interface eno1
[ +0.000004] bond0: first active interface up!
[ +0.090621] bond0: Removing an active aggregator
[ +0.000004] bond0: Releasing backup interface eno2
[ +0.118446] bond0: Enslaving eno1 as a backup interface with a down link
[ +0.027888] bond0: Enslaving eno2 as a backup interface with a down link
[ +0.008805] IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
[ +3.546823] igb 0000:04:00.0 eno1: igb: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ +0.160003] igb 0000:05:00.0 eno2: igb: eno2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ +0.035608] bond0: link status definitely up for interface eno1, 1000 Mbps full duplex
[ +0.000004] bond0: Warning: No 802.3ad response from the link partner for any adapters in the bond
[ +0.000008] bond0: first active interface up!
[ +0.000166] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[ +0.103821] bond0: link status definitely up for interface eno2, 1000 Mbps full duplex
두 인터페이스 모두 살아 있고 네트워크 연결은 꽤 정상적인 것 같습니다. 802.3ad 호환 파트너가 없다는 이상한 경고만 표시됩니다.
또한 각각 1Gbps로 연결된 동일한 스위치에 연결된 두 개의 서로 다른 시스템에서 두 개의 큰 바이너리 파일(각각 10GB)을 동시에 복사하려고 하면 서버에 있는 bond0 인터페이스의 전체 처리량은 1Gbps보다 훨씬 낮습니다. 2Gbps에 가까운 속도를 기대할 수 있습니다(읽기 속도 등은 여기에서 제한 요소가 아니며 모든 SSD, 캐시가 잘 되어 있음 등). 동일한 컴퓨터에서 동일한 파일을 순차적으로 하나씩 복사하면 1Gbps에 가까운 처리량에 쉽게 도달합니다.
여기서 무엇이 잘못되었을 수 있는지 아시나요? 진단과 관련하여 dmesg(802.3ad 호환 파트너 없음) 및 스위치의 sh lacp 출력(일반 포트 기록에는 연결된 NIC의 올바른 MAC 주소가 표시되지만 파트너의 MAC 없음)에 혼란스러운 경고가 나타납니다. 네트워크 성능과 관련하여 두 개의 서로 다른 연결을 사용하는 집계를 실제로 볼 수 없습니다. 어떤 힌트라도 주시면 매우 감사하겠습니다.
답변1
스위치는 long
LACP 시간 제한(30초마다 LACPDU 1회)으로 구성됩니다.
Linux 시스템은 bond-lacp-rate 1
.
데비안에서는 이것이 실제로 무엇을 하는지 찾을 수 없지만, lacp_rate=1
모듈 옵션을 본딩에 전달하면(참조), 이는 빠른 시간 초과입니다(1초마다 하나의 LACPDU).
느린/빠른 LACP 속도의 불일치는 잘못된 구성입니다.
내가 찾을 수 있는 모든 예제 문서에는 데비안이 이를 수락하고 bond-lacp-rate slow
희망적으로 이를 수정해 줄 것이라고 나와 있습니다.
bond-lacp-rate
기본값은 느린 속도이므로 구성 파일에서 해당 행을 제거한 다음 본딩 모듈을 언로드하거나 재부팅하여 적용할 수도 있습니다 .
스트림 두 개만으로 처리량을 테스트하지 마세요. 정책 layer3+4
은 두 개의 스트림이 각각 별도의 NIC를 갖게 된다는 것을 보장하지 않습니다. 단지 충분한 스트림이 주어지면 트래픽의 균형이 어느 정도 균등하게 유지되어야 한다는 것입니다.
16개 또는 32개의 동시 iperf3 TCP 스트림으로 테스트합니다. 모든 스트림의 총 처리량은 2Gbps에 가까워야 합니다.