Computer Sciences > GATE 2024 SET-1 > TCP/IP
TCP client P successfully establishes a connection to TCP server Q. Let NP denote the sequence number in the SYN sent from P to Q. Let NQ denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?
A
The sequence number NP is chosen randomly by P
B
The sequence number NP is always 0 for a new connection
C
The acknowledgement number NQ is equal to NP
D
The acknowledgement number NQ is equal to NP+ 1

Correct : a,d

The correct answers are A and D.
To understand why, let''s quickly walk through what actually happens during a TCP connection setup — commonly known as the three-way handshake.
When client P wants to connect to server Q, it sends a SYN (synchronize) segment. This SYN carries a sequence number NP, which is called the Initial Sequence Number (ISN). Now here''s the important part — this number is not always 0. It is randomly chosen by the client. This is by design. TCP deliberately picks a random ISN to avoid security issues like session hijacking and to prevent old duplicate packets from a previous connection on the same port pair from being mistakenly accepted by a new session. So Option A is correct and Option B is wrong.
Once server Q receives the SYN with sequence number NP, it replies with a SYN-ACK. In this SYN-ACK, the server sets the acknowledgement number to NP + 1. This is TCP''s way of saying — "I received your SYN (which consumed one sequence number), and I''m now expecting the next byte starting from NP + 1." So Option D is correct and Option C is wrong — NQ is not equal to NP, it is NP + 1.

Similar Questions

Consider the following statements. I. TCP connections are full duplex. II. TCP has no option for selective acknowledgment III. TCP connections are message st...
#29 MCQ
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are False with respect to the TCP connection? I. If the s...
#535 Fill in the Blanks
Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per-second). The session starts with a sequence number of 1234. The minimum...
#607 Fill in the Blanks

Related Topics

GATE 2024 GATE Computer Science TCP/IP TCP Three Way Handshake Sequence Number Acknowledgement Number SYN SYN-ACK Computer Networks GATE Initial Sequence Number ISN TCP GATE CS Set 1 Q28 TCP Connection Establishment GATE Previous Year Questions CS

Unique Visitor Count

Total Unique Visitors

Loading......