ethernet-10gbe-ping-test.sh

LattePanda Sigma 2: Intel Core Ultra X7 358H Single-Board Server · File : ethernet-10gbe-ping-test.sh · Language : Bash · Use case : Vérifier la connectivité et la latence sur les ports Ethernet 10GbE Realtek RTL8127.

Network diagnostic script to test stability and latency of 10 Gigabit Ethernet interfaces.

This script uses ping with large packets to detect fragmentation or packet loss issues on the 10GbE link. It also checks for iperf3 for more accurate throughput tests. Ensure the Realtek driver is correctly loaded in the Ubuntu 26.04 kernel. The network interface must be configured with a static or DHCP IP address.

ethernet-10gbe-ping-test.sh

#!/bin/bash
# Test de latence et de perte de paquets sur l'interface 10GbE
# Remplacez 'enp1s0' par le nom réel de votre interface (vérifier avec 'ip link')

IFACE="enp1s0"
TARGET="192.168.1.1" # IP de la passerelle ou d'un autre nœud du réseau

echo "Vérification de l'interface $IFACE..."
ip link show $IFACE

echo "Test Ping (100 paquets, taille 1472 octets pour tester le MTU 1500)..."
ping -c 100 -s 1472 -I $IFACE $TARGET

echo "Test de débit simple avec iperf3 (si installé)"
# Pour le serveur : iperf3 -s
# Pour le client : iperf3 -c TARGET_IP -i 1
if command -v iperf3 &> /dev/null; then
    echo "iperf3 est disponible. Utilisez 'iperf3 -c $TARGET' pour un test de débit complet."
else
    echo "iperf3 non installé. Installez-le avec 'sudo apt install iperf3'."
fi

← Back to the board