Web lists-archives.com

Re: NIC Bonding 802.3ad LACP without switch




basti <mailinglist@xxxxxxxxxxxxxxxx> wrote:
> On 27.05.19 17:32, Sven Hartge wrote:
>> basti <basti@xxxxxxxxxxxxxxxx> wrote:
>> 
>>> also on a network card with 2 NIC's
>> 
>>> srv-a nic ens2f0 ---- ens2f0 srv-b
>>>           ens2f1 ---- ens2f1
>> 
>>> Can I use a switch that only supoort static LAC to speedup my
>>> connection? For example tp-link TL-SG108E ? Or must it support LACP?
>> 
>> For this direct connection you should use "balance-rr" or mode 0.
>> This will get you a true 2GBit connection even with only one active
>> flow.

> I have try is and it works only in one direction (srv-a -> srv-b).
> When I try to transfer files from b to a only some bytes are transmited
> (seen in tcpdump). ssh from b to a is working.

> the config looks like:

> A:

> auto bond0
> iface bond0 inet static
>      address 10.0.1.11
>      netmask 255.255.255.0
>      network 10.0.1.0
>      slaves ens2f0 ens2f1
>      bond-mode 0
>      bond-miimon 100
>      bond-downdelay 200
>      bond-updelay 200

> B:

> auto bond0
> iface bond0 inet static
>      address 10.0.1.12
>      netmask 255.255.255.0
>      network 10.0.1.0
>      slaves ens2f0 ens2f1
>      bond-mode 0
>      bond-miimon 100
>      bond-downdelay 200
>      bond-updelay 200

The configuration is correct.

> A -> B:
> dd if=/dev/vg-01/somefile bs=4M | nc 10.0.1.12 19000
> 512+0 Datensätze ein
> 512+0 Datensätze aus
> 2147483648 Bytes (2,1 GB, 2,0 GiB) kopiert, 9,47551 s, 227 MB/s

227 MiB/s is very very close to the maximum achievable troughput here,
so it works correctly.

> B -> A:
> dd bs=4M of=/dev/vg01/somefile | ssh root@10.0.1.11 "dd of=/dev/null"
> 0+0 Datensätze ein
> 0+0 Datensätze aus
> 0 Bytes kopiert, 3,8988e-05 s, 0,0 kB/s

That command makes no sense here. You need to use "if=" instead of "of="
for the first dd command.

But instead of using dd for the bandwidth test, you'd rather use iperf3.
This get's you much more precise results because it does not depend on
disk or encryption speeds like your dd|ssh setup does.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.