Open In App

How Many Bytes in TCP Header?

Last Updated : 09 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Answer: The Transmission Control Protocol (TCP) Header is of 20 to 60 bytes, where 40 bytes are for options, and if no options are used the standard length of TCP Header is 20 bytes.

The TCP header is 20 bytes for standard headers. The optional fields can range upto 40 bytes. Below are the fields included in TCP header of length 20 bytes:

  1. Source Port Address (16 bit): It consists of port number of transmitting/source application.
  2. Destination Port Address (16 bit): It consists of port number of transmitting/destination application.
  3. Sequence Number (32 bit): It consists of the byte number of first byte.
  4. Acknowledgement Number (32 bit): It holds the byte number of the byte that receiver expects to receive next.
  5. Header Length (4 bit): It consists of length of TCP header where value is always between 5 and 15
  6. Control Flags (6 bit): It consists of 6 flags of 1 bit size each.
  7. Window Size: (16 bit): It consists of size of window for the sending TCP bytes.
  8. Checksum (16 bit): It consists of checksum that is used for error control.
  9. Urgent Pointer (16 bit): It points to the data that is urgently required by the receiving process.
  10. Reserved bits (6 bit): It is set to zero, and is used for future use.
  11. Optional Data (0 to 40 Bytes): This field consists of data for optional information such as timestamp, window size extension, padding and maximum segment size.

Conclusion

The standard length of TCP header is 20 bytes, where other 40 bytes are optional. If optional bytes are used, the TCP header can be of maximum 60 bytes in length.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads