🎓 BookMCQ
← Back to 9. Introduction to Data Link Layer

📝 Data Link Layer basics (12 MCQs)

The Data Link Layer’s Role in Node-to-Node Delivery

The data link layer is the second layer of the OSI model and provides node-to-node delivery across a single link. It takes network-layer packets and organizes them into frames suitable for the underlying medium. Its responsibilities commonly include framing, physical addressing, media access, and error detection. The exact services vary with the link technology, such as Ethernet or Wi-Fi on a particular transmission medium.

Framing, Physical Addressing and Link Control

A frame contains a header, payload, and usually a trailer. The header carries link-layer control information, often including source and destination MAC addresses; the trailer may contain an error-detection value such as a frame check sequence. Link protocols also define how devices share a medium and whether flow control or reliable delivery is provided.

How a Packet Becomes a Link-Layer Frame

At the sender, the network layer passes a packet to the link layer. The sender places it in a frame, adds required addressing and control fields, and transmits the resulting bit sequence. The receiving interface recognizes the frame boundary, checks its integrity where supported, processes its header, and delivers the enclosed packet upward.

An Ethernet Frame Crossing a Local Network

A computer sends an IPv4 packet to another host on its Ethernet LAN. The network layer supplies the packet to Ethernet, which adds destination and source MAC addresses and a frame check sequence. A switch forwards the frame toward the destination port; the receiving network interface accepts it and passes the packet to IP.

How the Link Layer Connects Network and Physical Layers

The link layer sits between the network layer and the physical layer. It uses the physical layer to send bits over copper, fibre, or radio, while presenting a frame-delivery service to IP. Routers remove an incoming link frame and create a new one for the next link, even when the IP packet continues toward the same destination.

Clarifying the Scope of Link-Layer Services

'The link layer delivers packets across the entire internet' confuses local-link delivery with network-layer routing. 'Every link protocol guarantees retransmission' is incorrect because reliability is optional and technology-dependent. 'A MAC address replaces an IP address' is also false: MAC addresses support local frame delivery, while IP addresses identify network-layer endpoints across interconnected networks.

Recognizing Frames, Addresses and Layer Responsibilities

For examinations, identify the data link layer as OSI Layer 2 and distinguish its frames from network-layer packets and physical-layer bits. Trace encapsulation and decapsulation, identify MAC fields and frame checks, and explain why a router changes link-layer framing at each hop. Compare link services without assuming every technology implements them identically.

Core Data Link Layer Terminology

  • Frame - A link-layer packet container.
  • MAC address - Local interface identifier.
  • Framing - Creating frames from packets.
  • Trailer - Frame ending error-check fields.
  • FCS - Error-check value in a frame.
  • Link - Connection between adjacent nodes.
3
Easy
6
Medium
3
Hard

📝 All Data Link Layer basics MCQs

Q1. In the scenario described, how many separate logical connections exist between the data‑link layers along the path from Alice’s host to the destination host?

A.Three
B.Four
C.Five ✅
D.Six
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The passage explicitly mentions that communication at the data‑link layer consists of five separate logical connections. Each connection links the data‑link layer of one device to the next, yielding a total of five logical links from Alice’s computer through the routers to the final host. Therefore, the correct answer is five.

Q2. If a packet encounters a failure at router R2’s data‑link layer, what is the immediate effect on end‑to‑end communication?

A.The entire end‑to‑end path fails immediately
B.Only the segment after R2 is disrupted ✅
C.Only the segment before R2 is disrupted
D.No effect because higher layers will retransmit
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: When the data‑link layer at R2 cannot forward the frame, the segment that follows R2 (R2 to the next hop) becomes unavailable. The portion of the path before R2 can still operate, but the packet cannot progress beyond the failure point, so only the downstream segment is affected.

Q3. Given that each link in the path uses a distinct MAC addressing scheme, what can be inferred about the need for address translation?

A.Translation is required at each router ✅
B.Translation is only needed at the source host
C.No translation is necessary because MAC addresses are globally unique
D.Translation occurs only at the destination host
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Each link’s MAC addressing scheme is local to that link, so when a frame moves from one link to the next, the router must replace the source and destination MAC addresses with those appropriate for the new segment. This per‑hop replacement constitutes address translation at every router.

Q4. A store‑and‑forward switch forwards a frame of 1500 bytes over a link of 10 Mbps. Using the formula latency=frame sizebandwidth\text{latency} = \frac{\text{frame size}}{\text{bandwidth}}, what is the minimum per‑hop latency?

A.0.12 ms
B.1.2 ms ✅
C.12 ms
D.0.012 ms
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: First convert 1500 bytes to bits: 1500 × 8 = 12 000 bits. Divide by the bandwidth: 12 000 bits ÷ 10 × 10⁶ bits/s = 0.0012 s, which equals 1.2 ms. Hence the minimum latency for a single hop is 1.2 ms.

