Loading content...
The Data Link Layer is not an isolated component—it exists to serve the layers above it. In network architecture, each layer provides a specific set of services to the layer immediately above. Understanding what services the DLL provides to the Network Layer is fundamental to grasping how internetworking actually functions.
Think of this relationship like a contract: the Network Layer (IP) asks the Data Link Layer to deliver packets to the next hop, and the DLL promises certain capabilities in return. The specifics of this contract determine what the Network Layer can reliably expect—and what responsibilities remain with higher layers.
By the end of this page, you will master: (1) The three fundamental types of DLL service; (2) How each service type is implemented and when it's appropriate; (3) The service primitives and interfaces between layers; (4) Practical examples of service selection in real networks; (5) How the Network Layer adapts to different DLL service levels.
Before diving into specific DLL services, let's establish what "layer services" means in the OSI/networking context.
Service vs. Protocol:
A critical distinction often confused:
Protocol: The rules for communication between peer entities (e.g., the format of Ethernet frames, the CSMA/CD algorithm). Horizontal relationship—it defines how two DLL entities communicate.
Service: What a layer provides to the layer above it. Vertical relationship—it defines what the Network Layer can request from the DLL.
The protocol is the internal mechanism; the service is the external capability provided.
Service Access Points (SAPs):
Layers communicate through Service Access Points—logical interfaces where services are requested and provided. Each SAP has an address that identifies it:
Service Primitives:
The interaction between layers is formally described using service primitives—standardized operations that a layer can request:
For example, to send a packet, the Network Layer issues a DATA.request; when it's sent, the DLL may issue a DATA.confirm. When data arrives, the DLL issues a DATA.indication to the Network Layer.
Service primitives might seem abstract, but they directly inform API design. The socket send() call is fundamentally a DATA.request. Understanding primitives helps you see the architectural reasoning behind networking APIs—they're not arbitrary but reflect formal layer interactions.
The unacknowledged connectionless service is the simplest and most widely used DLL service. It is the default service for Ethernet and most wired LANs.
Characteristics:
Why This Service Works for LANs:
Unacknowledged connectionless service is appropriate when:
Transmission errors are rare: Modern Ethernet over quality cabling has extremely low bit error rates (BER < 10⁻¹²). Most frames are delivered correctly.
Higher layers handle reliability: TCP detects lost segments via timeout and sequence numbers, then retransmits. The DLL doesn't need to duplicate this.
Real-time traffic: VoIP, video streaming—would rather lose a frame than delay waiting for retransmission.
Broadcast/multicast: Acknowledging broadcasts from every receiver would create an ACK implosion.
Service Primitives:
| Primitive | Direction | Description |
|---|---|---|
| DL_UNITDATA.request | Network → DLL | Request to send data unit to specified destination |
| DL_UNITDATA.indication | DLL → Network | Notification that data unit arrived from source |
This service embodies the Internet's 'best effort' philosophy: the network tries its best to deliver data but makes no guarantees. Reliability is pushed to the edges (TCP at endpoints) rather than burdened on every intermediate node. This design principle is fundamental to Internet scalability.
The acknowledged connectionless service adds reliability to connectionless transmission. Each frame is individually acknowledged without establishing a connection.
Characteristics:
When Acknowledged Connectionless Service is Needed:
Unreliable Media: Wireless networks have much higher error rates than wired. Detecting losses at Layer 2 is faster than waiting for TCP timeout.
Real-Time Applications: Some applications need reliability but can't tolerate TCP delay. Localized retransmission is faster.
Remote Links: When round-trip time is high, waiting for end-to-end TCP retransmission wastes time. Link-layer recovery is faster.
The Case of Wireless LANs (802.11):
Wi-Fi uses acknowledged connectionless service at the MAC layer:
This link-layer reliability dramatically improves performance over unreliable wireless channels.
| Primitive | Direction | Description |
|---|---|---|
| DL_DATA_ACK.request | Network → DLL | Request to send data with acknowledgment required |
| DL_DATA_ACK.confirm | DLL → Network | Confirmation that data was acknowledged (or failed) |
| DL_DATA_ACK.indication | DLL → Network | Notification that acknowledged data arrived |
| DL_REPLY.request | Network → DLL | Request to send reply with pending data |
ACKs cost bandwidth and add latency. On reliable media, they're overhead without benefit—wasting capacity for a problem that rarely occurs. On unreliable media, the extra overhead is justified by the much higher loss rate. Choose the service that matches your medium's characteristics.
The connection-oriented service provides the most reliable DLL service. It establishes a logical connection before data transfer, provides sequencing, flow control, and error recovery.
Characteristics:
The Three Phases:
1. Connection Establishment:
2. Data Transfer:
3. Connection Release:
Where Connection-Oriented DLL Service is Used:
HDLC (High-Level Data Link Control): The frame protocol for X.25, Frame Relay, PPP (optional). Provides numbered frames, sliding window flow control.
LLC Type 2: IEEE 802.2 connection-oriented service for legacy Token Ring networks and some industrial protocols.
Specialized Networks: Some industrial control networks and legacy systems use connection-oriented DLL for reliability guarantee.
Modern Perspective:
Connection-oriented DLL service has largely fallen out of favor for general networking. Why?
However, for specific applications—WAN links, virtual circuits, legacy integration—connection-oriented DLL service remains relevant.
HDLC (ISO 13239) is the quintessential connection-oriented DLL protocol. Its concepts—frame format, bit stuffing, supervisory frames (RR, RNR, REJ), sliding window—influenced nearly every subsequent protocol. PPP is a simplified HDLC variant. Even TCP borrowed sliding window concepts. Understanding HDLC is studying the DNA of modern networking.
Choosing the right DLL service type depends on the application requirements and the characteristics of the underlying network technology.
Comprehensive Comparison:
| Characteristic | Unacknowledged Connectionless | Acknowledged Connectionless | Connection-Oriented |
|---|---|---|---|
| Connection Setup | None | None | Required |
| Acknowledgments | None | Per-frame | Sliding window |
| Sequencing | No guarantee | No guarantee | Guaranteed in-order |
| Flow Control | None at DLL | None at DLL | Yes (window-based) |
| Error Recovery | None (silent discard) | Retransmit on timeout | Full recovery |
| Overhead | Minimal | ACK frames | Connection + ACK + state |
| Latency | Lowest | Medium | Highest (setup delay) |
| State Required | None | Minimal (timeout) | Full connection state |
| Typical Use | Ethernet LAN | Wi-Fi, wireless | HDLC, X.25, Frame Relay |
Decision Framework:
When selecting DLL service type (or understanding why a technology uses a specific type), consider:
1. Link Error Rate:
2. Round-Trip Time:
3. Higher-Layer Protocol:
4. Traffic Type:
For the vast majority of modern networks, unacknowledged connectionless service at Layer 2 combined with TCP at Layer 4 is the standard approach. This places reliability at the endpoints where it can be tuned to application needs, while keeping the network core simple and efficient. Wi-Fi's acknowledged service is the notable exception, justified by wireless error rates.
The interface between the Network Layer and the Data Link Layer is where the abstract service definitions become concrete implementation. Understanding this interface illuminates how protocol stacks actually work.
What the Network Layer Provides to DLL:
To transmit a packet, the Network Layer must supply:
What the Network Layer Expects from DLL:
Address Resolution: The Critical Bridge:
The Network Layer uses IP addresses; the DLL uses MAC addresses. Address Resolution Protocol (ARP) bridges this gap:
ARP Operation:
This resolution happens at the boundary between Layer 3 and Layer 2—it's the mechanism that translates logical addressing to physical addressing.
| Operation | Direction | Information Passed |
|---|---|---|
| Send Packet | L3 → L2 | Destination IP/MAC, IP datagram, priority |
| Receive Packet | L2 → L3 | Source MAC, destination MAC, EtherType, payload |
| Get MTU | L3 → L2 | Request for maximum frame payload size |
| Link Status | L2 → L3 | Link up/down, speed change notifications |
| Address Query | L3 → L2 | MAC address of this interface |
The Maximum Transmission Unit (MTU) is perhaps the most important parameter the DLL advertises. For Ethernet, it's 1500 bytes (frame payload, not including header/trailer). If the Network Layer packet exceeds this, it must be fragmented (IPv4) or the sender notified to reduce packet size (Path MTU Discovery). Incorrect MTU handling causes mysterious connectivity problems—packets that work for small requests but fail for large responses.
Implementation Reality:
In actual operating systems, this interface is implemented through:
net_device structure)For example, in Linux:
The Network Layer calls dev_queue_xmit(skb) to transmit
The NIC driver's ndo_start_xmit() function is invoked
Driver programs the NIC to send the frame
NIC generates interrupt when complete
Let's trace through real-world examples of DLL services in action, making the concepts concrete.
Example 1: Web Browsing over Ethernet (Unacknowledged Connectionless)
User requests a webpage:
Example 2: Video Call over Wi-Fi (Acknowledged Connectionless)
VoIP packet sent over wireless:
Example 3: PPP over Serial Link (Connection-Oriented Available)
PPP establishing a connection:
Notice how different services combine: Wi-Fi uses acknowledged connectionless for frame delivery but the VoIP application uses connectionless at Layer 4 (UDP). PPP uses connection-oriented link establishment but can carry connectionless IP traffic. The layers are independent—higher layer service choice doesn't depend on lower layer service type.
We've explored the services that the Data Link Layer provides to the Network Layer—the foundation for all internetworking.
What's Next:
Having explored what services the DLL provides, the final page examines how the DLL is implemented—the hardware and software components that bring these services to life, from NIC silicon to device drivers to protocol stacks.
You now have comprehensive knowledge of the services the Data Link Layer provides to the Network Layer—the interface contract that enables packets to traverse any link technology transparently. This understanding bridges architectural theory and practical network operation.