Question
Consider the three-way handshake mechanism followed during TCP connection establishment between hosts and . Let and be two random 32-bit starting sequence numbers chosen by and respectively. Suppose sends a TCP connection request message to with a TCP segment having SYN bit = 1, SEQ number = , and ACK bit = 0. Suppose accepts the connection request. Which one of the following choices represents the information present in the TCP segment header that is sent by to ?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2021 answer key
Solution
Follow the sequence numbers and control flags used in the second message (SYN-ACK) of the TCP three-way handshake.
In TCP connection establishment:
- Host sends a SYN segment: .
- Host responds with a SYN + ACK segment: it acknowledges 's SYN by setting and (since the SYN consumes one sequence number). At the same time, initiates its own sequence stream by setting with its initial sequence number . The connection is not terminating, so .
Thus, the segment sent by has , , , , and . This matches option C.
C
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2021 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 17 of 65, printed as CS Q.7
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.