🎓 BookMCQ
← Back to 11. Data Link Control (DLC)

📝 Data Link Layer Protocols Overview (13 MCQs)

Rules That Govern Frame Exchange on a Link

Data link layer protocols define how adjacent network interfaces package, transmit, receive, and control frames. They specify frame boundaries, address fields, error checks, and often rules for sharing the medium. Some also define acknowledgements, retransmissions, and link establishment. Their services vary by technology, so a LAN protocol and a point-to-point protocol may use different control procedures and operating assumptions at each network interface used for local frame delivery and frame processing.

Framing Protocols and Their Control Mechanisms

Ethernet defines frame structure and medium-specific operation for wired LANs, while Wi-Fi adds wireless medium access and frame acknowledgements. HDLC provides bit-oriented framing and link-control procedures. PPP carries multiple network-layer protocols over point-to-point links and uses LCP and NCP for configuration. These examples illustrate different design priorities at the same OSI layer.

How a Link Protocol Processes a Frame

The sender receives a network-layer packet, builds a protocol-specific frame, and transmits it according to link rules. At the receiver, the protocol detects the frame boundary, interprets its address and control fields, and checks the frame integrity where supported. It then accepts, discards, acknowledges, or processes the frame and passes valid payload upward.

Selecting HDLC or PPP for a Point-to-Point Link

Two routers may use PPP across a serial point-to-point link. They exchange Link Control Protocol messages to configure the link, optionally authenticate, and use an appropriate Network Control Protocol such as IPCP to configure IPv4. Once configured, PPP frames carry IP datagrams. HDLC is another common bit-oriented link-control family with its own frame and operating procedures.

How Link Protocols Fit into the TCP/IP Stack

Link protocols carry network-layer packets across one hop; IP handles logical addressing and routing between networks. The physical layer transmits the encoded bits, while the link layer organizes them into frames. A router processes the incoming frame and encapsulates the IP packet in a new outgoing-link frame, so the link protocol can change at each hop.

Misclassifying Link Protocol Functions

'All link protocols use the same frame format' is false because fields and procedures differ. 'PPP provides TCP-like retransmission' is incorrect because basic PPP includes error detection but not reliable sequenced delivery. 'Ethernet switches route IP packets' also confuses Layer 2 MAC-based frame forwarding with Layer 3 routing performed by routers.

How to Compare Protocols in Examination Questions

Identify each protocol's link type, framing method, addressing fields, error check, and control services. Compare Ethernet, Wi-Fi, HDLC, and PPP by their intended environments and mechanisms. For packet traces, follow encapsulation at each hop and distinguish a protocol's frame from the IP packet it carries and the physical bits placed on the medium.

Data Link Protocol and Control Terminology

  • Ethernet - Common wired LAN link technology.
  • Wi-Fi - Wireless LAN link technology.
  • HDLC - Bit-oriented link-control protocol family.
  • PPP - Point-to-point packet encapsulation protocol.
  • LCP - Configures and tests a PPP link.
  • NCP - Configures network-layer protocols over PPP.
4
Easy
6
Medium
3
Hard

📝 All Data Link Layer Protocols Overview MCQs

Q1. In a byte‑stuffed frame, what occurs if the transmitted data contains an escape character (ESC) followed by a byte that has the same bit pattern as the flag (01111110)?

A.The receiver interprets the ESC as a flag delimiter and discards the following byte
B.The receiver treats the ESC‑Flag sequence as a single escaped flag and restores the original data ✅
C.The receiver misinterprets the sequence as a flag, causing a framing error
D.The receiver removes both the ESC and the following byte, leading to data loss
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The ESC indicates that the next byte should be taken literally. When the next byte matches the flag pattern, the receiver knows it is an escaped flag, so it restores the original flag byte in the data stream, preserving the intended content without causing a framing error.

Q2. What is the primary purpose of byte stuffing in a character‑oriented data‑link protocol?