Q5. Which of the following best compares the role of the data‑link layer in a LAN versus a WAN?

A.In a LAN it provides routing, while in a WAN it provides only framing
B.In a LAN it handles framing and error detection; in a WAN it also manages logical addressing across multiple networks ✅
C.In both LAN and WAN it only supplies physical signaling
D.In a LAN it uses MAC addresses, whereas a WAN never uses MAC addresses
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Within a LAN, the data‑link layer is responsible for framing, error detection, and using MAC addresses for local delivery. In a WAN, the layer still frames data but must also consider logical addressing (e.g., VLAN IDs) to traverse multiple network segments, extending its responsibilities beyond pure local delivery.

Q6. What is a primary advantage of using switches instead of routers for intra‑network traffic at the data‑link layer?

A.Switches can perform IP routing faster than routers
B.Switches reduce the number of logical connections needed
C.Switches forward frames based on MAC addresses, eliminating the need for IP‑level processing ✅
D.Switches increase the maximum transmission unit size
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Switches operate at Layer 2, making forwarding decisions solely on MAC addresses. This avoids the overhead of IP‑level routing performed by routers, allowing faster frame forwarding and lower latency for traffic that remains within the same broadcast domain.

Q7. How does a logical connection at the data‑link layer differ from a physical connection?

A.Logical connections are defined by software protocols, while physical connections are the actual cables ✅
B.Logical connections refer to the sequence of frames, whereas physical connections refer to the electrical signals
C.Logical connections exist only between data‑link layers, whereas physical connections may involve multiple layers
D.Logical connections are temporary, while physical connections are permanent
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Logical connections are established by the data‑link protocols that manage frame exchange between devices, independent of the underlying medium. Physical connections are the tangible media—copper, fiber, or wireless—that carry the electrical or optical signals. Thus, the distinction lies in software‑defined links versus hardware pathways.

Q8. If a new router R3 is inserted between R2 and the destination host, how does the number of logical data‑link connections change?

A.It remains the same because logical connections are independent of routers
B.It increases by one because each new router adds a new logical link
C.It decreases by one because the path becomes shorter ✅
D.It doubles because each router creates two logical connections
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: Adding R3 splits the existing link between R2 and the destination into two separate segments: R2‑R3 and R3‑destination. Consequently, the original logical connection is replaced by two, but the total count of logical connections along the path increases by one, not decreases. Therefore the correct choice reflects the addition of a new logical link.

Q9. Which header is added by the data‑link layer when a packet is prepared for transmission over an Ethernet network?

A.IP header
B.TCP header
C.Ethernet header ✅
D.Application header
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: At the data‑link layer, the protocol encapsulates the network‑layer packet within an Ethernet frame, which includes an Ethernet header containing source and destination MAC addresses, type field, and other control information. Higher‑layer headers such as IP and TCP remain above this layer.

Q10. How does the Address Resolution Protocol (ARP) relate to MAC addresses at the data‑link layer?

A.ARP assigns permanent MAC addresses to network interfaces
B.ARP translates IP addresses to MAC addresses so frames can be correctly addressed on the local link
C.ARP converts MAC addresses to IP addresses for routing purposes
D.ARP encrypts MAC addresses for security ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: ARP operates at the boundary of the network and data‑link layers. When a host knows the IP address of a destination on the same LAN, it broadcasts an ARP request to discover the corresponding MAC address. The reply provides the MAC address, enabling the sender to construct a correctly addressed Ethernet frame.

Q11. When each hop in a path uses a different frame format, what mechanism ensures end‑to‑end compatibility of the transmitted data?

A.Each router stores all possible frame formats and selects the appropriate one
B.The source host encapsulates the data in a universal format that all hops can decode ✅
C.Routers perform frame translation at each hop, converting the incoming format to the outgoing format
D.The destination host adapts to each format sequentially
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The source host typically encapsulates the payload in a format that is recognized by every intermediate device, such as using a standard Ethernet frame. This universal encapsulation allows each hop to forward the frame without needing to understand higher‑layer specifics, preserving end‑to‑end compatibility.

Q12. What is the primary function of a router in a network?

A.To connect devices within the same local area network using MAC addresses
B.To forward packets between different networks based on IP addresses ✅
C.To provide wireless connectivity to end devices
D.To store and retrieve data for applications
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Routers operate at Layer 3, examining the destination IP address in each packet and making forwarding decisions to move the packet toward its final network. They interconnect distinct network segments, enabling communication across disparate LANs, WANs, or the Internet.

🔗 Related Topics (MCQs)