Segment
Definition
A Segment is the Protocol Data Unit (PDU) at the Transport Layer (Layer 4) when using TCP, formed by combining Application Layer data with a TCP header.
What Problem It Solves
It allows the Transport Layer to add important control information (like port numbers, sequencing, and reliability features) so that data can be delivered correctly to the right application on the destination device.
What Happens If Not Used
Without segmentation, data could not be properly organized, tracked, or reliably delivered between applications, leading to loss, duplication, or misordering of information.
Easy Wording
A segment is data wrapped with TCP information so it can be safely sent to the correct application.
Layman Example
It’s like putting a letter (data) inside an envelope (TCP header) that has delivery instructions like sender and receiver details.
Technical Example
At Layer 4 (TCP), the process is:
- Application data (Layer 5) is received
- TCP adds a header containing:
- Source port
- Destination port
- Sequence number
- Acknowledgment number
- Control flags The result is called a TCP Segment, which is then passed to the Network Layer for further encapsulation.