Consider the three-way handshake mechanism followed during TCP connection…
2021
Consider the three-way handshake mechanism followed during TCP connection establishment between hosts P and Q. Let X and Y be two random 32-bit starting sequence numbers chosen by P and Q respectively. Suppose P sends a TCP connection request message to Q with a TCP segment having SYN bit =1, SEQ number =X, and ACK bit =0. Suppose Q accepts the connection request. Which one of the following choices represents the information present in the TCP segment header that is sent by Q to P?
- A.
SYN bit =1, SEQ number =X+1, ACK bit =0, ACK number =Y, FIN bit =0
- B.
SYN bit =0, SEQ number =X+1, ACK bit =0, ACK number =Y, FIN bit =1
- C.
SYN bit =1, SEQ number =Y, ACK bit =1, ACK number =X+1, FIN bit =0
- D.
SYN bit =1, SEQ number =Y, ACK bit =1, ACK number =X, FIN bit =0
Attempted by 155 students.
Show answer & explanation
Correct answer: C
Key idea: the server replies with a SYN+ACK using its own initial sequence number and acknowledges the client's SYN by adding 1 to the client's ISN.
Step 1: P sends SYN with SEQ = X (ACK=0).
Step 2: Q replies with SYN=1 and ACK=1, SEQ = Y (Q's ISN), ACK number = X+1 (acknowledging the SYN which consumes one sequence number).
Step 3: P sends final ACK with ACK number = Y+1 to complete the three-way handshake.
Therefore, the TCP header sent by Q contains: SYN = 1, SEQ = Y, ACK = 1, ACK number = X+1, FIN = 0.
A video solution is available for this question — log in and enroll to watch it.