in Computer Networks edited by
15,252 views
46 votes
46 votes

The three way handshake for $\text{TCP}$ connection establishment is shown below. 

Which of the following statements are TRUE?

$S1:$  Loss of $\text{SYN} + \text{ACK}$ from the server will not establish a connection

$S2:$  Loss of $\text{ACK}$ from the client cannot establish the connection

$S3:$ The server moves $\text{LISTEN} \to \text{SYN_RCVD} \to \text{SYN_SENT} \to \text{ESTABLISHED}$ in the state machine on no packet loss

$S4:$ The server moves $\text{LISTEN} \to \text{SYN_RCVD} \to \text{ESTABLISHED}$ in the state machine on no packet loss

  1. $S2$ and $S3$ only
  2. $S1$ and $S4$ only
  3. $S1$ and $S3$ only
  4. $S2$ and $S4$ only
in Computer Networks edited by
15.3k views

4 Comments

S4 and S3 is based on TCP state transition diagram
1
1

Correct Diagram :

0
0

3 Answers

48 votes
48 votes
Best answer

($S1$)  Loss of SYN + ACK from the server will not establish a connection => True.
($S2$)  Loss of ACK from the client cannot establish the connection => No this is not true. Detail reasoning: http://stackoverflow.com/questions/16259774/what-if-a-tcp-handshake-segment-is-lostIf after ACK client immediately sends data then everything goes on without worry. (Though if along with ACK, first data packet is dropped, connection is reset)

($S3$)  The server moves LISTEN → SYN_RCVD → SYN_SENT → ESTABLISHED in the state machine on no packet loss =>False  .
($S4$)  The server moves LISTEN → SYN_RCVD → ESTABLISHED in the state machine on no packet loss. => True

Answer is (B) => $S1$ and $S4$ are true.
 
September 1981                                                          
                                           Transmission Control Protocol
                                                Functional Specification



                                    
                              +---------+ ---------\      active OPEN  
                              |  CLOSED |            \    -----------  
                              +---------+<---------\   \   create TCB  
                                |     ^              \   \  snd SYN    
                   passive OPEN |     |   CLOSE        \   \           
                   ------------ |     | ----------       \   \         
                    create TCB  |     | delete TCB         \   \       
                                V     |                      \   \     
                              +---------+            CLOSE    |    \   
                              |  LISTEN |          ---------- |     |  
                              +---------+          delete TCB |     |  
                   rcv SYN      |     |     SEND              |     |  
                  -----------   |     |    -------            |     V  
 +---------+      snd SYN,ACK  /       \   snd SYN          +---------+
 |         |<-----------------           ------------------>|         |
 |   SYN   |                    rcv SYN                     |   SYN   |
 |   RCVD  |<-----------------------------------------------|   SENT  |
 |         |                    snd ACK                     |         |
 |         |------------------           -------------------|         |
 +---------+   rcv ACK of SYN  \       /  rcv SYN,ACK       +---------+
   |           --------------   |     |   -----------                  
   |                  x         |     |     snd ACK                    
   |                            V     V                                
   |  CLOSE                   +---------+                              
   | -------                  |  ESTAB  |                              
   | snd FIN                  +---------+                              
   |                   CLOSE    |     |    rcv FIN                     
   V                  -------   |     |    -------                     
 +---------+          snd FIN  /       \   snd ACK          +---------+
 |  FIN    |<-----------------           ------------------>|  CLOSE  |
 | WAIT-1  |------------------                              |   WAIT  |
 +---------+          rcv FIN  \                            +---------+
   | rcv ACK of FIN   -------   |                            CLOSE  |  
   | --------------   snd ACK   |                           ------- |  
   V        x                   V                           snd FIN V  
 +---------+                  +---------+                   +---------+
 |FINWAIT-2|                  | CLOSING |                   | LAST-ACK|
 +---------+                  +---------+                   +---------+
   |                rcv ACK of FIN |                 rcv ACK of FIN |  
   |  rcv FIN       -------------- |    Timeout=2MSL -------------- |  
   |  -------              x       V    ------------        x       V  
    \ snd ACK                 +---------+delete TCB         +---------+
     ------------------------>|TIME WAIT|------------------>| CLOSED  |
                              +---------+                   +---------+

                      TCP Connection State Diagram
                               Figure 6.
edited by

4 Comments

so can we say that minimum number of packet required to establish TCP connection is TWO (SYN and SYN+ACK) ?

0
0

@ashok7273   No, it is still 3, because the Data Packet sent immediately from the Client will act as the ACK at the Server-side….which then Establish the Connection at the Server side.

 

So, it is that in simple words, (for Statement “S2”),

ACK form the Client is not Necessary for Connection Establishment, even the Data Packet Sent ( after the Lost ACK from Client) from the Client to Server can act as the ACK.

 

Refer: https://www.geeksforgeeks.org/gate-gate-it-2008-question-67/ 

0
0
0 votes
0 votes

If S3 would have been true then that state machine given in S4 should be like--

LISTEN SYN_SENT SYN_RCVD ESTABLISHED..

 

but      SYN_RCVDSYN_SENT is not correct .

 

Answer -(B)

 

–2 votes
–2 votes
S1 and s3 ack frm client not necessary.
by

2 Comments

You should give references & More explanation, Just answer is most of the time is not enough.
4
4
yes clear
0
0
Answer:

Related questions