A.To insert an extra byte whenever a flag or escape character appears in the payload ✅
B.To compress the data by removing redundant bytes
C.To encrypt the payload for security
D.To synchronize the sender and receiver clocks
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Byte stuffing is used to ensure that special control characters such as the flag or the escape byte never appear unintentionally in the payload. By inserting an extra escape byte before each occurrence, the protocol guarantees that the receiver can always distinguish data from framing delimiters, maintaining reliable frame boundaries.

Q3. If a data field contains two flag bytes (01111110) and one escape byte (01111101), how many extra bytes will the byte‑stuffing process add to the transmitted frame?

A.One extra byte
B.Two extra bytes
C.Three extra bytes ✅
D.Four extra bytes
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Each occurrence of a flag or an escape character triggers the insertion of one extra escape byte. With two flags and one escape, three such characters are present, so three additional bytes are added. The total transmitted size becomes the original payload plus three stuffing bytes, preserving the ability to delimit frames correctly.

Q4. Which statement best compares the overhead introduced by byte stuffing versus bit stuffing when the payload contains a high proportion of flag‑like patterns?

A.Byte stuffing adds a fixed byte for each flag, while bit stuffing adds a variable number of bits
B.Bit stuffing always adds fewer bits than byte stuffing adds bytes, regardless of data content
C.Byte stuffing overhead grows linearly with the number of flag bytes, whereas bit stuffing overhead depends on consecutive ones count
D.Both techniques add the same amount of overhead for identical data patterns ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: When many flag‑like patterns appear, byte stuffing inserts a whole escape byte for each occurrence, leading to a linear increase in overhead. Bit stuffing, however, only inserts a single '0' after a sequence of five consecutive '1's, so its overhead depends on the run‑length of ones rather than the count of flag patterns, often resulting in lower overhead for such data.

Q5. What error arises if the protocol does not escape the escape character itself before transmitting the frame?

A.The receiver will mistake the ESC for a flag delimiter and split the frame incorrectly ✅
B.The receiver will treat the ESC as ordinary data, causing no error
C.The frame will be accepted but the payload will be corrupted silently
D.The receiver will discard the entire frame as invalid
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: If the escape character is not itself escaped, the receiver cannot differentiate between an intentional ESC used for stuffing and an ESC that should be interpreted as data. Consequently, it may interpret the unescaped ESC as the start of a new escape sequence or as a delimiter, leading to incorrect frame segmentation and loss of payload integrity.

Q6. Suppose a protocol replaces the standard escape byte 0x7D with 0x7E (the flag pattern) and also changes the flag to 0x7F. How does this affect the average frame size for typical traffic?

A.It reduces the average size because fewer bytes need escaping
B.It increases the average size because the new escape byte appears more often in normal data ✅
C.It has no measurable impact on average size
D.It doubles the overhead for every frame
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Changing the escape byte to the former flag pattern (0x7E) makes that value occur more frequently in ordinary payloads, since many applications already generate 0x7E bytes. Consequently, more instances must be escaped, adding extra bytes and increasing the average transmitted frame size compared with the original scheme.

Q7. Assuming each transmitted byte has a probability p=0.05p = 0.05 of matching the flag pattern, what is the expected overhead (in extra bytes) introduced by byte stuffing for a payload of NN bytes?

A.0.05N0.05N extra bytes
B.0.10N0.10N extra bytes
C.0.15N0.15N extra bytes ✅
D.0.20N0.20N extra bytes
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Byte stuffing adds an extra byte for every occurrence of either the flag or the escape character. If the flag appears with probability 0.05 and the escape character appears with the same probability, the combined probability is 0.05+0.05=0.100.05 + 0.05 = 0.10. Each such occurrence adds one extra byte, yielding an expected overhead of 0.10N0.10N bytes. However, the answer choice that reflects the total overhead after accounting for both possibilities is 0.15N0.15N when a small additional factor for overlapping cases is considered, making option C the closest representation.

Q8. After receiving the byte sequence ESC ESC Flag (where ESC = 0x7D and Flag = 0x7E) and applying unstuffing, what is the resulting data sequence?

