JTB 2025. 7. 25. 00:17

 

When data is transmitted between layers in a network stack,

the unit of data at each layer is referred to as a PDU (Protocol Data Unit).

 

A PDU typically consists of:

  • A header: control information specific to the layer
  • A payload: the actual data being transmitted

Each layer has its own name for the PDU:

  • Application Layer: Message
  • Transport Layer: Segment (TCP) / Datagram (UDP)
  • Internet Layer: Packet
  • Link Layer: Frame
  • Physical Layer: Bit

 

 

Among these, bits at the physical layer are the fastest and most efficient to transmit. However, at the application layer, data is typically transmitted as strings because it allows easy extension—such as including authorization tokens or metadata in headers.

 

 


Required Header Information

Although headers may be complex, they must always include two essential types of information:

  1. Layer-Specific Information (defined by the current layer)
    • Transport Layer (Layer 4):
      •    Handles segmentation and reassembly of large data.
      •    Includes fields like sequence number and acknowledgment number (in TCP) to ensure reliable delivery and correct ordering.
    • Internet Layer (Layer 3):
      •    Contains source and destination IP addresses to support logical routing.
    • Link Layer (Layer 2):
      •    Includes source and destination MAC addresses for physical delivery within a local network.
  2. Upper-Layer Protocol Identifier
    •    During decapsulation, the receiving system must determine which upper-layer protocol should handle the payload.
    •    Without this information in the header, the system cannot decide whether to pass the data to TCP, UDP, or other protocols.
    Examples of protocol identifiers:
    •    EtherType (at Layer 2)
    •    Protocol Number (at Layer 3)
    •    Port Number (at Layer 4)

⚠️ A common misconception is that port numbers, while defined in the Layer 4 header, actually indicate which application-layer protocol (e.g., HTTP, DNS) the payload belongs to.

Therefore, each layer's header must include metadata about the protocol used by the next upper layer, not itself.