Data Link Layer Services: What Layer 2 Provides

Data Link Layer Services: What Layer 2 Provides

Verified Sources
Sep 12, 2026

The data link layer (Layer 2) provides services to the network layer by transporting frames between directly connected nodes. Its core purpose is to make communication over the local link usable by higher layers, primarily by handling framing, link-layer addressing, and data transfer reliability/efficiency mechanisms. These services are typically implemented by the Logical Link Control (LLC) and Media Access Control (MAC) sublayers. 3

At a high level, Layer 2 provides:

  • Framing: encapsulate network-layer data packets into frames so receivers can recognize boundaries. 2
  • Physical/MAC addressing: deliver frames to the correct destination NIC/interface on a local link. 2
  • Error control: detect (and sometimes correct) frame transmission errors using checks like CRC/FCS; at minimum corrupted frames are detected and dropped/cancelled. 2
  • Flow control (link-level): pacing between adjacent sender/receiver to prevent overwhelming the receiver when needed (commonly important on high-error links such as wireless). 2
  • Media access control (multiple access): coordinate transmissions when multiple nodes share a broadcast medium, e.g., collision detection/avoidance mechanisms. 2

The next sections break down each service and how it is delivered to the network layer.

Footnotes

  1. What Is the Data Link Layer in the OSI Model? – ITU Online IT Training - Overview of Layer 2 framing, error detection, flow control, and medium access.

  2. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control. 2 3 4 5 6

  3. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities. 2 3

  4. UNIT 2 INTRODUCTION TO DATALINK LAYER (PDF) - Defines framing and data-link encapsulation/decapsulation services.

  5. Computer Networking: A Top Down Approach (Kurose & Ross lecture/notes PDF) - Link layer services include flow control pacing and error detection due to noise/attenuation. 2

1) Framing Service

Framing is the data link layer’s first major service: it converts a network-layer packet into a frame that has recognizable start/end boundaries and includes control fields. This allows the receiving data link entity to reassemble received bit sequences into discrete frames rather than an unstructured stream. 2

In practice, framing includes:

  • Frame header fields (e.g., addressing/control info)
  • Frame trailer fields such as an error-check value (e.g., CRC-based FCS) for integrity checking 2

Framing is essential because the physical layer ultimately sends bits continuously; framing is what lets Layer 2 “know where each unit begins and ends.” 2

Key terms: framing; frame; FCS; frame synchronization.

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control. 2

  2. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers. 2

  3. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities.

  4. UNIT 2 INTRODUCTION TO DATALINK LAYER (PDF) - Defines framing and data-link encapsulation/decapsulation services.

Layer 2 provides physical/MAC addressing so frames reach the intended neighbor node on a local network segment. The MAC sublayer uses an interface-level identifier (MAC address) for delivery, enabling switching/forwarding decisions within LAN technologies. 2

This service is distinct from network-layer addressing (e.g., IP):

  • Network layer addresses identify endpoints across networks.
  • Data link addresses identify interfaces on the current link. 2

Key terms: MAC addressing; NIC; switching; adjacent nodes.

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control. 2

  2. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities.

  3. Data Link Layer vs Network Layer Explained (Lightyear.ai) - Contrasts Layer 2 hop delivery/frames with higher-layer roles.

3) Error Detection (and Optional Reliability)

A major Layer 2 service is error control, typically starting with error detection. Transmission over real media can introduce errors due to noise, attenuation, or wireless channel impairments. Layer 2 therefore computes and verifies integrity information (e.g., CRC/FCS). 2

According to common OSI/LL design descriptions:

  • The receiver checks whether the frame is corrupted.
  • If corruption is detected, many link protocols discard the erroneous frame rather than passing bad data upward. 2
  • Some link-layer protocols (especially on certain wireless/modem contexts) may use retransmission/ARQ-like strategies; however, many LANs rely more on end-to-end reliability at higher layers. 2

Why both link-layer and end-to-end reliability? Link-layer detection can prevent corrupted frames from reaching upper layers and can reduce wasted end-to-end work; end-to-end protocols handle reliability when needed across the whole path.

Key terms: error detection; ARQ; cancellation/dropping; bit errors.

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control. 2 3

  2. Computer Networking: A Top Down Approach (Kurose & Ross lecture/notes PDF) - Link layer services include flow control pacing and error detection due to noise/attenuation. 2

  3. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

  4. Computer Networking: A Top Down Approach (lecture PDF copy) - Discusses link-layer services and the rationale for link-level and end-to-end reliability.

Layer 2 can provide flow control between adjacent nodes by pacing transmissions so the receiver is not overwhelmed. This is especially relevant when the link can produce high error rates or when link-level retransmissions/acknowledgments exist. 2

One commonly taught interpretation is:

  • Layer 2 flow control provides pacing between adjacent sender/receiver nodes. 2

Important nuance:

  • Some wired LAN technologies (e.g., classic Ethernet operation) may not use link-layer flow control in the same way; instead, higher layers (like transport protocols) often provide end-to-end flow/congestion control. 2

