The ethtool
utility is the standard Linux tool for querying and controlling network interface parameters. To check your current NIC speed:
# Basic speed check
ethtool eth0
# Sample output:
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
If your NIC isn't automatically negotiating gigabit speed, you can manually set it:
# Set to 1000Mbps full duplex
sudo ethtool -s eth0 speed 1000 duplex full autoneg off
# Make settings persistent across reboots
echo 'ethtool -s eth0 speed 1000 duplex full autoneg off' | sudo tee /etc/network/if-up.d/eth0-speed
When troubleshooting speed problems, consider these factors:
- Cable quality (CAT5e or better for gigabit)
- Switch port capabilities
- Driver version (
ethtool -i eth0
shows driver info) - Kernel module parameters
For deeper analysis, try these commands:
# Check for errors that might affect speed
ethtool -S eth0
# Test actual throughput
iperf3 -c your.server.ip
# Monitor link statistics over time
watch -n 1 "ethtool eth0 | grep -E 'Speed|Duplex'"
Some NICs require special handling:
# For Intel NICs:
modinfo e1000e | grep parm
# Common parameter to tweak:
sudo modprobe e1000e InterruptThrottleRate=3000
When you install a new gigabit network interface card (NIC) in Linux, it's crucial to verify that it's actually operating at the expected speed. The ethtool
utility is the go-to tool for this purpose, offering detailed insights into your network interface's configuration and performance.
To check your NIC's current speed and duplex settings, run:
ethtool [interface_name]
For example, to check eth0:
ethtool eth0
This will display output similar to:
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
The key lines to look for are:
- Speed: Shows the current link speed (1000Mb/s for gigabit)
- Duplex: Should be Full for optimal performance
- Link detected: Confirms physical connection
To see what speeds your NIC supports:
ethtool -i [interface_name]
This displays driver information including supported features.
If you need to manually set the speed (not recommended unless necessary):
ethtool -s eth0 speed 1000 duplex full autoneg off
Note that forcing settings can cause connectivity issues if the other end doesn't match.
To make speed settings persistent across reboots, add to your network configuration. For systemd-networkd:
[Match]
Name=eth0
[Link]
Speed=1000
Duplex=full
AutoNegotiation=off
- If speed shows as unknown, check cable quality and switch port configuration
- Ensure both ends of the connection support the same speed
- Try different cables if experiencing intermittent issues
- Check dmesg for any NIC-related errors
You can also verify speed through:
cat /sys/class/net/eth0/speed
Or using iproute2:
ip -s link show eth0