Layer 2: Data Link Layer - buaamer81/IT130-Networking-Wiki GitHub Wiki

Layer 2: Data Link Layer (OSI Model)


๐Ÿ“˜ Overview

The Data Link Layer is Layer 2 of the OSI Model.
It is responsible for reliable delivery of data across a physical network link. It ensures that frames are properly sent and received between directly connected devices.

Think of it as:
โ€œHow do devices on the same local network communicate accurately?โ€


๐Ÿ”ง Key Responsibilities

  • Framing: Breaks packets from Layer 3 into frames
  • MAC Addressing: Adds hardware addresses for sender and receiver
  • Error Detection: Adds CRC/FCS for integrity checks
  • Flow Control: Prevents sender from overwhelming receiver
  • Media Access Control: Decides when devices can transmit (e.g., CSMA/CD)

๐Ÿ“ฆ Data Unit: Frame

A frame includes:

  • Destination MAC Address
  • Source MAC Address
  • Data
  • Error Check (FCS)

๐Ÿ“‘ Two Sublayers

Sublayer Function
LLC (Logical Link Control) Identifies protocols and manages connections
MAC (Media Access Control) Controls access to the physical transmission medium

๐Ÿ”„ Devices Operating at Layer 2

Device Purpose
Switch Forwards frames based on MAC Address
Bridge Connects two network segments
Wireless Access Point Layer 2 in wireless networks

๐Ÿ” Protocols at Layer 2

  • Ethernet (802.3)
  • Wi-Fi (802.11)
  • PPP (Point-to-Point Protocol)
  • HDLC (High-Level Data Link Control)

๐Ÿงช Troubleshooting at Layer 2

  • Use arp -a to view MAC tables
  • Inspect switch configuration
  • Verify MAC address resolution
  • Monitor frame drops or collisions

๐Ÿง  Real-Life Scenario

Your laptop sends a file to a printer on the same network.
Layer 2 ensures the frame is delivered to the correct MAC address using a Switch.


๐Ÿ“Š Visual Aids


๐Ÿ” Related Pages


Return to: OSI Model Overview