ubuntuusers.de

Netzwerk bonding nach 802.3ad mit Fehlermeldung

Status: Gelöst | Ubuntu-Version: Server 16.04 (Xenial Xerus)
Antworten |

H.i.M

Avatar von H.i.M

Anmeldungsdatum:
17. November 2006

Beiträge: 261

Wohnort: Dresden

Hallo Freunde von xUbuntu.

Ich möchte gernen einen kleinen Cloud server mittels link-aggregation an unseren Netzwerkswitch binden. Leider komme ich jetzt nach allen tutorials in unserem, wie auch in externen wikis nicht mehr weiter.

Die Verbindung soll via 2x 1Gbit/s ethernet Kabeln nach dem standard 802.3ad auch bekannt als LACP oder mode 4 aufgebaut werden.

Beide Netzwerkschnittstellen können einen Link zum Switch aufbauen, wenn dieser nicht für LACP konfiguriert ist.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
sudo ifconfig
enp7s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3d
          inet addr:10.10.0.215  Bcast:10.10.1.255  Mask:255.255.254.0
          inet6 addr: fe80::d250:99ff:fec1:4d3d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4433 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1515 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:818190 (818.1 KB)  TX bytes:804432 (804.4 KB)
          Memory:df300000-df37ffff

enp8s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3e
          inet addr:10.10.0.216  Bcast:10.10.1.255  Mask:255.255.254.0
          inet6 addr: fe80::d250:99ff:fec1:4d3e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1144 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:99586 (99.5 KB)  TX bytes:4410 (4.4 KB)
          Memory:df200000-df27ffff

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:160 errors:0 dropped:0 overruns:0 frame:0
          TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB)

Die dazugehörige config

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp7s0
iface enp7s0 inet dhcp

# The secondary
auto enp8s0
iface enp8s0 inet dhcp

