Скорость при bonding
Есть debian 8 и ubuntu desktop 14.04. Планируемая схема подключения:
+---+ +---+ +---+
|pc1|---| |---| |
| |---|swt|---|pc1|
+---+ +---+ +---+
Режим работы bonding: 802.3ad. В debian все завелось без вопросов с такими настройками (на стороне свича всё настроено):
$ lspci
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
04:01.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller
$ cat /etc/modules
bonding
$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto bond0
iface bond0 inet static
address 192.168.42.55
netmask 255.255.255.0
gateway 192.168.42.254
dns-nameservers 192.168.42.9 192.168.42.7
dns-search domain.local
bond_mode 802.3ad
bond_miimon 100
bond_downdelay 200
bond_updelay 200
bond_slaves eth0 eth1
$ cat /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: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200
802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 2
Actor Key: 17
Partner Key: 1000
Partner Mac Address: b0:00:b4:1b:e6:42
Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 5
Permanent HW addr: 00:27:0e:2b:43:d5
Aggregator ID: 1
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 4
Permanent HW addr: 00:0e:04:b7:09:11
Aggregator ID: 1
Slave queue ID: 0
В Ubuntu пришлось долго бить в бубен и на данный момент все работает, если прописывать ручками
$ lspci
02:00.0 Ethernet controller: D-Link System Inc DGE-528T Gigabit Ethernet Adapter (rev 06)
03:00.0 Ethernet controller: D-Link System Inc DGE-528T Gigabit Ethernet Adapter (rev 06)
$ sudo modprobe bonding mode=4
$ sudo ifconfig bond0 up
$ sudo ifenslave bond0 eth5 eth6
$ sudo ifconfig bond0 192.168.42.54 netmask 255.255.255.0
$ cat /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: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
Aggregator ID: 1
Number of ports: 2
Actor Key: 17
Partner Key: 1002
Partner Mac Address: b0:00:b4:1b:e6:42
Slave Interface: eth5
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: c8:d3:a3:ad:23:ae
Aggregator ID: 1
Slave queue ID: 0
Slave Interface: eth6
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: c8:d3:a3:ad:23:51
Aggregator ID: 1
Slave queue ID: 0
Результаты теста. Первый результат когда оба компа в режиме bonding.
$ sudo iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.42.55, port 34571
[ 5] local 192.168.42.54 port 5201 connected to 192.168.42.55 port 34572
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 108 MBytes 905 Mbits/sec
[ 5] 1.00-2.00 sec 112 MBytes 942 Mbits/sec
[ 5] 2.00-3.00 sec 112 MBytes 941 Mbits/sec
[ 5] 3.00-4.00 sec 112 MBytes 942 Mbits/sec
[ 5] 4.00-5.00 sec 112 MBytes 941 Mbits/sec
[ 5] 5.00-6.00 sec 112 MBytes 939 Mbits/sec
[ 5] 6.00-7.00 sec 112 MBytes 942 Mbits/sec
[ 5] 7.00-8.00 sec 112 MBytes 941 Mbits/sec
[ 5] 8.00-9.00 sec 112 MBytes 942 Mbits/sec
[ 5] 9.00-10.00 sec 112 MBytes 941 Mbits/sec
[ 5] 10.00-10.04 sec 4.44 MBytes 940 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-10.04 sec 1.10 GBytes 939 Mbits/sec 0 sender
[ 5] 0.00-10.04 sec 1.10 GBytes 937 Mbits/sec receiver
Второй результат когда на стороне ubuntu я использовал один интерфейс:
$ sudo iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.42.55, port 42878
[ 5] local 10.10.3.70 port 5201 connected to 192.168.42.55 port 42879
[ ID] Interval Transfer Bandwidth
[ 5] 0.00-1.00 sec 90.7 MBytes 761 Mbits/sec
[ 5] 1.00-2.00 sec 94.3 MBytes 791 Mbits/sec
[ 5] 2.00-3.00 sec 93.2 MBytes 782 Mbits/sec
[ 5] 3.00-4.00 sec 93.4 MBytes 783 Mbits/sec
[ 5] 4.00-5.00 sec 93.6 MBytes 785 Mbits/sec
[ 5] 5.00-6.00 sec 94.3 MBytes 791 Mbits/sec
[ 5] 6.00-7.00 sec 94.6 MBytes 794 Mbits/sec
[ 5] 7.00-8.00 sec 94.6 MBytes 794 Mbits/sec
[ 5] 8.00-9.00 sec 94.7 MBytes 795 Mbits/sec
[ 5] 9.00-10.00 sec 94.6 MBytes 794 Mbits/sec
[ 5] 10.00-10.04 sec 3.66 MBytes 793 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-10.04 sec 943 MBytes 788 Mbits/sec 202 sender
[ 5] 0.00-10.04 sec 942 MBytes 787 Mbits/sec receiver
Вопрос в том реально ли так должно работать, в плане скорости? В теории должно быть рядом с 2000 Mbits/sec