Data Link Layer MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

The data link layer moves frames reliably from one node to the next over a single link. It handles framing, error detection, flow control and access to a shared medium, and it uses MAC addresses. It is the third topic in the Computer Networks and Cloud Computing area, which carries 10% of the NSCT according to HEC's Areas of Competencies. In 2026 Networks accuracy was 39.6%, per the HEC NSCT report and APP.

IEEE 802 splits the layer into two sublayers: LLC (logical link control: flow and error control) and MAC (media access control: who may transmit, plus frame format and addressing).

Framing

Framing marks where each frame starts and ends. There are three main methods:

Example: the data 0111111011111100 is sent as 011111010111110100. The receiver deletes each 0 that follows five 1s.

Exam angle: count runs of 1s carefully, because the count restarts after each stuffed 0.

Error detection

Every error-detection scheme adds redundant bits.

Exam angle: d_min = 4 detects 3 errors but corrects only 1.

CRC

The cyclic redundancy check divides the data, with r zeros appended (r is the degree of the generator), by a generator polynomial using modulo-2 (XOR) division. The r-bit remainder is appended. The receiver divides the whole frame; a remainder of zero means no error was detected.

Step Value
Dataword 1001
Generator 1011 (x^3 + x + 1), so append 3 zeros
Dividend 1001000
Remainder 110
Codeword 1001110

If the codeword arrives as 1011110, dividing by 1011 leaves 110, which is non-zero, so the frame is discarded. CRC detects all burst errors no longer than r bits. Ethernet uses CRC-32 in its frame check sequence.

Exam angle: the remainder always has exactly r bits; keep leading zeros (001, not 1).

MAC and flow control

When many stations share one medium, a multiple-access protocol decides who sends.

Protocol Idea Peak throughput / use
Pure ALOHA Send whenever ready 18.4% (1/2e)
Slotted ALOHA Send only at slot starts 36.8% (1/e)
CSMA/CD Sense first, stop and back off on collision Classic half-duplex Ethernet
CSMA/CA Sense, wait a random backoff, optional RTS/CTS Wi-Fi, where collisions cannot be detected

Flow control stops a fast sender from flooding a slow receiver. Stop-and-wait sends one frame, then waits for an ACK, so utilisation = Tt / (Tt + 2Tp). Sliding windows keep several frames in flight. With m-bit sequence numbers, Go-Back-N allows up to 2^m - 1 frames and resends everything from a lost frame onward. Selective Repeat allows up to 2^(m-1) and resends only the lost frame.

Exam angle: these window-size limits are easy to swap. Go-Back-N with 3 bits allows 7 frames; Selective Repeat with 3 bits allows 4.

Ethernet

An Ethernet frame has a 7-byte preamble and a 1-byte start frame delimiter. These are followed by the 6-byte destination and 6-byte source MAC addresses, a 2-byte type/length field, 46 to 1,500 bytes of data, and a 4-byte CRC. That makes a frame of 64 to 1,518 bytes, not counting the preamble and SFD. Short data is padded up to 46 bytes. The 64-byte minimum exists so a sender is still transmitting when a collision from the far end reaches it (2 x propagation delay). A MAC address is 48 bits, and FF:FF:FF:FF:FF:FF is the broadcast address. Switches learn which MAC address sits on which port from source addresses, and flood frames whose destination is still unknown.

Exam angle: payload sizes (46 to 1,500 bytes) and frame sizes (64 to 1,518 bytes) are different numbers.

Common traps

Worked examples

1. Understanding. Which data link sublayer decides when a station may transmit on a shared medium? Answer: the MAC sublayer. LLC handles flow and error control and the interface to the network layer. MAC handles medium access, framing format and addressing.

2. Application. Find the CRC codeword for dataword 1001 with generator 1011. Answer: 1001110. Append three 0s (1001000), divide by 1011 using XOR, and the remainder is 110.

3. Analysis. A 10 Mbps link carries 1,500-byte frames with a one-way propagation delay of 5 ms. What is the stop-and-wait utilisation, and how large a window keeps the link busy? Answer: about 10.7%, and a window of 10 frames. Tt = 12,000 / 10^7 = 1.2 ms, so utilisation = 1.2 / (1.2 + 10) = 10.7%. A full cycle is 11.2 ms, which covers 11.2 / 1.2 = 9.33 frame times, so 10 frames are needed. Go-Back-N then needs 4-bit sequence numbers (2^4 - 1 = 15 ≥ 10).

Practise

