2. Physical Layer

2.1. Data Link Layer

2. Data Link Layer (Layer 2)

Function: Ensures reliable data transfer between two directly connected nodes, handling error detection and correction, and managing access to the physical medium.

Key Responsibilities:

Frames data by adding headers and trailers (e.g., Ethernet frames).

Performs error detection (e.g., Cyclic Redundancy Check - CRC).

Manages flow control to prevent overwhelming the receiver.

Uses Media Access Control (MAC) addresses for device identification.

Handles access methods (e.g., CSMA/CD for Ethernet, CSMA/CA for Wi-Fi).

Examples:

Protocols: Ethernet (IEEE 802.3), Point-to-Point Protocol (PPP), HDLC.

Technologies: Wi-Fi (IEEE 802.11), VLANs, Frame Relay.

Devices: Switches, bridges, Network Interface Cards (NICs).

Example: MAC address (e.g., 00:1A:2B:3C:4D:5E).

Analogy: A post office sorting letters for local delivery, ensuring they’re correctly addressed and intact.