9.2 TCP Header Options
Mandatory TCP header items take up 20 B. These mandatory items are followed by optional items. An optional item is made up of the optional item type, optional item length, and value. The length of the TCP segment must be a multiple of four. If the header length is not a multiple of four, it is padded with NOP (no operation) options.
Since the header length field of the whole TCP segment is only four bits long, this field can only contain a maximum value of 11112=1510. The header length is determined in multiples of four, so the header can have a maximum length of 15x4=60 bytes. Mandatory items take up 20 bytes, so at the most only 40 bytes are left for optional items.
Figure 9.8 shows some TCP header options and their structure. The most interesting item is the Maximum Segment Size (MSS) optional item. Using this item, both sides of a connection can agree on a maximum segment size at the beginning of the connection.
An example of a TCP segment...