100% found this document useful (1 vote)
158 views

Computer Network - TCP Flags

The document discusses TCP flags used in computer networks. The most commonly used flags are SYN, ACK, and FIN. SYN is used in the three-way handshake process to synchronize sequence numbers between hosts establishing a connection. ACK acknowledges successfully received packets and contains a valid acknowledgement number. FIN is used to request termination of a connection when there is no more data to send. Other flags like RST and PSH are used to terminate connections if something is wrong or tell the receiver to immediately process packets instead of buffering them.

Uploaded by

Mohit Saini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
158 views

Computer Network - TCP Flags

The document discusses TCP flags used in computer networks. The most commonly used flags are SYN, ACK, and FIN. SYN is used in the three-way handshake process to synchronize sequence numbers between hosts establishing a connection. ACK acknowledges successfully received packets and contains a valid acknowledgement number. FIN is used to request termination of a connection when there is no more data to send. Other flags like RST and PSH are used to terminate connections if something is wrong or tell the receiver to immediately process packets instead of buffering them.

Uploaded by

Mohit Saini
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Network | TCP flags

In TCP connection, flags are used to indicate a particular state of connection or to provide some
additional useful information like troubleshooting purposes or to handle a control of a particular
connection. Most commonly used flags are “SYN”, “ACK” and “FIN”. Each flag corresponds
to 1 bit information.
Types of Flags:
 Synchronization (SYN) – It is used in first step of connection establishment phase or 3-
way handshake process between the two hosts. Only the first packet from sender as well
as receiver should have this flag set. This is used for synchronizing sequence number i.e.
to tell the other end which sequence number they should except.
 Acknowledgement (ACK) – It is used to acknowledge packets which are successful
received by the host. The flag is set if the acknowledgement number field contains a valid
acknowledgement number.
In given below diagram, the receiver sends an ACK = 1 as well as SYN = 1 in the second
step of connection establishment to tell sender that it received its initial packet.

 Finish (FIN) – It is used to request for connection termination i.e. when there is no more
data from the sender, it requests for connection termination. This is the last packet sent by
sender. It frees the reserved resources and gracefully terminate the connection.
 Reset (RST) – It is used to terminate the connection if the RST sender feels something is
wrong with the TCP connection or that the conversation should not exist. It can get send
from receiver side when packet is send to particular host that was not expecting it.
Finish (FIN) v/s Reset (RST) –

Push (PSH) – Transport layer by default waits for some time for application layer to send
enough data equal to maximum segment size so that the number of packets transmitted on
network minimizes which is not desirable by some application like interactive
applications(chatting). Similarly transport layer at receiver end buffers packets and transmit to
application layer if it meets certain criteria.
This problem is solved by using PSH. Transport layer sets PSH = 1 and immediately sends the
segment to network layer as soon as it receives signal from application layer. Receiver transport
layer, on seeing PSH = 1 immediately forwards the data to application layer.
In general, it tells the receiver to process these packets as they are received instead of buffering
them.

You might also like