0 votes
in Other by
Explain TCP protocol header format?

1 Answer

0 votes
by

TCP wraps each data packet with a header containing 10 mandatory fields totaling 20 bytes (or octets). Each header holds information about the connection and the current data being sent.

The 10 TCP header fields are as follows:

  1. Source port – The sending device’s port.
  2. Destination port – The receiving device’s port.
  3. Sequence number – A device initiating a TCP connection must choose a random initial sequence number, which is then incremented according to the number of transmitted bytes.
  4. Acknowledgment number – The receiving device maintains an acknowledgment number starting with zero. It increments this number according to the number of bytes received.
  5. TCP data offset – This specifies the size of the TCP header, expressed in 32-bit words. One word represents four bytes.
  6. Reserved data – The reserved field is always set to zero.
  7. Control flags – TCP uses nine control flags to manage data flow in specific situations, such as the initiating of a reset.
  8. Window size TCP checksum – The sender generates a checksum and transmits it in every packet header. The receiving device can use the checksum to check for errors in the received header and payload.
  9. Urgent pointer – If URG control flag is set, this value indicates an offset from the sequence number, indicating the last urgent data byte.
  10. mTCP optional data – These are optional fields for setting maximum segment sizes, selective acknowledgments and enabling window scaling for more efficient use of high-bandwidth networks.
...