Half and full duplex
Full duplex means a port can send and receive at the same time, like a phone call. Half duplex means only one side can talk at a time, like a walkie-talkie: if both send at once the frames collide and must be sent again. Old hubs needed half duplex; switch ports today use full duplex.
Autonegotiation
When both ends are set to speed auto and duplex auto (the default) they agree on the fastest speed they both support, at full duplex. The problems start when one end is set by hand:
| End A | End B | Result |
|---|---|---|
| auto | auto | Best common speed, full duplex. Good. |
| 100 / full (forced) | 100 / full (forced) | Works, as long as both match. |
| 100 / full (forced) | auto | B can still sense the speed (100) but gets no duplex answer, so it falls back to half duplex. Duplex mismatch! |
| 100 (forced) | 1000 (forced) | Speed mismatch: the link stays down. |
Remember: If a negotiating port gets no answer, it guesses: the speed it can sense, and half duplex at 10 or 100 Mb/s (full at 1 Gb/s). Forcing only one end is the classic way to cause a duplex mismatch.
What a mismatch looks like
The router below was forced to 100 Mb/s full duplex, but the switch port was left on auto. The link comes up, which makes the mismatch easy to miss, but the switch shows a-half ("auto-negotiated half") and pings lose packets:
In NetLab
▶ SW1 SW1>enable SW1#show interfaces status | include Port|Fa0/24 Port Name Status Vlan Duplex Speed Type Fa0/24 connected 1 a-half a-100 10/100BaseTX ▶ R1 R1>enable R1#ping 192.168.1.10 repeat 20 Type escape sequence to abort. Sending 20, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds: ..!!.!!.!..!!..!!.!. Success rate is 50 percent (10/20), round-trip min/avg/max = 1/1/1 ms
Look at the counters on both sides. The half-duplex switch port sees late collisions; the full-duplex router port receives broken frames: CRC errors and runts:
In NetLab
▶ R1 R1>enable R1#ping 192.168.1.10 repeat 20 Type escape sequence to abort. Sending 20, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds: ..!!.!!.!..!!..!!.!. Success rate is 50 percent (10/20), round-trip min/avg/max = 1/1/1 ms R1#show interfaces g0/0 | include Duplex|runts|CRC Full Duplex, 100Mbps, media type is RJ45 9 runts, 0 giants, 0 throttles 9 input errors, 9 CRC, 0 frame, 0 overrun, 0 ignored ▶ SW1 SW1>enable SW1#show interfaces fa0/24 | include duplex|collision Half-duplex, 100Mb/s, media type is 10/100BaseTX 9 output errors, 9 collisions, 0 interface resets 0 babbles, 9 late collision, 0 deferred
The fix
Make both ends agree. The cleanest fix is to put the forced end back to auto, so both negotiate:
In NetLab
▶ R1 R1>enable R1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R1(config)#interface g0/0 R1(config-if)#speed auto R1(config-if)#duplex auto R1(config-if)#end *Mar 1 00:00:06.000: %SYS-5-CONFIG_I: Configured from console by console ▶ SW1 SW1>show interfaces status | include Port|Fa0/24 Port Name Status Vlan Duplex Speed Type Fa0/24 connected 1 a-full a-100 10/100BaseTX ▶ R1 R1#ping 192.168.1.10 repeat 20 Type escape sequence to abort. Sending 20, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds: .!!!!!!!!!!!!!!!!!!! Success rate is 95 percent (19/20), round-trip min/avg/max = 1/1/1 ms
Tip: Either leave both ends on auto, or set speed and duplex by hand on both ends. Never just one.