How TCP 3 way Handshake works ?
TCP Protocol
TCP known as Transmission Control Protocol is a transport layer host-to-host protocol that provides a reliable communication over IP networks between two endpoints.
TCP - A Reliable Protocol
TCP provides recovery of segments that get lost , damaged , duplicated over the end to end communication. The most used protocols like HTTP and SMTP uses TCP methodology.
TCP Flags
·
SYN –
The SYN, or Synchronisation flag, is used as a first step in establishing a
3-way handshake between two hosts.
·
ACK –
The ACK flag, which stands for “Acknowledgment”, is used to
acknowledge the successful receipt of a packet.
·
FIN –
The FIN flag, which stands for “Finished”, means there is no more data from the
sender.
·
URG –
The URG flag is used to notify the receiver to process the urgent packets
before processing all other packets.
·
PSH –
The PSH flag, which stands for “Push”, is somewhat similar to the URG flag
and tells the receiver to process these packets as they are received instead of
buffering them.
·
RST –
The RST flag, which stands for “Reset”, gets sent from the receiver to the
sender when a packet is sent to a particular host that was not expecting it.
·
CWR –
The CWR flag, which stands for Congestion Window Reduced, is used by the
sending host to indicate it received a packet with the ECE flag
set. See RFC 3168 for
more details.
·
NS (experimental) – The NS flag,
which stands for Nonce Sum, is still an experimental flag used to help protect
against accidental malicious concealment of packets from the
sender. See RFC 3540 for
more details.
TCP 3
ways Handshake
The TCP three-way handshake method used
SYN-SYN-ACK method while the communication between the hosts.
TCP 3-Way Handshake Diagram
Below is a (very) simplified diagram of the TCP 3-way handshake process. Have a look at the diagram on the right as you examine the list of events on the left.
| EVENT | DIAGRAM |
Host A sends a TCP SYNchronize packet to Host B
Host B receives A's SYN
Host B sends a SYNchronize-ACKnowledgement
Host A receives B's SYN-ACK
Host A sends ACKnowledge
Host B receives ACK.
TCP socket connection is ESTABLISHED. | TCP Three Way Handshake (SYN,SYN-ACK,ACK) |
Comments
Post a Comment