What are TCP control bits

There are six ‘control bits’ defined in TCP, one or more of which is defined in each packet. The control bits are ‘SYN’, ‘ACK’, ‘PSH’, ‘URG’, ‘RST’, and ‘FIN’. TCP uses these bits to define the purpose and contents of a packet.

SYN bit is used in establishing a TCP connection to synchronize the sequence numbers between both endpoints.

ACK bit is used to acknowledge the remote host’s sequence numbers, declaring that the information in the acknowledgment field is valid.

PSH flag is set on the sending side, and tells the TCP stack to flush all buffers and send any outstanding data up to and including the data that had the PSH flag set. When the receiving TCP sees the PSH flag, it too must flush its buffers and pass the information up to the application.

URG bit indicates that the urgent pointer field has a valid pointer to data that should be treated urgently and be transmitted before non-urgent data.

RST bit tells the receiving TCP stack to immediately abort the connection.

FINbit is used to indicate that the client will send no more data (but will continue to listen for data).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s