---
title: "Functions of data link layer"
subject: "Computer Networks and Security"
chapter: 3
key: "semester_7/computer_networks_and_security:dll-functions"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/dll-functions
site: BCT Engineering
---

# Functions of data link layer

Computer Networks and Security · Chapter 3: Data Link Layer

- Asked in: 2074 Chaitra, 4 marks; 2072 Kartik, 3 marks; 2071 Shrawan, 3 marks (asked 3 times)
- Video: [Link Layer Services](https://www.youtube.com/watch?v=VBAuzvVzOQU) — Neso Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/dll-functions
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-3

## Question

What are the (major) functions of the data link layer?

## Short answer

The data link layer provides framing, MAC addressing, error and flow control, media access control, and link management. It is divided into LLC (error/flow, network interface) and MAC (addressing, channel access).

## Answer

The **data link layer** is layer 2 of the OSI model. It provides reliable node-to-node (hop-to-hop) transfer of frames over a physical link.

#### Major functions
1. **Framing:** divides the bit stream from the network layer into manageable frames, adding a header and trailer. Methods: character count, byte stuffing, bit stuffing.
2. **Physical (MAC) addressing:** adds the source and destination MAC addresses in the frame header to deliver the frame to the correct device on the same network.
3. **Error control:** detects and corrects damaged, lost or duplicate frames using CRC, checksum and parity, with acknowledgements and retransmission (ARQ).
4. **Flow control:** keeps a fast sender from flooding a slow receiver using stop-and-wait or sliding window protocols.
5. **Access control (MAC sublayer):** decides which device may use a shared channel at a time (CSMA/CD, token passing).
6. **Link management:** setup, maintenance and release of the data link.

#### Sublayers
- **LLC (Logical Link Control):** flow and error control, interface to network layer.
- **MAC (Media Access Control):** addressing and channel access.

```text
 Network layer packet
        |
  [H | packet | T]   <- frame
        |
  Physical layer bits
```

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is framing?
   A. Dividing bit stream from network layer into frames with header and trailer
   B. Routing
   C. Encrypting
   D. Port assignment
   Answer: A. Framing delimits data units, e.g. by character count, byte stuffing or bit stuffing. (Key point: Framing)

2. Which pair is correct?
   A. Error control: stop-and-wait; flow control: CRC
   B. Error control: CRC, parity, ARQ; flow control: stop-and-wait, sliding window
   C. Both CRC
   D. Both ARQ
   Answer: B. Error control uses CRC/checksum/parity with ARQ; flow control uses stop-and-wait or sliding window. (Key point: Error vs flow control)

3. What does the MAC sublayer decide?
   A. Which device may use a shared channel at a time (CSMA/CD, token passing)
   B. Routing
   C. Encryption
   D. Port
   Answer: A. MAC controls access to a shared channel and handles addressing. (Key point: Access control)

4. Which sublayer provides flow/error control and interface to network layer?
   A. MAC
   B. LLC
   C. PHY
   D. Transport
   Answer: B. LLC handles flow/error control and interfaces to the network layer. (Key point: LLC)

## Related in Computer Networks and Security

- [Data link layer framing](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aframing-mechanisms) — Computer Networks and Security, chapter 3, asked 3×
- [Functions of physical layer](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aphysical-layer-functions) — Computer Networks and Security, chapter 2
- [Functions of network layer](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Anetwork-layer-functions) — Computer Networks and Security, chapter 4

## Related in other subjects

- [Major components of a power station and functions](https://www.bctengineer.com/question.md?key=semester_4%2Fpower_system_analysis_i%3Apower-station-components-functions) — Power System Analysis I, chapter 1
- [Pavement layer functions and rigid pavement joints](https://www.bctengineer.com/question.md?key=semester_7%2Ftransportation_engineering_ii%3Apavement-layer-functions-rigid-joints) — Transportation Engineering II, chapter 2
- [Pavement classification; flexible layer functions](https://www.bctengineer.com/question.md?key=semester_7%2Ftransportation_engineering_ii%3Apavement-classification-flexible-layer-functions) — Transportation Engineering II, chapter 2
- [I/O functions used with data files](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afile-io-functions) — Computer Programming, chapter 10, asked 2×
