Data Unit

In the architecture of computer networking, a Data Unit is not a static entity with a fixed size. Instead, it is a conceptual framework used to describe the specific object of data that a protocol operates on at any given layer of the networking stack. Whether a piece of information is called a "segment," a "packet," or a "frame" depends entirely on its position within the hierarchical model and the specific protocol handling it.

To master network communication, one must move beyond seeing data as a continuous stream and instead view it through the lens of encapsulation—the process by which upper-layer information is wrapped in control information to ensure reliable delivery across diverse physical media.
To understand how data moves through a stack, we must distinguish between three critical components that define a data unit at any specific layer:

  • SDU (Service Data Unit): This is the "payload" received from the layer above. It represents the raw data that the current layer is tasked with transporting.
  • PCI (Protocol Control Information): This is the "overhead" added by the current layer. It includes headers (and sometimes trailers) containing essential instructions such as addressing, sequencing, error detection, and flow control.
  • PDU (Protocol Data Unit): This is the complete package formed by the current layer. It is the sum of the control information and the payload, which is then handed down to the next layer.

The relationship can be expressed through a simple fundamental equation:

PDU = PCI + SDU

In this lifecycle, the PDU of the current layer becomes the SDU of the layer immediately below it. This recursive relationship is what allows complex, high-level applications to communicate over simple, low-level electrical or optical signals.

The Lifecycle: Encapsulation and Decapsulation

The movement of data through a network involves two distinct, opposing processes: Encapsulation (at the sender) and Decapsulation (at the receiver).

The Downward Flow (Encapsulation)

When an application initiates a request, such as an HTTP GET, the data travels down the stack. Each layer treats the incoming data as an SDU, attaches its own PCI, and produces a new PDU:

  1. Application Layer: Generates an HTTP Message.
  2. Transport Layer: Takes the HTTP message (SDU), adds a TCP header (PCI), and creates a TCP Segment (PDU).
  3. Network Layer: Takes the TCP segment (SDU), adds an IP header (PCI), and creates an IP Packet or Datagram (PDU).
  4. Data Link Layer: Takes the IP packet (SDU), adds Ethernet headers and trailers (PCI), and creates an Ethernet Frame (PDU).
  5. Physical Layer: Converts the frame into a stream of Bits or Symbols for transmission over the physical medium.

The Upward Flow (Decapsulation)

Upon reaching the destination, the process is reversed. The physical layer receives bits and reconstructs the frame. The data link layer strips the Ethernet header/trailer, verifies integrity, and passes the remaining payload (the IP packet) up to the network layer. This continues until the original HTTP message is delivered to the destination application. Each layer only "cares" about its own PCI; it treats the rest of the PDU as opaque data.

A Comparative Taxonomy of Data Units

Because different protocols have different responsibilities, the terminology used to describe PDUs varies across the OSI or TCP/IP models. While these terms are sometimes used interchangeably in casual conversation, they have specific technical connotations:

Layer Typical Data Unit Common Protocol Examples
Application Message, Data HTTP, DNS, SMTP
Transport Segment (TCP), Datagram (UDP) TCP, UDP
Network Packet, Datagram IP (IPv4/IPv6), ICMP
Data Link Frame Ethernet, PPP, Wi-Fi
Physical Bits, Symbols Electrical signals, Light pulses

It is important to note that the distinction between a "segment" and a "datagram" at the transport layer often reflects the nature of the protocol: TCP is connection-oriented and manages segments for sequencing, while UDP is connectionless and treats data as independent datagrams.

Constraints on Size: MTU and MSS

Data units cannot grow infinitely; they are constrained by the capabilities of the underlying hardware and the protocols used. Two parameters are vital for network engineers to understand:

MTU (Maximum Transmission Unit)

The MTU defines the largest PDU that a specific data link layer can transmit. For standard Ethernet, the MTU is typically 1500 bytes. This limit applies to the IP packet (the SDU of the data link layer). If an IP packet exceeds the MTU of a link in the path, the network must either fragment the packet into smaller pieces or drop it, depending on the configuration.

MSS (Maximum Segment Size)

While MTU limits the entire packet, MSS refers specifically to the maximum amount of actual payload data that a TCP segment can carry. To calculate the MSS, one must subtract the headers from the MTU:

MSS = MTU - (IP Header Size) - (TCP Header Size)

In a standard environment with no options:
MSS = 1500 - 20 (IP) - 20 (TCP) = 1460 bytes.

Fragmentation—the process of breaking a large PDU into smaller ones—is a necessary evil. However, it introduces significant overhead, increases CPU utilization on routers, and can lead to performance degradation or packet loss if a single fragment is lost during transit.

Practical Applications in Network Engineering

Understanding the nuances of data units is not merely a theoretical exercise; it is a prerequisite for high-level network operations:

  • Packet Analysis: Tools like Wireshark allow engineers to visualize the encapsulation process. By inspecting the PDU, one can see exactly where a header is malformed or where a checksum fails.
  • Performance Optimization: Tuning MTU and MSS settings is critical in environments involving VPNs or Tunneling (like GRE or IPsec). These technologies add extra headers (PCI), which reduces the available space for the SDU, potentially triggering inefficient fragmentation.
  • Security Analysis: Many network attacks exploit the way data units are handled. For example, fragmentation attacks involve sending overlapping or malformed fragments to bypass firewalls or crash target systems.
  • Troubleshooting: A classic symptom of an MTU mismatch is a connection that allows small packets (like a ping) but fails to load large web pages or transfer files. This is a direct consequence of the path's inability to handle the required PDU size.

Conclusion

The concept of the Data Unit provides the essential vocabulary for describing how information is structured, protected, and moved across a network. By mastering the relationship between SDU, PCI, and PDU, and understanding the mechanics of encapsulation, one gains the ability to deconstruct complex network behaviors. In the end, the entire internet functions on a simple, elegant principle: upper-layer data becomes the payload for the layer below, while lower-layer control information ensures that the payload reaches its destination intact.