0
0
Computer Networksknowledge~6 mins

Protocol Data Units at each layer in Computer Networks - Full Explanation

Choose your learning style9 modes available
Introduction
Imagine sending a letter through the mail. To get it to the right place, the letter is put inside an envelope, then inside a package, and so on. In computer networks, data is also wrapped in layers to travel from one device to another. Each layer adds its own information, and the wrapped data at each step is called a Protocol Data Unit, or PDU.
Explanation
Application Layer PDU
At the top layer, the data is the actual message or information you want to send, like an email or a web page. This data is called 'Data' because it is the raw content before any network packaging happens.
The Application Layer PDU is the original message or content to be sent.
Transport Layer PDU
Here, the data is divided into smaller pieces called segments or datagrams. The transport layer adds information like source and destination ports to help deliver the data to the right application on the receiving device.
The Transport Layer PDU is called a segment or datagram and includes port information.
Network Layer PDU
At this layer, the segment is wrapped into a packet. The network layer adds source and destination IP addresses to guide the packet through different networks to reach the correct device.
The Network Layer PDU is called a packet and contains IP addresses for routing.
Data Link Layer PDU
The packet is then placed inside a frame at the data link layer. This frame includes physical addresses (MAC addresses) to deliver the data within the local network segment.
The Data Link Layer PDU is called a frame and uses MAC addresses for local delivery.
Physical Layer PDU
Finally, the frame is converted into bits—ones and zeros—that travel over cables, wireless signals, or other physical media. This raw bit stream is the physical layer's PDU.
The Physical Layer PDU is the raw bits sent over the physical medium.
Real World Analogy

Sending a message through the mail involves putting a letter inside an envelope, then placing that envelope inside a box, and finally handing it to a delivery truck. Each step adds a layer of packaging and information to ensure the message reaches the right person.

Application Layer PDU → The letter containing the actual message.
Transport Layer PDU → The envelope that directs the letter to the correct recipient within a building.
Network Layer PDU → The box with the address of the building to guide delivery.
Data Link Layer PDU → The label on the box that helps the local delivery person find the right door.
Physical Layer PDU → The truck carrying the box as a stream of packages.
Diagram
Diagram
┌─────────────────────┐
│ Application Layer    │
│ PDU: Data           │
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│ Transport Layer      │
│ PDU: Segment/Datagram│
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│ Network Layer        │
│ PDU: Packet         │
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│ Data Link Layer      │
│ PDU: Frame          │
└──────────┬──────────┘
           │
┌──────────▼──────────┐
│ Physical Layer       │
│ PDU: Bits           │
└─────────────────────┘
This diagram shows the layers of a network stack with their corresponding Protocol Data Units (PDUs) from top to bottom.
Key Facts
Protocol Data Unit (PDU)A unit of data specified at a particular layer of the network model.
SegmentThe Transport Layer PDU used in TCP communication.
PacketThe Network Layer PDU that contains IP addresses for routing.
FrameThe Data Link Layer PDU that includes MAC addresses for local delivery.
BitsThe Physical Layer PDU representing raw data sent over the medium.
Common Confusions
Thinking the same PDU name applies to all layers.
Thinking the same PDU name applies to all layers. Each layer has a specific PDU name reflecting its role, such as segment at Transport and frame at Data Link.
Believing data is sent as one big chunk without layering.
Believing data is sent as one big chunk without layering. Data is wrapped and processed layer by layer, each adding its own header or information.
Summary
Data sent over networks is wrapped in layers, each with its own Protocol Data Unit (PDU) name.
The PDU names from top to bottom are Data, Segment/Datagram, Packet, Frame, and Bits.
Each PDU adds information to help deliver the message correctly through the network.