Skip to main content

What is a frame?

A frame is the unit of data transmission at the data link layer (L2). It is data packaged according to the rules of the data link layer so it can be transmitted within a single network.

Simply put: a frame is an "envelope" in which the data link layer places data and writes who it is from and who it is going to.


Why a frame is needed

The physical layer can only transmit bits (0 and 1). A frame is needed to:

  • know where the data starts and where it ends
  • indicate who the data is intended for
  • check whether it got corrupted along the way

What a frame consists of (using Ethernet as an example)

A typical frame contains:

  1. Destination MAC address who the frame is sent to
  2. Source MAC address who sent the frame
  3. Data type what is inside (for example, an IP packet)
  4. Payload higher-level data (usually an IP packet)
  5. Checksum (FCS) error check

What is inside a frame

Inside a frame there is usually:

  • a network-layer packet (IP packet)

The data link layer does not analyze this packet: it simply carries it.


An important distinction for an interview

  • Bit - physical layer
  • Frame - data link layer
  • Packet - network layer

A very common mistake is confusing a frame with a packet.


Where a frame "lives"

  • a frame exists only within a single local network
  • when passing through a router:
    • the old frame is discarded
    • a new frame is created for the next network

Simple analogy

Mail:

  • a frame is a box with addresses
  • an IP packet is the letter inside
  • the road is the physical layer

Short answer for an interview

A frame is a data-link-layer unit of data that contains MAC addresses, service information, and a payload, and is used to transmit data within a single network.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.