Um das bonding einzurichten habe Ich die pakete ifenslave net-tools ethtool bmon installiert und das kernel module bonding geladen.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sudo apt-get install ifenslave net-tools ethtool bmon
Reading package lists... Done
Building dependency tree
Reading state information... Done
ethtool is already the newest version (1:4.5-1).
ifenslave is already the newest version (2.7ubuntu1).
net-tools is already the newest version (1.60-26ubuntu1).
bmon is already the newest version (1:3.8-2build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
elias@EMT-cloud-server:~⟫

Danach habe ich die Schnittstellen enp7s0 und enp8s0 deaktiviert und die network config angepasst zu:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary and secondary network interfaces
allow enp7s0
iface enp7s0 inet manual

allow enp8s0
iface enp8s0 inet manual

# The bonding interface
auto bond0
iface bond0 inet dhcp
        bond-slaves enp7s0 enp8s0
        bond-mode 4
        bond-miimon 100
        bond-updelay 200
        bond-downdelay 200

und den Netzwerk stack gestoppt und neugestartet via

1
sudo /etc/init.d/networking stop

und

1
sudo /etc/init.d/networking start

Dann habe ich den Switch auf Dynamic Link Aggregation with LACP konfiguriert (Siehe Anhang) und das interface bond0 aktivert. Leider erhalte ich hier eine Fehlermeldung von meinem Server

1
2
3
4
sudo ifup bond0
Waiting for slave to join bond0 (will timeout after 60s)
No slave joint bond0, continuing anyway
...

Darüber hinaus sehe ich, dass die Schnittstelle enp8s0 nicht aktiv ist. Bei enp7s0 kann ich es nicht genau sagen, da hier derzeit auch das Server Dashboard (mainboard webinterface) drüber läuft. Es scheint mir jedoch so, also ob die Netzwerkschnittstellen nicht aktiviert werden. Nach einem reboot lässt sich auch keine Verbindung aufbauen.

Wenn ich dann auf den Switch schaue, sehe ich auch, dass nur eine der beiden Schnittstellen aktiv ist (Siehe Anhang 2). Ich denke ich habe irgendwo einen Fehler gemacht, finde ihn aber nicht und komme ich nicht weiter, weil ich nicht weiß nach was ich suchen muss.

Ich würde mich sehr über eure Anregungen freuen. Vielen Dank für eure Hilfe.

Liebe Grüße, H.i.M

Bilder

Into_the_Pit Team-Icon

Ehemalige
Avatar von Into_the_Pit

Anmeldungsdatum:
25. Juni 2008

Beiträge: 9490

Wohnort: Bochum

H.i.M schrieb:

Danach habe ich die Schnittstellen enp7s0 und enp8s0 deaktiviert und die network config angepasst zu:

Was mir hier auffällt ist, dass Deine Interfaces keine Angabe zum Bond-Master besitzen.

# The primary and secondary network interfaces
allow enp7s0
iface enp7s0 inet manual

allow enp8s0
iface enp8s0 inet manual

Zusätzlich kannst Du auch mit

 cat /proc/net/bonding/bond0 

den Bonding-Treiber etwas mehr Informationen entlocken.

misterunknown Team-Icon

Ehemalige
Avatar von misterunknown

Anmeldungsdatum:
28. Oktober 2009

Beiträge: 4403

Wohnort: Sachsen

Also wir haben das früher so gemacht:

auto bond0
iface bond0 inet static
        slaves eth2 eth3
        bond_mode balance-rr
        bond_xmit_hash_policy layer2+3
        bond_miimon 100
        bond_downdelay 200
        bond_updelay 200
        address 172.17.4.1
        netmask 255.255.255.252
        ...

Das ist jetzt von einem Squeeze-System kopiert, ich kann mir aber nicht vorstellen, dass sich da viel geändert hat.

H.i.M

(Themenstarter)
Avatar von H.i.M

Anmeldungsdatum:
17. November 2006

Beiträge: 261

Wohnort: Dresden

Ich habe die config der networkinterfaces mal nach Into_the_Pits Hinweis angepasst zu.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary and secondary network interfaces
allow enp7s0
iface enp7s0 inet manual
bond-master bond0


allow enp8s0
iface enp8s0 inet manual
bond-master bond0


# The bonding interface
auto bond0
iface bond0 inet dhcp
        bond-slaves enp7s0 enp8s0
        bond-mode 4
        bond-miimon 100
        bond-updelay 200
        bond-downdelay 200
        bond-lacp-rate 1

Auch mit dieser config laueft es nicht. Was mir noch aufgefallen ist, ist, dass mii-tool keine interfaces ausgibt (hinter der ifconfig Ausgabe). Auch nicht, wenn beide interfaces unabhängig, dass heisst nicht gebondet werden.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
sudo ifconfig
enp7s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3d
          inet addr:10.10.0.215  Bcast:10.10.1.255  Mask:255.255.254.0
          inet6 addr: fe80::d250:99ff:fec1:4d3d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:363 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:71783 (71.7 KB)  TX bytes:29932 (29.9 KB)
          Memory:df300000-df37ffff

enp8s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3e
          inet addr:10.10.0.216  Bcast:10.10.1.255  Mask:255.255.254.0
          inet6 addr: fe80::d250:99ff:fec1:4d3e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:247 errors:0 dropped:0 overruns:0 frame:0
          TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:50603 (50.6 KB)  TX bytes:23918 (23.9 KB)

sudo mii-tool
no MII interfaces found

Das ist vor allem verwunderlich, weil auf meinem zweiten Server ebenfalls mit UBuntu 16.04 und fast baugleichen Mainboard http://www.asrockrack.com/general/productdetail.asp?Model=C2550D4I#Specifications die Ausgabe funktioniert.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

sudo ifconfig
docker0   Link encap:Ethernet  Hardware Adresse 02:42:ff:1e:8a:8f
          inet Adresse:172.17.0.1  Bcast:0.0.0.0  Maske:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:0 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:0
          RX-Bytes:0 (0.0 B)  TX-Bytes:0 (0.0 B)

eth1      Link encap:Ethernet  Hardware Adresse d0:50:99:7e:eb:ab
          inet Adresse:192.168.10.11  Bcast:192.168.10.255  Maske:255.255.255.0
          inet6-Adresse: fe80::d250:99ff:fe7e:ebab/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:18290850 Fehler:0 Verloren:0 Überläufe:1 Fenster:0
          TX-Pakete:24702528 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX-Bytes:7642218426 (7.6 GB)  TX-Bytes:21303730768 (21.3 GB)
          Speicher:df300000-df37ffff

lo        Link encap:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:65536  Metrik:1
          RX-Pakete:13621726 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:13621726 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1
          RX-Bytes:3294969162 (3.2 GB)  TX-Bytes:3294969162 (3.2 GB)

sudo mii-tool
[sudo] Passwort für XXX:
eth1: negotiated 1000baseT-FD flow-control, link ok
eth2: no link

Das Board, wo mii-tool keine interfaces liefert http://www.asrockrack.com/general/productdetail.asp?Model=C2750D4I#Specifications. Die boards unterscheiden sich soweit ich weiss nur im Prozessor.

EDIT: Warum heissen die interfaces auf den beiden Boards unterschiedlich? eth, eth1 vs enp7s0, enp8s0 Koennte darin das Problem liegen?

Into_the_Pit Team-Icon

Ehemalige
Avatar von Into_the_Pit

Anmeldungsdatum:
25. Juni 2008

Beiträge: 9490

Wohnort: Bochum

H.i.M schrieb:

Ich habe die config der networkinterfaces mal nach Into_the_Pits Hinweis angepasst zu.

1
2
3
4
5
6
7
8
9
# The primary and secondary network interfaces
allow enp7s0
iface enp7s0 inet manual
bond-master bond0


allow enp8s0
iface enp8s0 inet manual
bond-master bond0

Ändere die Einträge mal auf

auto enp7s0
…

auto enp8s0
…

H.i.M

(Themenstarter)
Avatar von H.i.M

Anmeldungsdatum:
17. November 2006

Beiträge: 261

Wohnort: Dresden

Vielen lieben Dank fuer eure Hilfe es scheint wirklich zu funktionieren. Nach Aenderung der network config von allowed nach auto dem Hinweis von Into_the_Pit folgend und einem systemctl restart networking habe ich zuerst noch einen IP Adress Konflikt gehabt (2x 215).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
sudo ifconfig
bond0     Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3d
          inet addr:10.10.0.215  Bcast:10.10.1.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:404 errors:0 dropped:27 overruns:0 frame:0
          TX packets:121 errors:0 dropped:5 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:62127 (62.1 KB)  TX bytes:18180 (18.1 KB)

enp7s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3d
          inet addr:10.10.0.215  Bcast:10.10.1.255  Mask:255.255.254.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:14923 errors:0 dropped:17 overruns:0 frame:0
          TX packets:6197 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9789398 (9.7 MB)  TX bytes:787169 (787.1 KB)
          Memory:df300000-df37ffff

enp8s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3d
          inet addr:10.10.0.216  Bcast:10.10.1.255  Mask:255.255.254.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:3255 errors:0 dropped:10 overruns:0 frame:0
          TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:445798 (445.7 KB)  TX bytes:43451 (43.4 KB)
          Memory:df200000-df27ffff

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:700 errors:0 dropped:0 overruns:0 frame:0
          TX packets:700 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:98446 (98.4 KB)  TX bytes:98446 (98.4 KB)

Das bonding schien aber zu laufen

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
sudo 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: fast
Min links: 0
Aggregator selection policy (ad_select): stable
System priority: 65535
System MAC address: d0:50:99:c1:4d:3d
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 2
        Actor Key: 9
        Partner Key: 1
        Partner Mac Address: 2c:23:3a:97:5b:96

Slave Interface: enp7s0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: d0:50:99:c1:4d:3d
Slave queue ID: 0
Aggregator ID: 1
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: d0:50:99:c1:4d:3d
    port key: 9
    port priority: 255
    port number: 1
    port state: 63
details partner lacp pdu:
    system priority: 32768
    system mac address: 2c:23:3a:97:5b:96
    oper key: 1
    port priority: 32768
    port number: 15
    port state: 61

Slave Interface: enp8s0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: d0:50:99:c1:4d:3e
Slave queue ID: 0
Aggregator ID: 1
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: d0:50:99:c1:4d:3d
    port key: 9
    port priority: 255
    port number: 2
    port state: 63
details partner lacp pdu:
    system priority: 32768
    system mac address: 2c:23:3a:97:5b:96
    oper key: 1
    port priority: 32768
    port number: 16
    port state: 61

Als ich dann wieder zu meiner urspruenglichen Konfiguration zurueck wollte, habe ich bemerkt, dass das bond0 interface trotz neugestartetem networking immer noch praesent war. Nach einem Neustart war es jedoch wieder weg. Daher habe ich noch einmal die network config zu bonding geaendert und dann NEUGESTARTET. Und siehe da. Es funktioniert!

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ifconfig 
bond0     Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3e  
          inet addr:10.10.0.216  Bcast:10.10.1.255  Mask:255.255.254.0
          inet6 addr: fe80::d250:99ff:fec1:4d3e/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:455 errors:0 dropped:7 overruns:0 frame:0
          TX packets:271 errors:0 dropped:6 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:112507 (112.5 KB)  TX bytes:35933 (35.9 KB)

enp7s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3e  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:356 errors:0 dropped:6 overruns:0 frame:0
          TX packets:255 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:101357 (101.3 KB)  TX bytes:34335 (34.3 KB)
          Memory:df300000-df37ffff 

enp8s0    Link encap:Ethernet  HWaddr d0:50:99:c1:4d:3e  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:99 errors:0 dropped:1 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:11150 (11.1 KB)  TX bytes:1598 (1.5 KB)
          Memory:df200000-df27ffff 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:338 errors:0 dropped:0 overruns:0 frame:0
          TX packets:338 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:56893 (56.8 KB)  TX bytes:56893 (56.8 KB)

Ich bin so gluecklich, dass das einfach geht! Danke euch beiden noch mals!

EDIT: Ich war mit dem Beitrag noch nicht ganz fertig, weil ich ihn von zwei PCs aus bearbeitet habe. Das gelöst markieren wollte ich noch ganz zum Schluss machen 😀

Bilder

Into_the_Pit Team-Icon

Ehemalige
Avatar von Into_the_Pit

Anmeldungsdatum:
25. Juni 2008

Beiträge: 9490

Wohnort: Bochum

H.i.M schrieb:

Ich bin so gluecklich, dass das einfach geht! Danke euch beiden noch mals!

Freut mich, beim nächsten mal bitte auch den Thread als gelöst markieren. 😉

Antworten |