Log In
2 votes

Consider the three-way handshake mechanism followed during $\text{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 $\text{TCP}$ connection request message to $Q$ with a $\text{TCP}$ segment having $\text{SYN}$ bit $=1$, $\text{SEQ}$ number $=X$, and $\text{ACK}$ bit $=0$. Suppose $Q$ accepts the connection request. Which one of the following choices represents the information present in the $\text{TCP}$ segment header that is sent by $Q$ to $P$?

  1. $\text{SYN}$ bit $=1$, $\text{SEQ}$ number $=X+1$, $\text{ACK}$ bit $=0$, $\text{ACK}$ number $=Y$, $\text{FIN}$ bit $=0$
  2. $\text{SYN}$ bit $=0$, $\text{SEQ}$ number $=X+1$, $\text{ACK}$ bit $=0$, $\text{ACK}$ number $=Y$, $\text{FIN}$ bit $=1$
  3. $\text{SYN}$ bit $=1$, $\text{SEQ}$ number $=Y$, $\text{ACK}$ bit $=1$, $\text{ACK}$ number $=X+1$, $\text{FIN}$ bit $=0$
  4. $\text{SYN}$ bit $=1$, $\text{SEQ}$ number $=Y$, $\text{ACK}$ bit $=1$, $\text{ACK}$ number $=X$, $\text{FIN}$ bit $=0$
in Computer Networks
recategorized by
Answer C:

Since sender will send its sQno. x and reciver will send ACK no. x+1 to make sure the sender that i recieved x and send now x+1 Byte

SYN bit = 1 for synchronise

ACK bit = 1 because reciever giving ackonwledgement to sender,   

FIN bit = 0 because it is used for termination connection
SYN and FIN consumes one sequence number whereas pure ACK not consumes any sequence number.

So by this conclusion we can easily derive that SYN segment sent by P to Q having sequence number X will be consumed and next sequence number of X+1 is expected by the receiver Q.

So Q will sent ACK number as X+1 with ACK flag set.

Also, it needs to SYN its sequence number so it sends it Y sequence number with its SYN flag set.

5 Answers

3 votes
Best answer

Host $P$ sends the first SYN packet with $SEQ$ number $= X$,  $SYN$ flag $= 1$ and $ACK$ flag $=0$ as it’s a connection request.

Host $Q$ will reply back with a SYN packet and acknowledging the arrival of $P’s$  SYN packet.

Host $Q$ will send a packet with $\textbf{SYN flag =1}$$\textbf{SEQ number = Y}$ ,  to synchronize and establish the connection,

and $\textbf{ACK flag = 1}$ to acknowledge the $P’s$ SYN packet, with $\textbf{ACK number = X+1}$ because ACK number denotes the sequence number of next expecting Byte.

Then $P$ will reply back with an $ACK$ packet to complete the three-way handshake. (not asked here)

$FIN$ flag is used to terminate the connection, and will not be used here, $\textbf{FIN flag = 0}$.

Hence C is correct.

selected by
4 votes
SYN bit is used for Synchronize Sequence Number.

FIN bit used for End of transmission.

ACK bit used whenever you’re sending Acknowledgement of received Data.


Q accepted the connection request of P, So Q should send the acknowledment.

P sent the Data with Sequence number X, So Q acknowledge it as X+1. i.e., My requirement is X+1 now.

ACK bit = 1, and ACK = X+1.


Since it is three way hand-shaking, when P sent as SYN=1, then Q need to sent SYN=1 and FIN=0.

after that, Whenever Someone wants to end the transmission, then they will send FIN=1.


Option C is correct.
0 votes
Syn bit is Synchronization bit which will be 1 for the initial transmissions from both sides.

SEQ number:- Will be the number which Q wants to send to P so It will be Y.

ACK bit:- It will be 1 because Q received seq number X from P.

Ack number:- The number which Q expect from P in the next transmission so will be X+1.

FIN bit will be 0 Because there is no initiation for ending the connection.

So Answer is:- C
0 votes

This is related to 3 way handshake where  in first handshake, sender send SYN bit. 

In second handshake reciever sends to sender SYN + ACK bit ( remember here the connection gets established)

In third handshake, sender sends ACK bit 

0 votes

There are three phase in TCP data transfer protocol

  1. Connection Establishment
  2. Data Transfer
  3. Connection Termination

Connection Establishment phase look like this

There are more TCP/IP  which i not mention 


Related questions

0 votes
2 answers
Consider the cyclic redundancy check $\text{(CRC)}$ based error detecting scheme having the generator polynomial $X^3+X+1$. Suppose the message $m_4m_3m_2m_1m_0=11000$ is to be transmitted. Check bits $c_2c_1c_0$ are appended at the end of the message by the ... bit string is denoted by $m_4m_3m_2m_1m_0c_2c_1c_0$. The value of the checkbit sequence $c_2c_1c_0$ is $101$ $110$ $100$ $111$
asked Feb 18 in Computer Networks Arjun 676 views
2 votes
1 answer
Consider a computer network using the distance vector routing algorithm in its network layer. The partial topology of the network is shown below. The objective is to find the shortest-cost path from the router $R$ to routers $P$ and $Q$. Assume that $R$ does not initially know the shortest routes ... for a packet from $R$ to $P$ is $Y$ The next hop router for a packet from $R$ to $Q$ is $Z$
asked Feb 18 in Computer Networks Arjun 657 views
2 votes
2 answers
Consider a network using the pure $\text{ALOHA}$ medium access control protocol, where each frame is of length $1,000$ bits. The channel transmission rate is $1$ Mbps ($=10^6$ bits per second). The aggregate number of transmissions across all ... as the average number of frames successfully transmitted per second. The throughput of the network (rounded to the nearest integer) is ______________
asked Feb 18 in Computer Networks Arjun 1.3k views
4 votes
1 answer
A jigsaw puzzle has $2$ pieces. One of the pieces is shown above. Which one of the given options for the missing piece when assembled will form a rectangle? The piece can be moved, rotated or flipped to assemble with the above piece.
asked Feb 18 in Spatial Aptitude Arjun 795 views