Netgear ProSafe GSM7248V2 と Linux サーバー間の LACP

Netgear ProSafe GSM7248V2 と Linux サーバー間の LACP

ボンディング、具体的には 802.3ad モードを使用して、2 つの 1Gbps NIC を備えた Linux サーバーをスイッチ Netgear ProSafe GSM7248V2 に接続しようとしています。結果は非常にわかりにくいので、次に試すべきことについてヒントがあればいただければ幸いです。

サーバー側では、これは /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" はスイッチの Load Balance Type 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 で接続された 2 台の異なるマシンから 2 つの大きなバイナリ ファイル (それぞれ 10GB) を同時にコピーしようとすると、サーバーの bond0 インターフェイスの全体的なスループットは 1Gbps を大きく下回りますが、2Gbps に近い値になることが予想されます (読み取り速度などはここでは制限要因ではなく、すべて SSD で、キャッシュが適切など)。同じマシンから同じファイルを次々に順番にコピーすると、1Gbps に近いスループットに簡単に到達します。

ここで何が問題なのか、何かお分かりですか? 診断に関しては、dmesg (802.3ad 互換のパートナーなし) とスイッチの sh lacp 出力 (通常のポート レコードには接続された NIC の正しい MAC アドレスが表示されますが、パートナーの MAC はありません) に混乱を招く警告が表示されます。ネットワーク パフォーマンスに関しては、2 つの異なる接続を使用した集約は実際には確認できません。ヒントがあれば、ぜひ教えてください。

答え1

スイッチはlongLACP タイムアウト (30 秒ごとに 1 つの LACPDU) に設定されています。

Linux システムは に設定されていますbond-lacp-rate 1

Debianでこれが実際に何をするのかは分かりませんが、lacp_rate=1モジュールオプションをボンディングに渡すと(参照) の場合、これは高速タイムアウト (1 秒ごとに 1 つの LACPDU) になります。

低速/高速 LACP レート間のこの不一致は、誤った構成です。

私が見つけたすべてのサンプルドキュメントには、Debian が受け入れると記載されており、bond-lacp-rate slowこれで問題が解決されるはずです。

bond-lacp-rateデフォルトは低速なので、設定ファイルからその行を削除し、ボンディング モジュールをアンロードするか、再起動して適用することもできます。

2 つのストリームだけでスループットをテストしないでください。layer3+4ポリシーは、2 つのストリームがそれぞれ別の NIC を取得することを保証するものではなく、十分なストリームがあればトラフィックがある程度均等にバランスされることを保証するものです。

たとえば、16 または 32 の同時 iperf3 TCP ストリームでテストします。すべてのストリームの合計スループットは 2Gbps に近くなるはずです。

関連情報