Book Image

Understanding TCP/IP

By : CP Books a.s.
Book Image

Understanding TCP/IP

By: CP Books a.s.

Overview of this book

This book covers in detail the Open System Interconnection (OSI) reference model and the TCP/IP protocols that operate that different layers. Its coverage includes various application protocols. The authors explain in an easy-to-read style networking concepts and protocols, with examples that make the book a practical guide in addition to its coverage of theory.
Table of Contents (20 chapters)
19
Index

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.

9.2 TCP Header Options

Figure 9.8: Some TCP options

An example of a TCP segment...