How does speed and duplex autonegotiation work, and should you hard-code it?
Show the answer
Say this first
On copper, both sides send bursts of link pulses that advertise their abilities, and they pick the best common mode: highest speed, full duplex if both support it. If one side is hard-coded, it stops negotiating. The other side can still detect the speed from the signal (parallel detection) but cannot learn the duplex, so at 10 or 100 Mbps it falls back to half duplex. My rule: leave both ends on auto, or hard-code both ends to the same values. Never mix.
Go deeper
Reading the result on Cisco
SW1# show interfaces status
Port Name Status Vlan Duplex Speed Type
Gi1/0/1 PC-101 connected 10 a-full a-1000 10/100/1000BaseTX
Gi1/0/2 OLD-PRINTER connected 10 half 100 10/100/1000BaseTXThe a- prefix means the value was negotiated. No prefix means it was hard-coded.
Configuring
interface GigabitEthernet1/0/2
speed 100
duplex fullIf you do this, configure the far end the same way.
Why auto is the modern default
Hard-coding was common in the 1990s when early autonegotiation was buggy. Today autonegotiation is reliable, required for 1000BASE-T, and hard-coding one side is the main way people create duplex mismatches.
They will ask next
What happens if one side is fixed at 100 full and the other is on auto?
The auto side sees no negotiation, detects 100 Mbps from the signal, and falls back to half duplex. You get a duplex mismatch: 100 full on one end, 100 half on the other.
Is there autonegotiation on fiber?
1000BASE-X has its own autonegotiation that agrees duplex and flow control, not speed. 10G optics have no autonegotiation. The speed is set by the optic.
Traps
- Hard-coding one end only. That is the textbook way to cause a duplex mismatch.