Consider the 3-way handshaking protocol for TCP connection establishment. Let…
2025
Consider the 3-way handshaking protocol for TCP connection establishment. Let the three packets exchanged during the connection establishment be denoted as P1, P2, and P3, in order. Which of the following option(s) is/are TRUE with respect to TCP header flags that are set in the packets?
- A.
P3: SYN = 1, ACK = 1
- B.
P2: SYN = 1, ACK = 1
- C.
P2: SYN = 0, ACK = 1
- D.
P1: SYN = 1
Attempted by 142 students.
Show answer & explanation
Correct answer: B, D
Correct statements: P2: SYN = 1, ACK = 1 and P1: SYN = 1
Three-way handshake (flags and purpose):
Packet 1 (client -> server): P1 sets SYN = 1. This is the initial connection request and carries the client's initial sequence number. The ACK bit is not set (ACK = 0).
Packet 2 (server -> client): P2 sets SYN = 1 and ACK = 1. The server replies with a SYN+ACK to advertise its own sequence number and to acknowledge the client's SYN (acknowledgement number = client ISN + 1).
Packet 3 (client -> server): P3 sets ACK = 1 and SYN = 0. The client acknowledges the server's SYN (acknowledgement number = server ISN + 1) and does not set SYN.
Why the other statement is false:
The statement "P3: SYN = 1, ACK = 1" is incorrect because the final packet from the client is an ACK-only packet (SYN = 0).
The statement "P2: SYN = 0, ACK = 1" is incorrect because the server's reply includes its own SYN, so P2 has SYN = 1 and ACK = 1.
Summary: The correct flag settings are: P1 (client) SYN = 1, ACK = 0; P2 (server) SYN = 1, ACK = 1; P3 (client) SYN = 0, ACK = 1.
A video solution is available for this question — log in and enroll to watch it.