What is a the TCP three-way handshake?
TCP is a “connection-oriented” protocol. This means that before you send data across it, you must first establish the connection. In English terms, the TCP Three-Way Handshake (TWHS) is the following: • I would like to talk to you • Sure, let’s talk • Thanks TCP is a “reliable” service, meaning that everthing has to be acknowledged in order to verify that it was received correctly. Similar protocols to TCP use 2, 3, or 4 packet handshakes in order to setup the connection. An amazing amount of work went into choosing the optimal 3 packet exchange. In TCP-speak, we view this exchange as : • SYN • SYN-ACK • ACK Where “SYN” is a flag in the TCP header that means “let’s start talking”, and which only occurs in the first two packets in the exchange. The “ACK” field means that the “acknowledgement” field is valid. TCP has this interesting concept that every packet acknowledges receipt of data in the other direction. So if I send you one packet and you send me five in response, then each of yo