TRANSMISSION CONTROL PROTOCOL (TCP) HEADER FORMAT

If you have any queries please leave a message here
Your Message
×



TCP Header Format

Field Name
Size (bits)
Description
Source Port
16 bits
The 16-bit port number of the process that originated the TCP segment on the source device. This will normally be an ephemeral (client) port number for a request sent by a client to a server, or a well-known/registered (server) port number for a reply from a server to a client.
Destination Port
16 bits
The 16-bit port number of the process that is the ultimate intended recipient of the message on the destination device. This will usually be a well-known/registered (server) port number for a client request, or an ephemeral (client) port number for a server reply.
Sequence Number
32 bits
TCP refers to each byte of data individually and uses sequence numbers to keep track of which bytes have been sent and received. Stated differently, 32 bit number used for byte level numbering of TCP segments. If you are using TCP, each byte of data is assigned a sequence number. Since the sequence number refers to a byte count process of a message. In practical, a segment of a message contains many bytes of data and it is not possible to adding sequence number field for each byte of a segment. In this case TCP calculate the last byte's sequence number of a segment, adding the segment size with the sequence number.
Acknowledgement Number
32 bits
This is used by the sender to acknowledge the received data. It is a 32 bit number field which indicates the next sequence number that the sending device is expecting from the receiving device. The receiver generates Acknowledgement Number, adding 1 with the last byte's sequence number of a receiving packet.
Header Length
4 bits
This field provides the length of the IP header. The length of the header is represented in 32 bit words. This length also includes IP options (if any). Since this field is of 4 bits so the maximum header length allowed is 60 bytes. Usually when no options are present then the value of this field is 5. here 5 mean five 32 bit words that is 5*4=20 bytes.
Reserve
6 bits
This 6 bit field is reserved for future use. The value set in this field must be zero.
Control Flag
6 bits
This field contains six different control flags that can control certain aspects of the TCP connections such as connection establishment, connection termination and flow control. (See Control Flags Table)
Window
16 bits
This indicates the number of octets of data the sender of this segment is willing to accept from the receiver at one time. This normally corresponds to the current size of the buffer allocated to accept data for this connection. In other words, this field is the current receive window size for the device sending this segment, which is also the send window for the recipient of the segment.
Checksum
16 bits
This is a 16-bit checksum for data integrity protection, computed over the entire TCP datagram, plus a special pseudo header of fields. It is used to protect the entire TCP segment against errors in transmission as well as errors in delivery. Optional alternate checksum methods are also supported.
Urgent Pointer
16 bits
Option
Variable
One or more of several types of options may be included after the standard headers in certain IP datagrams.
Padding
Variable
If one or more options are included, and the number of bits used for them is not a multiple of 32, enough 0 bits are added to pad out the header to a multiple of 32 bits (four bytes).
Data
Variable
This is the data that will be transmitted in the datagram. It is either an entire higher-layer message or a fragment of one.


Control Flags Table

Subfield Name
Size (bits)
Description
Urgent Pointer (URG)
1 bit
When set to 1, indicates that the current segment contains urgent (or high-priority) data
Acknowledgement (ACK)
1 bit
When set to 1, indicates that this segment is carrying an acknowledgment, and the value of the Acknowledgment Number field is valid and carrying the next sequence expected from the destination of this segment.
Push (PSH)
1 bit
The sender of this segment is using the TCP push feature, requesting that the data in this segment be immediately pushed to the application on the receiving device. It is useful for transmitting small units of data.
Reset (RST)
1 bit
The sender has encountered a problem and wants to reset the connection.
Synchronize (SYN)
1 bit
This segment is a request to synchronize sequence numbers and establish a connection; the Sequence Number field contains the Sequence Number of the sender of the segment.
Finish (FIN)
1 bit
The sender of the segment is requesting that the connection be closed.



ABOUT US

QuestionSolves.com is an educational website that helps worldwide students in solving computer education related queries.

Also, different software like Visual Studio, SQL Server, Oracle etc. are available to download in different versions.

Moreover, QuestionSolves.com provides solutions to your questions and assignments also.


MORE TOPIC


Windows Command

UNIX Command

IGNOU Assignment Solution

IGNOU Question Paper Solution

Solutions of Different Questions


WHAT WE DO


Website Devlopment

Training

Home Learning

Provide BCA, MCA Projects

Provide Assignment & Question Paper Solution


CONTACT US


Follow Us