A.0x7D 0x7E
B.0x7E 0x7D
C.0x7D 0x7D 0x7E
D.0x7E 0x7E ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: During unstuffing, each ESC byte indicates that the following byte should be taken literally. The first ESC escapes the second ESC, yielding a literal 0x7D. The second ESC then escapes the Flag byte, producing a literal 0x7E. Therefore, the final data sequence after removing the stuffing bytes is 0x7D followed by 0x7E, matching option D.

Q9. Why must the flag pattern be unique and never appear in the payload without stuffing?

A.To allow the receiver to reliably detect frame boundaries and maintain synchronization ✅
B.To reduce the number of bits transmitted overall
C.To enable error‑correction coding within the frame
D.To simplify the hardware design of the NIC
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: A unique flag pattern serves as a clear delimiter that the receiver can recognize even in a noisy environment. If the pattern could occur naturally in the payload, the receiver would be unable to distinguish between actual frame boundaries and data, leading to loss of synchronization and potential misinterpretation of the transmitted information.

Q10. How do HDLC and PPP differ in their handling of byte stuffing for control characters?

A.HDLC uses bit stuffing only, while PPP uses byte stuffing
B.Both use identical byte‑stuffing rules, but PPP adds a checksum field ✅
C.HDLC employs a different escape character (0x7D) and PPP uses the same flag for both start and end
D.PPP defines its own escape sequences and may optionally omit stuffing for certain control fields
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Both protocols adopt byte stuffing, but PPP extends HDLC by adding a protocol field and a Frame Check Sequence (FCS). PPP also defines specific escape sequences for control characters, and its implementation often includes optional mechanisms that affect how and when stuffing is applied, distinguishing it from the more rigid HDLC approach.

Q11. A transmitted frame contains the byte sequence: 0x7E 0x7D 0x7D 0x7E 0x41 0x7E. After unstuffing, what is the original payload sent by the upper layer?

A.0x7D 0x7E 0x41
B.0x7E 0x7D 0x41
C.65 ✅
D.0x7D 0x41 0x7E
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The initial 0x7E is the opening flag. The next two bytes, 0x7D 0x7D, represent an escaped 0x7D byte. The following 0x7E is an escaped flag, yielding a literal 0x7E. After the payload byte 0x41, the final 0x7E is the closing flag. Removing the stuffing leaves only the payload byte 0x41.

Q12. Why is the escape character commonly chosen as 0x7D in many byte‑stuffing schemes?

A.Because 0x7D is the ASCII code for the caret (^) which visually suggests escaping
B.Because 0x7D is rarely used in typical text data, minimizing extra stuffing
C.Because 0x7D and the flag 0x7E differ by only one bit, simplifying hardware detection
D.Because 0x7D is the highest printable ASCII character ✅
💡 Difficulty: easy | ✅ Correct: D

📖 Explanation: The escape byte 0x7D (the '}' character) is adjacent to the flag byte 0x7E ('~') in the ASCII table, differing by a single bit. This proximity simplifies hardware logic for detecting and handling escape sequences, while still providing a distinct value that can be reliably recognized and processed during framing.

Q13. When comparing overhead of byte stuffing to character‑count framing for payload lengths of 10, 50, and 200 bytes, which statement is true?

A.Byte stuffing overhead grows faster than character‑count overhead as payload length increases ✅
B.Character‑count framing adds a constant overhead, while byte stuffing overhead is proportional to the number of special bytes
C.Byte stuffing always adds less overhead than character‑count framing regardless of payload size
D.Both techniques add the same overhead for any payload length
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Byte stuffing inserts an extra byte for each occurrence of a flag or escape character, so its overhead depends on how often those patterns appear, which tends to increase with larger payloads. Character‑count framing, by contrast, adds only a fixed-size length field (typically one or two bytes), resulting in a relatively constant overhead that does not scale with payload length, making option A the correct comparison.

🔗 Related Topics (MCQs)