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