Header size considerations
As we discussed in Chapter 2, most IP packets have a 20-byte header, with a maximum of 60 bytes being used for this data. TCP segments also have their own header information, with a minimum value of 20 bytes (the most common), and a maximum size of 60 bytes. Taken together, most TCP/IP datagram have 40 bytes of header data (20 from IP and 20 from TCP), with the maximum amount of header data being limited to 120 bytes (60 bytes from IP and TCP each).
Whenever TCP creates a segment, it must leave room for these headers. Otherwise, the IP packet that was generated would exceed the MTU/MRU pair in use on that virtual circuit, resulting in fragmentation.
Although RFC 1122 states that TCP implementations must set aside 40 bytes of data when a segment is created, this isn’t always enough. For example, some of the new advanced TCP options utilize an additional 10 or more bytes. If this information isn’t taken into consideration, then fragmentation will likely occur.
TCP is able to determine much of this information, but not always. If the underlying IP stack also utilizes IP options that TCP is not aware of, then TCP will not make room for them when segments are created. This will also likely result in fragmentation.
For more information on IP header sizes, refer to Section 2.2 in Chapter 2. For more information on TCP header sizes, refer to Section 7.2 later in this chapter.
Get Internet Core Protocols: The Definitive Guide 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.