The quiz below has 100 questions on this topic, filterable by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. In the IEEE 802 model, the data link layer is split into which two sublayers?

    1. Logical link control (LLC) and media access control (MAC)
    2. Session and transport
    3. Physical coding and signalling
    4. Framing and routing
    Show answer

    Answer: A. Logical link control (LLC) and media access control (MAC)

    IEEE 802 divides the data link layer into LLC, which handles flow and error control and talks to the network layer, and MAC, which decides who may use the shared medium and defines frame format and addressing for each LAN type.

  2. How long is an Ethernet MAC address?

    1. 32 bits (4 bytes)
    2. 64 bits (8 bytes)
    3. 128 bits (16 bytes)
    4. 48 bits (6 bytes)
    Show answer

    Answer: D. 48 bits (6 bytes)

    An Ethernet MAC address is 48 bits, written as six hexadecimal bytes such as 4A:30:10:21:10:1A. The first 24 bits usually identify the manufacturer (the OUI). 32 bits is IPv4 and 128 bits is IPv6.

  3. Which bit pattern does HDLC use as the flag that marks the start and end of a frame?

    1. 10101010
    2. 01111110
    3. 11111111
    4. 01111111
    Show answer

    Answer: B. 01111110

    HDLC and other bit-oriented protocols use the flag 01111110 (0x7E). Bit stuffing makes sure this pattern never appears inside the data, by inserting a 0 after any five consecutive 1s.

  4. What is the Ethernet broadcast MAC address?

    1. FF:FF:FF:FF:FF:FF
    2. 255.255.255.255
    3. 00:00:00:00:00:00
    4. 01:00:5E:00:00:00
    Show answer

    Answer: A. FF:FF:FF:FF:FF:FF

    A destination MAC of all 1s (FF:FF:FF:FF:FF:FF) is delivered to every station on the LAN. 255.255.255.255 is the IPv4 limited broadcast address, not a MAC address, and 01:00:5E is the start of the IPv4 multicast MAC range.

  5. What is the main purpose of framing at the data link layer?

    1. To choose the route across the internet
    2. To assign IP addresses
    3. To encrypt the data
    4. To mark where each frame starts and ends so the receiver can separate them
    Show answer

    Answer: D. To mark where each frame starts and ends so the receiver can separate them

    Framing groups bits into frames and marks their boundaries, using a character count, flag bytes with byte stuffing, or flag bits with bit stuffing. Without it, the receiver sees only a stream of bits. Routing and IP addressing are network-layer jobs.

  6. In a byte-oriented protocol, what does byte stuffing do when a byte equal to the flag appears in the payload?

    1. Ends the frame early
    2. Deletes the byte from the payload
    3. Replaces the byte with a parity bit
    4. Inserts an escape (ESC) byte before it so it is not read as a frame boundary
    Show answer

    Answer: D. Inserts an escape (ESC) byte before it so it is not read as a frame boundary

    Byte stuffing adds an ESC byte before any data byte that looks like a flag (or like ESC itself). The receiver removes the ESC and treats the next byte as data. Nothing in the payload is lost.

  7. The cyclic redundancy check (CRC) is based on which operation?

    1. Ordinary decimal addition
    2. One's complement addition
    3. Modulo-2 (binary polynomial) division
    4. Counting the number of 1 bits
    Show answer

    Answer: C. Modulo-2 (binary polynomial) division

    CRC treats the bits as a polynomial and divides by a generator polynomial using modulo-2 arithmetic, where subtraction is XOR. The remainder is appended as the check bits. One's complement addition is the Internet checksum, and counting 1s is parity.

  8. A single even-parity bit is added to each byte. Which errors can it always detect?

    1. Any odd number of flipped bits
    2. Every possible error
    3. Any burst error
    4. Any even number of flipped bits
    Show answer

    Answer: A. Any odd number of flipped bits

    A parity bit makes the count of 1s even. Flipping an odd number of bits makes the count odd, which the receiver detects. Flipping an even number (2, 4 and so on) keeps the count even, so the error slips through.

  9. To guarantee detection of up to s bit errors in a block code, what must the minimum Hamming distance be?

    1. 2s
    2. s + 1
    3. 2s + 1
    4. s
    Show answer

    Answer: B. s + 1

    If d_min = s + 1, then s errors cannot turn one valid codeword into another, so they are always detected. Correcting t errors needs the stricter d_min = 2t + 1.

  10. What is the maximum throughput of pure ALOHA?

    1. About 50%
    2. About 36.8%
    3. 100%
    4. About 18.4%
    Show answer

    Answer: D. About 18.4%

    Pure ALOHA throughput is S = G x e^(-2G), which peaks at G = 0.5 with S = 1/(2e), about 0.184. Slotted ALOHA halves the vulnerable time, giving S = G x e^(-G), which peaks at 1/e, about 36.8%.

FAQs

What is the difference between error detection and error correction?

Detection only tells the receiver that something is wrong, and the frame is then discarded and resent. Parity, checksums and CRC do this. Correction finds and fixes the bad bits without resending, which needs more redundancy. Hamming codes correct single-bit errors and need d_min = 2t + 1 to correct t errors.

Why does Ethernet have a minimum frame size of 64 bytes?

With CSMA/CD, a sender only learns about a collision if it is still transmitting when the collision signal comes back from the far end of the cable. At 10 Mbps the round trip is budgeted at 51.2 µs, which equals 512 bits, or 64 bytes. Shorter frames are padded to reach this size.

How is CRC different from a checksum?

A checksum adds data words in one's complement arithmetic. It is simple, but misses some errors, such as reordered words. CRC uses polynomial division and catches all burst errors up to the generator's degree, plus most longer ones. That is why link layers like Ethernet use CRC, while IP, TCP and UDP use checksums.

Next step

Move on to the Network Layer MCQs (IP addressing and routing), or go deeper with CRC and error-detection practice. See all topics on the Networks & Cloud hub, and finish with an NSCT mock test.