TCP header options

The TCP Transport Layer protocol uses a header with various fields for the purpose of managing session parameters. Within this header, there is an optional "Options" field as shown in the following diagram.

tcp-header.png

The options field can be anywhere between 0 and 320 bits. The length of this field is determined by the data offset field denoted as DO in the above diagram. If the value of the DO field is zero, then there is no options field.

When they exist, options have up to three fields:

  • Option-Kind (1 byte) - indicates the the type of option
  • Option-Length (1 byte) - indicates the length of the option field
  • Option-Data (variable) - contains the data associated with the denoted option

The options field can be used to contain various pieces of information. These include things like maximum segment size, window scale, and timestamps.

The various option types are defined by the IANA.

The truth is that there is relatively limited use of the TCP options field, and most Option-Kind values are either historical, obsolete, experimental or simply unassigned.

Links:

https://forum.networklessons.com/t/tcp-header/1275/60?u=lagapides

https://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-parameters-1

https://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure