bond0 bleibt im Status down nach reboot

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
cmonty14
Beiträge: 1
Registriert: 10.12.2019 08:23:57

bond0 bleibt im Status down nach reboot

Beitrag von cmonty14 » 10.12.2019 08:37:00

Hallo,

ich habe div. Server mit Debian 10 aufgesetzt, die HW-seitig vergleichbar ausgestattet sind.
Unter anderem befinden sich in allen Servern 2 Mellanox-NICs, die ein Bond-Netzwerk aufbauen:

Code: Alles auswählen

root@ld4257:~# lspci | grep Mell
06:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
86:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
DIes ist (ein relevanter Ausschnitt) meiner Netzwerk-Konfiguration /etc/network/interfaces:

Code: Alles auswählen

# 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
#allow-hotplug ens4
#iface ens4 inet static
#       address 10.97.206.99/24
#       gateway 10.97.206.1
#       # dns-* options are implemented by the resolvconf package, if installed
#       dns-nameservers 10.17.220.80 10.17.122.10
#       dns-search wdf.sap.corp

iface eno3 inet manual
iface eno4 inet manual

iface ens4 inet manual
iface ens4d1 inet manual

iface ens5 inet manual
iface ens5d1 inet manual

iface enp0s20u1u5 inet manual

auto eno1
iface eno1 inet static
        address  172.16.0.17
        netmask  255.255.255.224
#corosync ring1 (grey) network

auto eno2
iface eno2 inet static
        address  172.16.1.17
        netmask  255.255.255.224
        corosync ring2 (red) network
#corosync ring2 (red) network

#auto ens4d1
#iface ens4d1 inet static
#        address  192.168.1.17
#        netmask  255.255.255.224
#        mtu 9000

auto bond0
iface bond0 inet static
        address  192.168.1.17
        netmask  255.255.255.224
        bond-slaves ens4d1 ens5d1
        bond-miimon 100
        bond-mode active-backup
        mtu 9000
        post-up ip link set dev ens4d1 mtu 9000 && post-up ip link set dev ens5d1 mtu 9000
Im Systemlog finde ich diese Einträge zum bond0-Interface:

Code: Alles auswählen

root@ld4257:~# dmesg | grep bond0
[   33.310105] bonding: bond0 is being created...
[   33.858946] bond0: (slave ens4d1): making interface the new active one
[   33.858986] bond0: (slave ens4d1): Enslaving as an active interface with an up link
[   33.921364] bond0: (slave ens5d1): Enslaving as a backup interface with an up link
[   34.204986] IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
[   34.268106] bond0: (slave ens4d1): link status definitely down, disabling slave
[   34.268114] bond0: now running without any active interface!
[   34.268152] bond0: (slave ens5d1): link status definitely down, disabling slave
[   35.932431] bond0: (slave ens4d1): link status definitely up, 40000 Mbps full duplex
[   35.932433] bond0: (slave ens4d1): making interface the new active one
[   35.932495] bond0: active interface up!
[   35.932854] bond0: (slave ens5d1): link status definitely up, 40000 Mbps full duplex
[   81.033069] bond0: option mode: unable to set because the bond device has slaves
[   81.128800] bond0: (slave ens4d1): link status definitely down, disabling slave
[   81.128815] bond0: now running without any active interface!
[   81.128929] bond0: (slave ens5d1): link status definitely down, disabling slave
Das Problem besteht darin, dass bei einigen, aber nicht allen Servern, das Interface bond0 nach dem reboot den Status down hat.

Um das Problem zu beheben, muss ich nach dem Booten die beiden Interfaces ens4d1 und ens5d1 manuell starten:

Code: Alles auswählen

ip link set up dev <interface>
Frage:
Warum wird das Interface bond0 nicht in den Status up gesetzt?
Wie kann die Ursache dieses Problems behoben werden?


THX

Benutzeravatar
unitra
Beiträge: 638
Registriert: 15.06.2002 21:09:38
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: 127.128.129.130

Re: bond0 bleibt im Status down nach reboot

Beitrag von unitra » 11.12.2019 02:07:57

Folgende Fragen:
* Kupfer oder Glas?
* Das Fehlverhalten ist das gleiche wenn man das physikalische Interface nur nimmt ens4d1 ohne bonding Modul?
* Passiert das gleiche wenn die MTU nicht eplizit gesetzt wird, also beim Standard MTU=1500 belassen wird?
* Unterstützen die Optiken/SFP's MTU 9000?
* Wie ist die Gegenseite konfiguriert?
* Ist auf dem Switch ebenfalls MTU 9000 konfiguriert?
* Schaue dir die Interface Statistiken von der Gegenseite (Switch)an (CRC Error/Frame Error/JumboFrames werden erkannt...)
* Ist auf der Gegenseite (Switch) ebenfalls ein bonding Interface konfiguriert?
* Bei konfiguriertem bond0 Interface die Ausgabe von

Code: Alles auswählen

 cat /proc/net/bonding/bond0 
anschauen.

Benutzeravatar
bluestar
Beiträge: 2333
Registriert: 26.10.2004 11:16:34
Wohnort: Rhein-Main-Gebiet

Re: bond0 bleibt im Status down nach reboot

Beitrag von bluestar » 13.12.2019 00:54:24

Wenn ich mir deine /etc/network/interfaces anschaue, dann sehe ich da die Probleme für jedes Slave Device fehlt die Zeile "auto DEV", die 9000er MTU per Slave würde ich im post-up per Slave setzen, das sollte dann in etwa so aussehen....

Code: Alles auswählen

auto ens4d1
iface ens4d1 inet manual
post-up ip link set dev $IFACE mtu 9000

auto ens5d1
iface ens5d1 inet manual
post-up ip link set dev $IFACE mtu 9000

auto bond0
iface bond0 inet static
        address  192.168.1.17
        netmask  255.255.255.224
        bond-slaves ens4d1 ens5d1
        bond-miimon 100
        bond-mode active-backup
        mtu 9000

Antworten