Bonjour à toutes et à tous,
Avec les temps actuels, j’en profite pour « optimiser » et faire des tests.
Le thème - en ce moment - est le bonding (j’ai 3 postes avec prises réseaux chacun), et maintenant au tour de DEBIAN.
Mais là, je bloque un peu. Le bonding ne fonctionne pas.
Voici le fichier de config /etc/network/interfaces
:
cat /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto bond0
iface bond0 inet dhcp
hwaddress 4a:48:c0:e2:f2:92
bond-slaves enp2s0 enp3s0
bond-mode 0
bond-miimon 100
et le fichier de config /etc/modprobe.d/bonding.conf
:
alias bond0 bondig
options bond0 mode=0 miimon=100 max_bonds=1
Les différentes manips effectuées (toutes en root) :
apt-get install ifenslave
systemctl stop dhcpcd.service && disable dhcpcd.service
systemctl stop systemd-networkd-wait-online.service && systemctl disable systemd-networkd-wait-online.service
systemctl stop systemd-networkd.service && systemctl disable systemd-networkd.service
systemctl stop systemd-networkd.socket && systemctl disable systemd-networkd.socket
modprobe bond0
ifconfig enp2s0 down
ifconfig enp3s0 down
ip addr flush dev enp2s0
ip addr flush dev enp3s0
ifconfig bond0 hw ether 4a:48:c0:e2:f2:92 netmask 255.255.255.0 broadcast 192.168.2.255 up
ifenslave bond0 enp2s0
ifenslave bond0 enp3s0
dhcpd bond0
reboot
Mais le bonding ne fonctionne pas. Un # ifconfig
me le confirme :
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST> mtu 1500
inet 192.168.2.20 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::4848:c0ff:fee2:f292 prefixlen 64 scopeid 0x20<link>
ether 4a:48:c0:e2:f2:92 txqueuelen 1000 (Ethernet)
RX packets 590 bytes 64717 (63.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 435 bytes 45306 (44.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.114 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::749c:71c:95ae:fcb2 prefixlen 64 scopeid 0x20<link>
ether 00:25:90:e2:62:92 txqueuelen 1000 (Ethernet)
RX packets 381 bytes 35573 (34.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 233 bytes 24205 (23.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xfb5e0000-fb600000
enp3s0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
inet 192.168.2.20 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::4848:c0ff:fee2:f292 prefixlen 64 scopeid 0x20<link>
ether 4a:48:c0:e2:f2:92 txqueuelen 1000 (Ethernet)
RX packets 568 bytes 61454 (60.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 412 bytes 42061 (41.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 memory 0xfb6e0000-fb700000
enx803f5d150d8d: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 80:3f:5d:15:0d:8d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Boucle locale)
RX packets 27 bytes 2021 (1.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 27 bytes 2021 (1.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
L’interface enx803f5d150d8d
est juste une RJ45 sur une rallonge USB.
Comme on peut le constater, enp2s0
est bien en slave, mais pas enp3s0
. Pourtant, j’ai bien mentionné les 2 lors de la configuration.
Et un # ifenslave -a
me donne la même info :
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 00:25:90:e2:62:92 brd ff:ff:ff:ff:ff:ff
3: enp3s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
link/ether 4a:48:c0:e2:f2:92 brd ff:ff:ff:ff:ff:ff
4: enx803f5d150d8d: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 80:3f:5d:15:0d:8d brd ff:ff:ff:ff:ff:ff
5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 4a:48:c0:e2:f2:92 brd ff:ff:ff:ff:ff:ff
Juste pour info # cat /proc/net/bonding/bond0
:
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: enp3s0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:25:90:e2:62:93
Slave queue ID: 0
Auriez-vous une idée ou 2 ?