Skip to main content

Posts

Showing posts with the label TCP connection establishment and termintaion

Handshake in TCP

3 way Handshake: When TCP establishes the connection. Steps followed: 1) SYN packet is sent by A to B with a random sequence number(for initial seq. no.), say SYN 1000 as a request to establish the connection. 2) B sends ACK 1001 indicating to send the packet 1001 assuring the request to be accepted. 3) A sends ACK 1001 to indicate that it has received the request confirmation. 4 Way Handshake: When there's a connection termination then 4 way handshake is used. For termintation of connection in one direction: 1) FIN packet is sent 2) Other party acknowledges it Similar process is followed for connection to end the other way as it's a full duplex connection.