Serving Information Simply

Time to Read

3 minutes

What is TCP (Transmission Control Protocol)?

  • TCP (Transmission Control Protocol) is a standard that defines how to establish and maintain a network conversation through which application programs can exchange data. 
  • TCP is a connection-oriented protocol, TCP requires that connection between two remote points be established before sending actual data.
  • TCP ensures that the data reaches intended destination in the same order it was sent.
  • TCP provides error-checking and recovery mechanism.
  • TCP provides flow control and quality of service.
  • TCP operates in Client/Server point-to-point mode.
  • TCP provides full duplex server, i.e. it can perform roles of both receiver and sender.
  • The Internet Engineering Task Force (IETF) defines TCP in the Request for Comment (RFC) standards document number 793.


The length of TCP header is minimum 20 bytes long and maximum 60 bytes.

  • Source Port (16-bits) – It identifies source port of the application process on the sending device.
  • Destination Port (16-bits) – It identifies destination port of the application process on the receiving device.
  • Sequence Number (32-bits) – Sequence number of data bytes of a segment in a session.
  • Acknowledgement Number (32-bits) – When ACK flag is set, this number contains the next sequence number of the data byte expected and works as acknowledgement of the previous data received.
  • Data Offset (4-bits) – This field implies both, the size of TCP header (32-bit words) and the offset of data in current packet in the whole TCP segment.
  • Reserved (3-bits) – Reserved for future use and all are set zero by default.
  • Flags (1-bit each)
  1. NS – Nonce Sum bit is used by Explicit Congestion Notification signaling process.
  2. CWR – When a host receives packet with ECE bit set, it sets Congestion Windows Reduced to acknowledge that ECE received.
  3. ECE –It has two meanings:
    1. If SYN bit is clear to 0, then ECE means that the IP packet has its CE (congestion experience) bit set.
    1. If SYN bit is set to 1, ECE means that the device is ECT capable.
  1. URG – It indicates that Urgent Pointer field has significant data and should be processed.
  2. ACK – It indicates that Acknowledgement field has significance. If ACK is cleared to 0, it indicates that packet does not contain any acknowledgement.
  3. PSH – When set, it is a request to the receiving station to PUSH data (as soon as it comes) to the receiving application without buffering it.
  4. RST – Reset flag has the following features:
    1. It is used to refuse an incoming connection.
    1. It is used to reject a segment.
    1. It is used to restart a connection.
  1. SYN – This flag is used to set up a connection between hosts.
  2. FIN – This flag is used to release a connection and no more data is exchanged thereafter. Because packets with SYN and FIN flags have sequence numbers, they are processed in correct order.
  3. Windows Size (16-bits) – This field is used for flow control between two stations and indicates the amount of buffer (in bytes) the receiver has allocated for a segment, i.e. how much data is the receiver expecting.
  • Checksum (16-bits) – This field contains the checksum of Header, Data and Pseudo Headers.
  • Urgent Pointer (16-bits) – It points to the urgent data byte if URG flag is set to 1.
  • Options (variable 0-320-bits) – It facilitates additional options which are not covered by the regular header. Option field is always described in 32-bit words. If this field contains data less than 32-bit, padding is used to cover the remaining bits to reach 32-bit boundary.
  • Padding –The TCP header padding is used to ensure that the TCP header ends, and data begins, on a 32-bit boundary. The padding is composed of zeros.


Leave a Reply

Sanchit Agrawal

Blog Author


Discover more from Sanchit Gurukul

Subscribe now to keep reading and get access to the full archive.

Continue Reading

%d bloggers like this: