Read what the NIC knows about the cable
Task
Use the interface itself as a cable diagnostic. A modern NIC reports negotiated speed, duplex, and on many chipsets the result of a built-in cable test that reports the distance to a fault. Before you buy a tester, find out what you already have.
Steps
- Find the interface name:
ip -br link show. It will be something likeenp3s0oreth0, notwlan0— this lab needs copper. - Read what was negotiated:
sudo ethtool enp3s0. Note Speed, Duplex, Port, and whether auto-negotiation is on. - Note the "Supported link modes" list. That is what the NIC can do; "Speed" is what it agreed with the switch. A gigabit NIC showing 100 Mbps means either the switch, the cable, or the negotiation is the limit.
- If the driver supports it, run the built-in cable test:
sudo ethtool --cable-test enp3s0, then read the result withsudo ethtool --show-cable-test enp3s0or watch for the kernel message. It reports each pair as OK, open, short, or with a distance to a fault. - Work out, from the lesson's table, the maximum run length for the category of cable you are using and the speed you negotiated.
Verify
sudo ethtool enp3s0 | grep -E "Speed|Duplex|Auto-negotiation|Port"
python3 -c "lim={'Cat5e':(100,'1 Gbps'),'Cat6':(55,'10 Gbps'),'Cat6a':(100,'10 Gbps'),'Cat7':(100,'10 Gbps')};[print(k,v[0],'m for',v[1]) for k,v in lim.items()]"
Speed and Duplex must both be reported, and Duplex must say Full. Half duplex on a switched link in 2026 means auto-negotiation failed, and that is the duplex mismatch lesson 40 diagnoses.
Notes
The Cat 6 line in that table is the one people get wrong: Cat 6 is 100 m at 1 Gbps but only 55 m at 10 Gbps. Cat 6a is what gives you 100 m at 10 Gbps, and the difference is the extra shielding against alien crosstalk.
ethtool -S enp3s0 dumps the error counters. Those are the CRC errors, runts and giants from domain 5 — worth looking at now so they are familiar later.