Skip to main content

What is the MAC sublayer?

The MAC sublayer (Medium Access Control) is the lower part of the data link layer, responsible for access to the transmission medium and MAC addressing.

Simply put: MAC decides who can transmit data over the shared medium, and when, and who exactly it is addressed to.


Where the MAC sublayer sits

The data link layer is divided into two sublayers:

  • LLC (Logical Link Control) - upper
  • MAC (Medium Access Control) - lower, this is it

MAC is closest to the physical layer and interacts with it directly.


Main tasks of the MAC sublayer

1. Media access control

MAC answers the question:

who currently has the right to transmit data

This is especially important when the medium is shared:

  • Wi-Fi
  • older versions of Ethernet (hub)

Examples:

  • waiting for a free channel
  • preventing or handling collisions

2. MAC addressing

MAC:

  • uses MAC addresses
  • puts in the frame:
    • the sender's address
    • the recipient's address

This is how a device understands:

"Is this frame for me or not"


3. Building and processing frames

The MAC sublayer:

  • builds frames
  • adds MAC addresses and service fields
  • passes frames to the physical layer
  • receives frames from below and checks them

4. Error detection

MAC:

  • adds a checksum (FCS)
  • allows a damaged frame to be detected

Correcting errors is not its job, only detecting them.


What MAC does NOT do

Important for an interview. The MAC sublayer:

  • does not work with IP addresses
  • does not handle routing
  • does not know what is inside the frame (IP, TCP, etc.)

A real-life example

An intersection:

  • the road is the physical layer
  • traffic rules are MAC
  • who goes first is MAC
  • the license plate is the MAC address

Short answer for an interview

The MAC sublayer is the part of the data link layer that controls access to the transmission medium, uses MAC addresses, and builds frames for transmission over the physical layer.

Short Answer

Interview ready
Premium

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