← Module 02 · Layer 2: Data Link

Ethernet Frame & MAC Addressing

The actual envelope a switch reads. Every Layer 2 decision in this whole module comes down to a handful of fields in this one structure.

What a switch actually looks at

A switch never opens an IP (Internet Protocol) packet or reads a URL (Uniform Resource Locator). It reads exactly one thing: the Ethernet frame wrapped around whatever payload it's carrying, and mostly just two fields inside it, the source and destination MAC (Media Access Control) addresses. Think of a frame like an internal office courier envelope: it doesn't matter what department wrote the memo inside, the courier only reads "to desk 14B, from desk 3A" on the outside and moves on.

MAC address structure

A MAC address is 48 bits, written as six hex byte pairs like 3C:5A:B4:02:9F:E1. It's burned into (or configured on) a network interface and is meant to be globally unique.

Preamble Destination MAC Source MAC Type / Length Payload (data) FCS (CRC) 7B + 1B SFD 6 bytes 6 bytes 2 bytes 46–1500 bytes 4 bytes A switch reads Destination MAC to decide the output port, and learns Source MAC to build its MAC table.
The Ethernet II frame. Everything a switch does comes down to reading two of these fields.

The two fields that actually matter

HOW A SWITCH LEARNS, IN ONE SENTENCE

Every incoming frame teaches the switch one new fact (source MAC → this port) and asks it one question (destination MAC → which port). That's the entire MAC-learning and forwarding process this whole module builds on.