Consider the three way hand shaking process followed during TCP connection…
2024
Consider the three way hand shaking process followed during TCP connection establishment between two hosts A and B. Let S and R be two random 32-bit starting sequence numbers chosen by A and B, respectively. Suppose A sends a TCP segment having SYN bit=1, SEQ number=S and ACK bit=0 and B accepts the connection request.
Which one of the following choices represents the information present in the TCP segment header that is sent by B to A?
- A.
SYN bit=1, SEQ number=S+1, ACK bit=0, ACK number=R, FIN bit=0
- B.
SYN bit=0, SEQ number=R, ACK bit=1, ACK number=S+1, FIN bit=0
- C.
SYN bit=1, SEQ number=R, ACK bit=1, ACK number=S+1, FIN bit=0
- D.
SYN bit=1, SEQ number=R, ACK bit=1, ACK number=S, FIN bit=0
Attempted by 142 students.
Show answer & explanation
Correct answer: C
Answer: The TCP segment sent by B should have SYN bit=1, SEQ number=R, ACK bit=1, ACK number=S+1, FIN bit=0.
Explanation:
Step 1 — Client to Server: The client (A) sends SYN=1, SEQ=S. The SYN consumes one sequence number (so the next expected sequence from A is S+1).
Step 2 — Server to Client: The server (B) must both acknowledge A's SYN and send its own SYN. Therefore B sends SYN=1 and ACK=1. B uses its own initial sequence number SEQ=R, and sets ACK number=S+1 to acknowledge the client's SYN (which consumed one sequence number). FIN=0 because the connection is not being closed.
Step 3 — Client to Server: Finally A sends an ACK with ACK=1 and ACK number=R+1 (acknowledging B's SYN) and SEQ=S+1.
Key point: Each SYN consumes one sequence number, so the acknowledgements are the other side's initial sequence number plus one.
A video solution is available for this question — log in and enroll to watch it.