Duplex, Autonegotiation, Wake-on-LAN, Energy Saving and Link Flow Control
How two Ethernet ports agree on speed and duplex, why a duplex mismatch half-works, what ethtool shows, how Wake-on-LAN magic packets wake a sleeping computer, how Energy-Efficient Ethernet saves power, and why PAUSE frames are rarely used except in data centers.
kvi5hnuCode Sprout team member16 min readOn this page
When you plug in an Ethernet cable, the two ends must agree on several things before any frame can cross: how fast to signal, whether both can send at once, and who drives the clock. Usually this happens in a fraction of a second, and nobody thinks about it. When it goes wrong, you get the most confusing kind of failure: a link that works, just badly. This article covers what happens below the frame format: duplex, autonegotiation, power management and Wake-on-LAN, and link-level flow control.
Half and full duplex
Early Ethernet was half duplex: on a shared cable only one station could send at a time, and collisions were part of normal operation (article 14). Once switches gave each station its own cable, both ends could transmit simultaneously on separate wire pairs or fibers. That's full duplex. In full duplex:
- Collision detection is turned off, because collisions can't happen.
- Each direction gets the full rate, so a 1 Gb/s full-duplex link carries 1 Gb/s each way.
- The cable length is no longer limited by collision timing, only by signal quality.
Half duplex survives in the standards for 10, 100 and 1000 Mb/s, but 1 Gb/s half duplex was practically never used, and faster Ethernet doesn't define it at all.
Autonegotiation
Autonegotiation, introduced with Fast Ethernet (802.3u) for twisted-pair links, lets two ports advertise what they can do and pick the best mode both support. Before a link comes up, each port sends bursts of pulses (fast link pulses) encoding its abilities: speeds, half or full duplex, and pause frame support. Both sides then choose the highest common mode by a fixed priority, for example 1000BASE-T full duplex over 100BASE-TX full over 100BASE-TX half, and so on down.
Some details that matter in practice:
- 1000BASE-T and faster copper require autonegotiation. Besides speed and duplex, the two ends must decide which one is clock master. Turning autonegotiation off on a gigabit copper port is a common mistake.
- Parallel detection. If one end negotiates and the other has a fixed speed, the negotiating end can still sense the speed from the signal. But it can't learn the duplex, so the standard says to assume half duplex. That rule is the source of most duplex mismatches, as you'll see next.
- Fiber is different. Most fiber links run at the fixed speed of their transceiver and negotiate little or nothing. High-speed copper cables (direct-attach cables at 25 Gb/s and above) use a separate negotiation that also agrees on forward error correction (FEC), codes that repair bit errors without resending.
- Auto MDI-X. (MDI, the medium dependent interface, is the port's wiring, and MDI-X is the crossed version.) Most ports also detect whether the cable is crossed and swap transmit and receive pairs themselves, so "crossover cables" are no longer needed.
What a port reports
On Linux, ethtool shows and changes these settings. Here it is on the lab's virtual Ethernet interface:
Settings for eth0:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Auto-negotiation: off
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: Unknown
Link detected: yes
This output is mostly a placeholder. A veth interface is software, so it has no supported link modes, no autonegotiation and no pause support, and its reported 10 Gb/s is a nominal value: real speed depends on the CPU. Asking it to change speed fails:
netlink error: Operation not supported
Duplex mismatch: a link that half works
A duplex mismatch happens when one end runs full duplex and the other half duplex. The classic recipe: someone hard-codes a switch port to 100 Mb/s full duplex and leaves the computer on autonegotiation. The computer gets no negotiation pulses, detects 100 Mb/s by parallel detection, and assumes half duplex, as the standard requires.

The link doesn't fail outright, which is what makes a mismatch hard to diagnose:
- Under light load it looks fine. A ping goes out, a reply comes back, and they rarely overlap.
- Under load, performance collapses. A bulk TCP transfer sends data one way and acknowledgments the other, so both ends transmit at once constantly. The half-duplex side treats every overlap as a collision, aborts its frame and backs off. The full-duplex side receives truncated frames and drops them as CRC errors (frames that fail the frame check sequence of article 14). Frames are lost in both directions, TCP retransmits and slows down, and throughput can fall to a small fraction of the link rate.
- The error counters give it away. The half-duplex side shows late collisions (collisions after the first 64 bytes, which never happen on a correctly working half-duplex network). The full-duplex side shows CRC errors and runts (frames shorter than 64 bytes).
The fix is simple: configure both ends the same way. Today that almost always means autonegotiation on both.
Wake-on-LAN, power saving and magic packets
Network cards can stay partly powered while a computer sleeps, watching incoming frames for a reason to wake it. Wake-on-LAN (WoL) is configured per interface. On Linux, ethtool -s eth0 wol g enables it, and ethtool eth0 reports it with one letter per wake-up trigger:
| Letter | Wake on... |
|---|---|
p | Any physical-layer activity |
u | Unicast frames addressed to this card |
m | Multicast frames |
b | Broadcast frames |
a | ARP requests |
g | A magic packet |
s | A magic packet with a SecureOn password |
d | Disabled |
Waking on any unicast or broadcast frame tends to wake the computer far too often, so the usual choice is g: wake only on a magic packet.
The magic packet
A magic packet is defined by a pattern, not by a protocol: 6 bytes of 0xFF followed by the target card's MAC address repeated 16 times, 102 bytes in all. The sleeping card doesn't parse IP or UDP. It just scans each frame's bytes for that pattern. In practice the pattern is usually sent as a UDP datagram to a broadcast address on port 9, so it reaches every port of the LAN, including the port of a computer whose IP address nobody remembers anymore.

The lab builds and sends one, the way tools such as wakeonlan or etherwake do:
sent a 102-byte magic packet for 02:00:00:00:0b:02 to 192.0.2.255 port 9
b's capture shows the frame, and a check of the payload confirms the pattern. The UDP length of 110 bytes is the 8-byte UDP header plus the 102-byte pattern:
frame 144 bytes, Ethernet dst ff:ff:ff:ff:ff:ff, IP dst 192.0.2.255, UDP port 9, UDP length 110 bytes
first 6 bytes: ff ff ff ff ff ff
then 16 copies of 02:00:00:00:0b:02 (all identical)
0000 ff ff ff ff ff ff 02 00 00 00 0a 01 08 00 45 00 ..............E.
0010 00 82 28 cf 40 00 40 11 8c 9b c0 00 02 01 c0 00 ..(.@.@.........
0020 02 ff de ad 00 09 00 6e 85 80 ff ff ff ff ff ff .......n........
0030 02 00 00 00 0b 02 02 00 00 00 0b 02 02 00 00 00 ................
0040 0b 02 02 00 00 00 0b 02 02 00 00 00 0b 02 02 00 ................
0050 00 00 0b 02 02 00 00 00 0b 02 02 00 00 00 0b 02 ................
0060 02 00 00 00 0b 02 02 00 00 00 0b 02 02 00 00 00 ................
0070 0b 02 02 00 00 00 0b 02 02 00 00 00 0b 02 02 00 ................
0080 00 00 0b 02 02 00 00 00 0b 02 02 00 00 00 0b 02 ................
The Ethernet destination is broadcast, and the UDP datagram goes to 192.0.2.255, the subnet's broadcast address. The payload starts at offset 0x2a (42, right after 14 + 20 + 8 bytes of headers) with ff ff ff ff ff ff, followed by 02 00 00 00 0b 02 again and again. A frame from a to the broadcast address is 144 bytes in the capture: 14 (Ethernet) + 20 (IPv4) + 8 (UDP) + 102.
Energy-Efficient Ethernet
Energy-Efficient Ethernet (EEE, 802.3az) saves power while the link is up but idle. Instead of signaling continuously, both ends agree to enter a low power idle state between bursts of frames and wake up within microseconds when there's something to send. It's negotiated by autonegotiation and is common on gigabit copper ports. The cost is a few microseconds of extra latency when the link wakes, which almost never matters. A few devices have been known to drop the link or delay packets with EEE enabled, which is why switches and cards let you turn it off (ethtool --set-eee).
Link-layer flow control: PAUSE frames
A switch has finite buffer memory. If several ports send to one output port faster than it can transmit (output port contention), the switch queues frames and eventually drops them. Ethernet has a way for a receiver to say "stop sending for a moment": the PAUSE frame, from 802.3x.
A PAUSE frame is a MAC control frame: EtherType 0x8808, sent to the reserved multicast address 01:80:c2:00:00:01, with opcode 0x0001 and a 16-bit pause time. A port that receives one stops sending (except other control frames) for that long. A PAUSE with time 0 resumes sending at once. PAUSE frames work only on full-duplex links, and they're never forwarded: they act on one link only.
The pause time is measured in quanta of 512 bit times, so the same value means a shorter pause on a faster link. The lab computed the longest possible pause at common speeds. For example, at 1 Gb/s one bit takes 1 ns, so a quantum is 512 ns, and the 16-bit maximum of 65,535 quanta is 65,535 × 512 ns ≈ 33.55 ms:
link speed one quantum maximum pause (65535 quanta)
100 Mb/s 5.12 µs 335.539 ms
1 Gb/s 512.00 ns 33.554 ms
10 Gb/s 51.20 ns 3.355 ms
25 Gb/s 20.48 ns 1.342 ms
100 Gb/s 5.12 ns 0.336 ms
400 Gb/s 1.28 ns 0.084 ms

The lab also sent a PAUSE frame, and a newer per-priority variant explained below, and decoded them from the capture:
MAC Control
Opcode: Pause (0x0001)
pause_time: 65535
MAC Control
Opcode: Class Based Flow Control [CBFC] Pause (0x0101)
CBFC Class Enable Vector: 0x0008, C3
.... .... .... ...0 = C0: False
.... .... .... ..0. = C1: False
.... .... .... .0.. = C2: False
.... .... .... 1... = C3: True
.... .... ...0 .... = C4: False
.... .... ..0. .... = C5: False
.... .... .0.. .... = C6: False
.... .... 0... .... = C7: False
CBFC Class Pause Times
C0: 0
C1: 0
C2: 0
C3: 4096
C4: 0
C5: 0
C6: 0
C7: 0
Why plain PAUSE is usually turned off
PAUSE stops all traffic on a link, whoever caused the congestion. If a switch is short of buffer space because of one busy output port, pausing an input link also stops that link's traffic to every other, uncongested port. Pauses can then spread from switch to switch, and one slow device can freeze large parts of the network (head-of-line blocking and congestion spreading). The switch also can't tell which senders are responsible, so innocent senders get paused too. For ordinary IP traffic it's usually better to let the switch drop frames and let TCP's congestion control slow the real senders down (article 72). Many switches ignore or disable PAUSE by default. On Linux, ethtool -a eth0 shows the pause settings and ethtool -A eth0 rx off tx off turns them off.
Priority-based flow control in data centers
Some data center traffic must not be dropped at all, especially RDMA over Converged Ethernet (RoCE), which storage and AI clusters use. RDMA (remote direct memory access) lets one computer write straight into another's memory, and it assumes the network doesn't drop frames. For this, 802.1Qbb priority-based flow control (PFC) pauses one priority class at a time. It uses the same MAC control frame with opcode 0x0101, a bit vector of classes to pause, and a separate time for each of the eight priorities. The lab's second frame paused only class 3: its class enable vector 0x0008 is binary 1000, so only bit 3 is set, and only C3 has a nonzero pause time (4096 quanta). PFC makes a "lossless" class possible without stopping everything else, but it needs careful tuning to avoid the same spreading pauses, and deadlocks, within that class. Because of that, newer AI-cluster designs try to depend on PFC less: the Ultra Ethernet Consortium's 1.0 specification (June 2025), for example, defines a transport that recovers from loss itself, so it doesn't require a lossless fabric.
Common questions
Should I hard-code speed and duplex for stability?
No, not on modern equipment. Leave autonegotiation on at both ends. Hard-coding one end is what causes duplex mismatches, and gigabit copper requires autonegotiation anyway. The rare exception is a known incompatible old device, and then you must set both ends identically.
My gigabit port connected at 100 Mb/s. Why?
Gigabit over copper needs all four wire pairs, while 100 Mb/s needs only two. A damaged cable, a bad connector or a cable with only two pairs makes autonegotiation fall back to 100 Mb/s. Check ethtool (Speed), replace the cable and look at both ends' error counters.
How can I tell if a link has a duplex mismatch?
Throughput is good for small requests but terrible for large transfers, and the error counters rise in a typical pattern: late collisions on one side, CRC errors and runts on the other. Compare the speed and duplex each end reports (ethtool on Linux, the switch's interface status).
Does Wake-on-LAN work over the Internet?
Not directly. A magic packet is usually sent as a broadcast on the local LAN, and routers don't forward broadcasts. To wake a machine remotely, you send the packet from something already on that LAN, such as a router or a small always-on computer, or configure the router to forward a specific UDP port to the LAN's broadcast address, which carries some security risk.
Is Wake-on-LAN a security risk?
A magic packet has no authentication: anyone on the LAN who knows a MAC address can wake that computer. That rarely matters, since waking a computer doesn't log anyone in. The SecureOn password option adds a weak shared secret. Wake-up on any packet type (u, b, a) mostly causes unwanted wake-ups rather than security problems.
Do I need PAUSE frames to avoid packet loss?
For normal TCP/IP traffic, no. TCP recovers from losses and adjusts its rate, and plain PAUSE often hurts more than it helps. Lossless Ethernet with PFC is needed only for specific protocols such as RoCE, and then the whole data center network is designed for it.
Why does ethtool show 10000Mb/s on a container or VM interface?
Virtual interfaces such as veth, tun and many virtual machine network cards (NICs) aren't real signals on a wire. They report a fixed nominal speed, or none at all, and their actual throughput depends on the CPU and the host. Ignore the reported speed for them.
Summary
- Full duplex lets both ends of a switched link send at once without collisions. Half duplex is a legacy mode, and faster Ethernet doesn't support it.
- Autonegotiation exchanges abilities and picks the best common speed and duplex. Gigabit copper requires it. If only one end negotiates, parallel detection assumes half duplex.
- A duplex mismatch half works: fine under light load, heavy losses under two-way load, with late collisions on one side and CRC errors and runts on the other. Fix it by setting both ends the same, normally to autonegotiation.
ethtool(Linux), the adapter's Advanced tab or PowerShell (Windows), andnetworksetup(macOS) show link settings. Virtual interfaces report placeholder values.- Wake-on-LAN wakes a sleeping computer when its card sees a trigger, usually a magic packet: 6 bytes of
0xFFplus the MAC address 16 times, typically in a broadcast UDP datagram to port 9. - Energy-Efficient Ethernet idles the link between frames to save power.
- PAUSE frames (802.3x, EtherType
0x8808, opcode 1, to01:80:c2:00:00:01) stop all traffic on one link for up to 65535 quanta of 512 bit times. Because they cause congestion spreading, they're usually disabled. Data centers use per-priority PFC (802.1Qbb) for lossless traffic such as RoCE.
Practice questions
1. A server's port is set to 1000 Mb/s full duplex with autonegotiation off, and the switch port is on autonegotiation. What is likely to happen?
Answer
1000BASE-T requires autonegotiation (it also decides which end is clock master), so the link may not come up at all, or the switch may fall back to a lower speed it can detect. If it ends up at 10 or 100 Mb/s by parallel detection, the switch also assumes half duplex, which gives a duplex mismatch. The fix is to enable autonegotiation on the server.
2. Users report that web pages load fine but large file downloads from one server crawl. The server's switch port shows many CRC errors and runts, and the server shows late collisions. What's wrong?
Answer
A duplex mismatch: the server's interface is in half duplex and the switch port in full duplex. Small transfers rarely make both sides send at once, but bulk transfers with their acknowledgments overlap constantly, causing aborted frames and drops. Set both ends to autonegotiation (or both to the same fixed mode) and the errors stop.
3. How long does a PAUSE frame with a pause time of 1000 quanta stop a 10 Gb/s sender?
Answer
One quantum is 512 bit times, which at 10 Gb/s is 512 / 10¹⁰ s = 51.2 ns. 1000 quanta are 51.2 µs.
4. Write out the first 18 bytes of the magic packet payload for MAC address 02:5e:00:aa:bb:cc.
Answer
ff ff ff ff ff ff 02 5e 00 aa bb cc 02 5e 00 aa bb cc: six bytes of 0xFF, then the first two of the 16 copies of the MAC address. The full payload is 6 + 16 × 6 = 102 bytes.
5. Why are PAUSE frames sent to 01:80:c2:00:00:01 rather than to the other port's MAC address, and why don't switches forward them?
Answer
01:80:c2:00:00:01 is a reserved multicast address that every MAC control layer listens on, so the sender doesn't need to know the peer's address. Addresses in the 01:80:c2:00:00:0x block are reserved for link-local protocols that bridges must not forward. A PAUSE is a request to the device at the other end of one cable, and forwarding it would pause the wrong links.
6. What does Wake-on: g mean in ethtool output, and what letter would make the computer wake for any broadcast frame?
Answer
g means the card wakes the computer only when it receives a magic packet. Broadcast wake-up is b, which would wake it for every ARP request and other broadcast on the LAN, usually far too often.
Previous: VLANs, Priority Tagging and Link Aggregation
Next: Bridges and Switches: MAC Learning, Spanning Tree and Its Successors

More in TCP/IP Course
Quiz: TCP/IP Delicate Details
Twenty-five questions on the details that catch out experienced engineers: sequence numbers for SYN and FIN, TIME_WAIT versus tcp_fin_timeout, Karn's algorithm, socket buffer doubling, even and odd ephemeral ports, IPv6 checksums and fragmentation, negative DNS caching, and capture filter traps.
Quiz: TCP/IP Interview Questions
Thirty-three networking questions of the kind asked in developer, SRE and network engineering interviews: what happens when you load a URL, TCP versus UDP, handshakes, closing and TIME_WAIT, subnetting, NAT, DNS, MTU problems, congestion, TLS and QUIC, and debugging slow or failing connections.
Quiz: TCP/IP Course Final Exam (All Parts)
The final exam for the TCP/IP course: thirty questions across all fourteen parts, from packets and addressing through Ethernet, ARP, IP, DHCP, NAT, ICMP, UDP, DNS, TCP connections, reliability, congestion control, security, QUIC and troubleshooting.
Quiz: Modern Transports and Troubleshooting (TCP/IP Part 14)
Review modern transports and troubleshooting: QUIC packets, handshakes, 0-RTT, streams and connection migration, HTTP/3, Multipath TCP, SCTP multihoming, and a layered method for diagnosing real network faults.
Discussion
Sign in to ask a question or share what you learned.