Je viens de tester une VM Debian 12 sur KVM, interface réseau en NAT (virtio), les vitesses sont correctes (900/500Mbps). Ça vaudrait peut-être le coup de tester en NAT ?
Ces VMs servent de simulation de machine normale (physiques). Utiliser le NAT va avoir des impact sur les éléments de sécurités utilisés, au niveau système, au niveau réseau, le DHCP, etc…
Après un tests:
NAT avec des débits de 1500 Mbps donc c’est bon.
Pont des débits pathétiques ne dépassant pas les 5Mbps
Ces VMs fonctionnaient correctement avant mon changement de FAI.
J’en ai réinstallé une pour voir, et c’est la même chose.
Qu’est ce qui pourrait avoir affecté leur fonctionnement?
J’ajoute une précision:
Sur le PC Host, j’ai changé d’interface, je suis passé de l’interface 2,5G à l’interface 10G pour pouvoir bénéficier des 8G de mon nouvel abonnement FAI.
Est ce que mon interface 10G pourrait être à l’origine de ce problème?
Et comment est-ce que je fais pour trouver ce qu’il faudrait modifier ou la trace de ce problème? (je vais commencer par éplucher dmesg)
Ok je confirme c’est le changement d’interface qui est responsable.
L’interface 10G ne se comporte pas de la même que mon interface 2,5G.
Ne me reste plus qu’à trouver pourquoi, et finalement je trouve ça: TCP: enp13s0: Driver has suspect GRO implementation, TCP performance may be compromised.
J’ai trouvé.
Il faut desactiver l’option large-receive-offload et activer generic-receive-offload et ça marche correctement.
Pour le faire, il faut utiliser ethtool:ml
Avant:
~# ethtool -k enp13s0
Features for enp13s0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: on
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: on
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: on
receive-hashing: on
highdma: off [fixed]
rx-vlan-filter: on
vlan-challenged: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: on
tx-tunnel-remcsum-segmentation: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: on
tx-gso-list: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: on
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
rx-gro-list: off
macsec-hw-offload: off [fixed]~# ethtool -k enp13s0
Features for enp13s0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: on
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: on
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: on
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: on
receive-hashing: on
highdma: off [fixed]
rx-vlan-filter: on
vlan-challenged: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: on
tx-tunnel-remcsum-segmentation: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: on
tx-gso-list: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: on
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
rx-gro-list: off
macsec-hw-offload: off [fixed]
rx-udp-gro-forwarding: off
hsr-tag-ins-offload: off [fixed]
hsr-tag-rm-offload: off [fixed]
hsr-fwd-offload: off [fixed]
hsr-dup-offload: off [fixed]
rx-udp-gro-forwarding: off
hsr-tag-ins-offload: off [fixed]
hsr-tag-rm-offload: off [fixed]
hsr-fwd-offload: off [fixed]
hsr-dup-offload: off [fixed]
On met les bonnes valeurs:
/sbin/ethtool -K enp13s0 generic-receive-offload on
/sbin/ethtool -K enp13s0 large-receive-offload off
Au cas où je met les deux pour être sûr.
Comme j’utilise NetworkManager, je vais mettre un script pour NetworkManager-dispatcher:
vim /etc/NetworkManager/dispatcher.d/10-enp03s0
Avec le contenu:
#!/bin/sh
if [ "$1" = "enp13s0" ] && [ "$2" = "up" ]; then
printf '%s\n' " NetworkManager dispatcher 10-enp13s0 \$1=$1 - \$2=$2"
/sbin/ethtool -K enp13s0 generic-receive-offload on
/sbin/ethtool -K enp13s0 large-receive-offload off
else
printf '%s\n' " Echec 10-enp13s0 dispatcher: \$1=$1 - \$2=$2"
fi
EDIT: J’ai modifié le script pour le passer en /bin/sh au lieu de /bin/bash, corrigé une type dans la 2ème option et ajouter de qhoi pouvoir débugger le cas échéant