Back to course

OSI Layer 2: The Data Link Layer (Frames and MAC)

Networking Fundamentals: The 0 to Hero Guide

Lesson 17: OSI Layer 2: The Data Link Layer (Frames and MAC)

Layer 2 focuses on communication within the local network segment. It ensures reliable transmission of data across the physical link.

Core Function: Local Addressing and Error Detection

Data units at this layer are called Frames.

Key Functions:

  1. Physical Addressing: Using the MAC address (Media Access Control address) to address devices within the LAN.
  2. Framing: Taking the Layer 3 packet and adding a header and a trailer (including error-checking information like the CRC).
  3. Error Detection: Checking for errors that might occur during physical transmission.

Sub-Layers of Data Link:

The Data Link Layer is often subdivided into two sub-layers:

  • Logical Link Control (LLC): Manages communication with the Network Layer above it.
  • Media Access Control (MAC): Controls how devices share access to the physical medium (e.g., deciding who can transmit next).

Key Devices and Protocols:

  • Key Device: Switch (Learns and forwards based on MAC addresses).
  • Primary Protocols: Ethernet (802.3) and Wi-Fi (802.11).
  • Addressing Protocol: ARP (Address Resolution Protocol).

Analogy: The Data Link Layer is the local mail delivery system. It ensures the package arrives at the correct house (MAC address) on the same street (LAN segment) and checks the package integrity before delivery.