Ethernet: Frames, Shared-Medium History, and Modern Full-Duplex Links
From a Shared Bus to Switches
Ethernet appeared in the mid-1970s and is today's most widely used wired LAN technology. The original Ethernet used a coaxial cable as a bus to which every node was attached: exactly the shared-medium network of the previous section. Any frame a node sent was received by all the others, and nodes coordinated their transmissions with CSMA/CD.
In the 1990s, Ethernet moved to twisted-pair cables in a star topology with a hub at the center. A hub is a physical-layer device that repeats the bits received on one interface out of all its other interfaces, so the network is still logically one shared "bus", and collisions still happen.
Today, the center of the star is almost always a switch. A switch is a link-layer device that stores and forwards whole frames, and it forwards a frame only out of the interface leading to its destination.
Non-Shared-Medium Networks
In a non-shared-medium network, every station connects directly to a switch, and the switch forwards the frames. Such networks generally use full-duplex communication.
Suppose A sends data whose destination address is B. The switch forwards the data to station B.
Because each link connects just one node and one switch interface, and both directions can transmit at the same time, collisions cannot happen on the link at all, so CSMA/CD is no longer needed. While A sends to B, C can send to D, and the switch forwards both frames independently.
The Ethernet Frame
Whatever the physical medium and the rate, the Ethernet frame format has stayed essentially the same for decades:
| Field | Length | Purpose |
|---|---|---|
| Preamble + SFD | 8 bytes | Seven bytes of 10101010 synchronize the receiver's clock with the sender's; the last byte 10101011 (the start frame delimiter) announces that the frame begins |
| Destination MAC address | 6 bytes | A receiving adapter accepts only frames addressed to itself or to the broadcast address and discards the rest |
| Source MAC address | 6 bytes | The MAC address of the sending adapter |
| Type | 2 bytes | Names the network-layer protocol of the data, such as 0x0800 for IPv4, 0x86DD for IPv6, and 0x0806 for ARP, so the receiver can demultiplex |
| Data | 46–1500 bytes | Carries the network-layer datagram; 1500 bytes is the Ethernet MTU, and data shorter than 46 bytes is padded |
| CRC | 4 bytes | A CRC-32 checksum; the receiver silently drops a frame that fails it |
Ethernet offers a connectionless, unreliable service: there is no handshake before sending, and frames that fail the CRC check are simply dropped, with neither acknowledgment nor retransmission. When reliable transfer is needed, TCP in a higher layer detects the loss and retransmits.
Build an Ethernet frame and watch the receivers filter it
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
CSMA/CD and Binary Exponential Backoff
On shared-medium Ethernet, an adapter sends frames following the CSMA/CD rules:
- The adapter receives a datagram from the network layer and encapsulates it in a frame.
- It senses the channel. If the channel is idle, it starts transmitting; if busy, it waits until the channel becomes idle and then transmits.
- It keeps monitoring the channel while transmitting. If it sends the whole frame without detecting another signal, the frame has been sent successfully.
- If it detects a collision, it stops transmitting at once and sends a 48-bit jam signal to make sure every node knows about the collision.
- After aborting, it enters binary exponential backoff: after the -th collision it chooses at random from , where , waits bit times, and returns to step 2. It gives up after 16 consecutive failures.
More collisions suggest more competing nodes, so the range of waiting times doubles each time and quickly lowers the chance of another collision; with few competitors, the waits stay short.
The minimum frame size also comes from CSMA/CD: transmitting a minimum frame (64 bytes, or 512 bits) must take at least as long as a signal's round trip across the network, so the sender is still transmitting, and is sure to detect the collision, whenever one happens.
Play the binary exponential backoff game
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
Ethernet Standards
There are many Ethernet standards, and their names often take the form "rate + BASE + medium": BASE means baseband transmission, T means twisted pair, and F, SX, LR and so on denote fiber.
| Standard | Rate | Medium |
|---|---|---|
| 10BASE-T | 10 Mbps | Twisted pair |
| 100BASE-TX | 100 Mbps | Twisted pair |
| 1000BASE-T | 1 Gbps | Twisted pair |
| 10GBASE-T / 10GBASE-LR | 10 Gbps | Twisted pair / single-mode fiber |
| 40GBASE, 100GBASE | 40–100 Gbps | Mostly fiber, used in data centers |
The rate has grown by orders of magnitude, but the frame format has not changed, so the upper layers never notice the change in the underlying link. Modern switched Ethernet runs in full-duplex mode, and CSMA/CD is kept only for compatibility.
Ethernet overhead, frame rate, and timing
Count the 8-byte preamble/SFD, 14-byte header, 4-byte CRC and 12-byte inter-frame gap as overhead.
- What fraction of the wire time carries data when each frame holds 1500, 46, or 10 bytes of data?
- How many maximum-size frames, and how many minimum-size frames, can a 1 Gbps link carry per second?
- On 10 Mbps shared Ethernet, the 64-byte (512-bit) minimum frame must last at least one round-trip propagation delay. With a signal speed of 2 × 10⁸ m/s, what is the maximum cable length?
- On 100 Mbps Ethernet, what is the longest backoff after the 4th collision?
Parse an Ethernet header in Python
The bytes below are an Ethernet frame without preamble and CRC. Write Python that extracts the destination and source MAC addresses (as AA:BB:… strings), names the type (IPv4 0x0800, IPv6 0x86DD, ARP 0x0806), reports whether it is a broadcast, and computes the padding and the efficiency on the wire (preamble 8 + header 14 + data + padding + CRC 4 + gap 12).
ffffffffffff 0800200a8c6d 0806 0001080006040001 0800200a8c6d c0a80105 000000000000 c0a80101