3.1. Segment Header

To facilitate a stream-based transfer of data over a packet-based network, TCP has to break the data stream into segments, which the network layer will then encapsulate into IP datagrams. Figure 3.1 shows the resulting segment structure. Each segment contains a TCP header in front of the application data, which allows the reassembly of segments into a data stream and supports connection management, reliable delivery, and flow control. The IP layer adds its own header to the segment; for the IP layer, the TCP header is just part of a regular datagram payload. And finally, the physical layer encapsulates the datagram into a frame by adding the MAC header. For performance reasons, TCP tries to choose a segment size that does ...

Get Web Caching and Replication now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.