A connection must be established before any data can be delivered, and this transport protocol ensures that the recipient recognises each and every bit of data that is sent to it.

The most popular transport layer in computer networking is it. It offers data packet delivery that is dependable, well-organized, and error-checked via an IP network. The TCP header, which is an essential component of the TCP segment, contains a number of the fields listed below:-

Source Port (16 bits): This parameter contains the port number of the application or process that sent the message.

Destination Port (16 bits):

  •  This field identifies the port number of the receiving application or process.

Sequence Number (32 bits): Ø This field indicates the sequence number of the first data byte in the TCP segment. It allows the receiver to reorder received segments.

Acknowledgment Number (32 bits):       This parameter specifies the following sequence number the sender of the ACK               anticipates receiving if the ACK flag is set. In order to inform the sender that the receiver has received the previous segment and    is now anticipating the next segment, the receiver will add 1 to the received sequence number.                                                                 —  

Data Offset (4 bits):

  • This field specifies the length of the TCP header in 32-bit words (i.e., the number of 32-bit words in the header). This field is needed because TCP allows for variable-length options to be included in the header.

Reserved (6 bits):

  • These bits are reserved for future use and must be set to zero.

Control Flags (6 bits):

    URG (Urgent ): Indicates that the Urgent Pointer field is significant and contains a valid value.

    ACK (Acknowledgment): Indicates that the Acknowledgment Number field is significant and contains a valid value.

    PSH (Push): Requests the receiver to deliver the data to the receiving application as soon as possible.

    RST (Reset):  The connection is reset by this bit. We are required to immediately cut off the connection whenever we receive this bit.

    SYN (Synchronize): This flag is responsible for the initiation of 3-way handshake. And it set the initial sequence number.

    FIN (Finish): This bit is used to terminate the TCP connection. As TCP is a full duplex so both the sending and receiving party will use the FIN bit to terminate the connection.

Window Size (16 bits): This field specifies the number of bytes the sender of the TCP segment is willing to receive starting from the Acknowledgment Number.

Checksum (16 bits): This field is used for error checking. It verifies the integrity of the TCP header and data.

Urgent Pointer (16 bits): This field is used when the URG control flag is set. It points to the sequence number of the last urgent data byte in the TCP segment.

Options (variable length): This field allows for additional TCP options, such as Maximum Segment Size (MSS), selective acknowledgments (SACKs), and window scaling, to be included in the TCP header.

MSS: The client tells about the packet size which it can accept from the server. This option field is used in the SYN packet when the client establishes a connection with the server.

Window Scaling: Using the window scaling option, the client can tell the server its scaling factor, which gives the sender the capability to advertise its buffer size up to 230=1 GB. TCP window scale is an option used to increase the maximum window size from 65,535 bytes to 1 Gigabyte.

TCP FastOpen: The client first tells the server in the SYN packet that it supports TCP FastOpen.

  • Then the server sends encrypted cookies in the SYN+ACK packet
  • TFO avoids a 3-way-handshake each time the client request server for connection establishment. Using TFO client can directly send GET requests to the server.

Padding (variable length): This field is used to ensure that the TCP header ends on a 32-bit boundary if the options field is not a multiple of 32 bits.

Leave a Reply

Your email address will not be published. Required fields are marked *