Frames
In short: The data unit at layer 2 (data link layer) of the OSI model — contains, among other things, the source and destination MAC addresses.
In more detail: An Ethernet frame encapsulates an IP packet for transmission in the local network and adds a checksum (footer) at the end for error detection. Damaged frames are discarded at this level, not repaired — retransmission is the job of higher layers (e.g. TCP).
In Depth
Nested encapsulation
Frames are the data unit of layer 2 of the OSI model — one level “below” the IP packets of layer 3. Encapsulation is strictly nested: an IP packet (with its own IP header) is packed completely as the payload into an Ethernet frame, which in turn adds its own MAC header and footer:
Ethernet frame
├── Ethernet header (destination/source MAC, EtherType)
├── IP packet
│ ├── IP header (destination/source IP)
│ └── TCP/UDP segment (own header + payload)
└── Frame check sequence (footer)
Each layer only sees its own level
This strict nesting means: every device along the transmission path initially only reads the information relevant to its own layer, not the complete content. A switch at layer 2 is interested exclusively in the MAC addresses in the frame header, not in the IP content inside — it forwards the frame based on its learning table without even looking at or understanding its contents. A router at layer 3, on the other hand, first has to “unpack” the received frame to get at the actual IP address, makes a routing decision based on this information, and then packs the unchanged IP packet into a completely NEW frame with new MAC addresses for the next network section — the original MAC addresses were only valid for the very first local network section between the sender and the first router and are set anew at every hop (every router traversed), while the IP addresses stay unchanged for the whole journey.
Error handling as a shared responsibility
Damaged frames are discarded directly at layer 2 based on the checksum in the footer, without any attempt at repair or feedback — recovering lost data is deliberately the job of higher layers such as TCP, which notice the missing content indirectly from ACKs that don’t arrive and trigger a retransmission. This division of labour is a direct example of the end-to-end principle: layer 2 only takes care of transmission over exactly one physical segment; reliable end-to-end transmission over the entire path, which potentially spans many intermediate stations, is the job of the endpoints.
Frame vs. packet vs. segment — clear terminology
In practice the terms “frame”, “packet” and “segment” are occasionally used loosely and interchangeably, but technically they refer to different OSI layers: frame (layer 2, Ethernet), packet (layer 3, IP) and segment (layer 4, TCP) or datagram (layer 4, UDP) — so on its way through the layers, a single piece of payload successively bears all three names, depending on the level being discussed.
See also: Packet, Ethernet, Header, MAC addresses