Skip to content

GATE CS 2021 Set 2 Q7 — Transport Layer: Flow Control, Congestion Control, UDP, TCP, Sockets

Explain with AI

Consider the three-way handshake mechanism followed during TCP\text{TCP} connection establishment between hosts PP and QQ. Let XX and YY be two random 3232-bit starting sequence numbers chosen by PP and QQ respectively. Suppose PP sends a TCP\text{TCP} connection request message to QQ with a TCP\text{TCP} segment having SYN\text{SYN} bit =1=1, SEQ\text{SEQ} number =X=X, and ACK\text{ACK} bit =0=0. Suppose QQ accepts the connection request. Which one of the following choices represents the information present in the TCP\text{TCP} segment header that is sent by QQ to PP?

Choose one option
View worked solution

Answer: C

During the TCP three-way handshake, connection establishment proceeds as follows:

  1. Step 1 (P to Q): Host PP sends a connection request (SYN segment) to Host QQ.
    • SYN bit=1\text{SYN bit} = 1, ACK bit=0\text{ACK bit} = 0
    • SEQ number=X\text{SEQ number} = X (initial sequence number of PP)
  2. Step 2 (Q to P): Host QQ accepts the request and sends a combined acknowledgment and connection request (SYN + ACK segment) back to PP.
    • SYN bit: Since QQ is also initiating its connection direction, SYN bit=1\text{SYN bit} = 1.
    • SEQ number: QQ chooses its own random initial sequence number, so SEQ number=Y\text{SEQ number} = Y.
    • ACK bit: Since this segment carries an acknowledgment, ACK bit=1\text{ACK bit} = 1.
    • ACK number: A SYN segment logically consumes 11 sequence number. Since PP's initial sequence number was XX, QQ acknowledges it by expecting the next sequence number, which is ACK number=X+1\text{ACK number} = X + 1.
    • FIN bit: No connection termination is occurring, so FIN bit=0\text{FIN bit} = 0.

Thus, the header fields in the segment sent by QQ to PP are:

SYN bit=1,SEQ number=Y,ACK bit=1,ACK number=X+1,FIN bit=0\text{SYN bit} = 1, \quad \text{SEQ number} = Y, \quad \text{ACK bit} = 1, \quad \text{ACK number} = X + 1, \quad \text{FIN bit} = 0

This matches Option C.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Transport Layer: Flow Control, Congestion Control, UDP, TCP, Sockets questions