Key terms: flow control; pacing; retransmission; buffer overflow.

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control. 2

  2. Computer Networking: A Top Down Approach (Kurose & Ross lecture/notes PDF) - Link layer services include flow control pacing and error detection due to noise/attenuation. 2

  3. Computer Networking: A Top Down Approach (lecture PDF copy) - Discusses link-layer services and the rationale for link-level and end-to-end reliability.

  4. Data Link Layer vs Network Layer Explained (Lightyear.ai) - Contrasts Layer 2 hop delivery/frames with higher-layer roles.

5) Media Access Control (Multiple Access / Channel Access)

When multiple nodes share the same physical medium (e.g., a broadcast segment or wireless channel), Layer 2 must coordinate who transmits when. This is handled by media access control (MAC) mechanisms. 2

Common categories described in standard networking overviews include:

  • Collision detection with retransmission (e.g., CSMA/CD in classic Ethernet contexts)
  • Collision avoidance in wireless contexts (e.g., CSMA/CA style behavior) 2

Thus, Layer 2 service includes access coordination as part of enabling node-to-node communication on shared media.

Key terms: CSMA/CD; CSMA/CA; collision; shared medium.

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control. 2

  2. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities. 2

How a Network-Layer Packet Becomes a Delivered Frame (Typical Lifecycle)

Encapsulation begins

1. Packet enters Layer 2

Network-layer data becomes the payload to a Layer 2 frame. 2"

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

  2. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

Frame construction

2. Add framing + headers

Layer 2 adds header/control fields and identifies boundaries for synchronization. 2"

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

  2. UNIT 2 INTRODUCTION TO DATALINK LAYER (PDF) - Defines framing and data-link encapsulation/decapsulation services.

Destination interface selection

3. Add addressing

MAC addressing selects the destination NIC/interface for local delivery. 2"

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

  2. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities.

Error check added

4. Integrity protection

Trailer contains integrity check bits to support error detection. 2"

Footnotes

  1. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

  2. Computer Networking: A Top Down Approach (Kurose & Ross lecture/notes PDF) - Link layer services include flow control pacing and error detection due to noise/attenuation.

Channel access

5. Medium access

MAC coordinates transmission over the link when sharing exists. 2"

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

  2. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities.

Verify + deliver

6. Receiver validates

Receiver checks errors; valid payload is delivered to network layer. 2"

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

  2. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

Layer 2 Services Mapped to Key Responsibilities

Relative emphasis across commonly taught Layer 2 services (qualitative).

  1. 1
    Step 1

    Layer 2 obtains the payload (datagram) that must be delivered to the next hop over the link. 2

    Footnotes

    1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

    2. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

  2. 2
    Step 2

    Encapsulate the payload and add frame structure so boundaries are detectable at the receiver. 2

    Footnotes

    1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

    2. UNIT 2 INTRODUCTION TO DATALINK LAYER (PDF) - Defines framing and data-link encapsulation/decapsulation services.

  3. 3
    Step 3

    Insert destination/source MAC-related information so the receiver interface can be identified. 2

    Footnotes

    1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

    2. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities.

  4. 4
    Step 4

    Attach error-detection fields (e.g., CRC/FCS) to identify corrupted frames. 2

    Footnotes

    1. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

    2. Computer Networking: A Top Down Approach (Kurose & Ross lecture/notes PDF) - Link layer services include flow control pacing and error detection due to noise/attenuation.

  5. 5
    Step 5

    Use MAC rules to determine when/how to transmit on a shared link. 2

    Footnotes

    1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

    2. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities.

  6. 6
    Step 6

    The physical layer converts frame bits into signals and sends them across the medium. 2

    Footnotes

    1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

    2. Data Link Layer vs Network Layer Explained (Lightyear.ai) - Contrasts Layer 2 hop delivery/frames with higher-layer roles.

  7. 7
    Step 7

    Bits are reassembled into frames, then integrity checks verify correctness. 2

    Footnotes

    1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

    2. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

  8. 8
    Step 8

    On error: discard/cancel (and possibly retransmit if link supports it). On success: remove headers/trailer and deliver to network layer. 2

    Footnotes

    1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

    2. Data link layer and error detection (TechTarget) - Details framing, error detection/cancellation, and notification of higher layers.

Common Clarifications

Pro Tip

When describing Layer 2 services, separate what happens to the data unit (framing + error checks) from what happens to who can transmit (MAC channel access). This distinction matches how Layer 2 is often taught and implemented. 2

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

  2. Data Link Layer | NetworkAcademy.IO - Explains Layer 2 job, LLC/MAC sublayers, and MAC-based responsibilities.

Common Mistake

Don’t confuse network-layer delivery (end-to-end routing using IP) with data link delivery (hop-by-hop frame transfer using MAC on a local link). Layer 2 addressing is not the same as IP addressing. 2

Footnotes

  1. Data link layer - Wikipedia - Describes encapsulation into frames, LLC/MAC responsibilities, addressing, flow control, and error control.

  2. Data Link Layer vs Network Layer Explained (Lightyear.ai) - Contrasts Layer 2 hop delivery/frames with higher-layer roles.

Knowledge Check

Question 1 of 4
Q1Single choice

Which service is responsible for encapsulating network-layer packets into structured units called frames?