Worked example 1
A client wants to establish a TCP connection with a server. Describe the three steps of the TCP three-way handshake, identifying the flags (SYN, ACK) used in each packet.
Show solution outline
The TCP three-way handshake ensures both client and server are ready to communicate.
Step 1: SYN The client initiates the connection by sending a TCP packet to the server with the SYN (Synchronise) flag set. This packet essentially says, 'I want to start a connection.'
Step 2: SYN-ACK If the server is ready, it responds with a TCP packet that has both the SYN and ACK (Acknowledge) flags set. This means, 'I acknowledge your request and I also want to establish a connection.'
Step 3: ACK Finally, the client sends a third packet back to the server with the ACK flag set. This acknowledges the server's response and completes the establishment of the connection. 'I acknowledge your readiness, the connection is now open.'
At this point, data transfer can begin.