Explain TCP header in detail. TCP headers should perform various tasks. The tasks are performed by various ports as follows:
Source Port: On the sending system, a process is being bounded by the source port. A hash between the IP addresses and destination and source ports is used for uniqueness for binding single application or program.
Destination Port: Destination port was directly bounded to a process at the receiving system.
Sequence Number: A number on every packet of TCP which facilitates the TCP stream properly sequenced. The port can then return an acknowledgement after the packet was properly received.
Acknowledge Number: This number is used when a packet at the host is received.
Data offset: The distance of the TCP header and the location of data part of the packet is indicated by data offset.
Reserved bit: The reserved bits are reserved for future usage.
CWR bit: An added bit to RFC 3268 which is used by ECN. CWR bit is used for sending data to inform the receiving part when the congestion window reduced.
ECE bit: An added bit to RFC 3268 which is used by ECN. TCP/IP stack uses this bit on the receiver host for sending the host that is has received a CE packet.
URG bit: To determine the usage of Urgent Pointer Field, this bit is used. 1 is set as to use Urgent pointer and 0 is set not to use Urgent pointer.
ACK bit: A packet is set by this bit that indicates the reply to another packet that data is received.
PSH bit: To communicate any intermediate hosts for sending data on to the actual user.
RST bit: To indicate to the other end for tearing down the TCP connection, Reset bit is used.
SYN bit: When the connection is initially established, SYN is used. The initial packet and the reply SYN are the two instances of the connection.
FIN bit: The host sends FIN bit which indicates that no more data is left for sending. The other end will respond a FIN when there is no data left.
Window bit: Window bit information is used by the host for informing the sender the volume of data the receiver permits a given point of time.
Checksum bit: It is bit for performing checksum on the whole TCP header. It is a one’s complement of the one’s complement sum of every 16 bit word available in the header. The checksum field is set to zero.
Urgent Pointer bit: A pointer bit that point to the end of the data which is considered as urgent.
Options bit: A variable length field which contains optional headers which may be used. It contains an initial field – the length of options field, second field - informs which options are used.
Padding bit: Until the header ends at a 32-bit boundary, the padding of TCP header takes place. The padding always consists of only zeros to ensure the data part of the packet is not lost.
|