GATE CSE
First time here? Checkout the FAQ!
x
0 votes
114 views

On TCP connection, consider FIN, SYN packets will take 1 byte and ACK packets will take 0 bytes. Assume client and server are working on this connection. Client and server selected random numbers for sequence numbers 100 and 500 respectively. After connection is established, client sent 100 bytes of two data packets. While giving acknowledgement to client from server for those two data packets, what is SEQ NUM (sequence number) and ACK NUM (acknowledgement number)?

   
 

(A) SEQ NUM = 501 and ACK NUM = 300

 

(B) SEQ NUM = 500 and ACK NUM = 299

 

(C) SEQ NUM = 500 and ACK NUM = 300

 

(D) SEQ NUM = 501 and ACK NUM = 301

asked in Computer Networks by (385 points)   | 114 views

2 Answers

0 votes

Option C (according to me)

At client ends

1) sends SEQ# 100- 299 (200 B) data  to server

At Server's end

1) SEQ# 500- (not given) sends to client 

2) and sends ACK # 300 (Ensuring that data till 299 is recieved successfully)

TCP can accept out of order segments,but sends inorder acks!

I didn't found need of Fin/syn packets here..as its given we have to assume client and server are in working condition!

Correct me if I am wrong!

answered by Loyal (3.1k points)  
Even I had marked C,and assumed the same logic as yours,but the answer given was D.So need to know the correct one.

 

C  sends seq# 100 to S

S sends seg( SYN(500) + ACK(101)) to C

C sends ACK seq# 501

******connection established****** (yes its given in question....Client and server selected random numbers for sequence numbers 100 and 500 respectively. After connection is established, client........)

At client ends

1) sends SEQ# 101- 300 (200 B) data  to server

At Server's end

1) SEQ# 501- (not given) sends to client 

2) and sends ACK # 301 (Ensuring that data till 300 is recieved successfully)

 

 

 

 

 

0 votes
For connection establishment Client consume one sequence number i.e 100 and Server consume one sequence number i.e 500.

Now client send the 1st segment (101 to 200) with sequence number 101

Client send the 2nd segment (201-300) with sequence number 201.

So,server sent the ack packet with SEQ=501 and ACK = 301(as the last byte it receieve is 300)

So, Answer is D only.
answered by Active (1.6k points)  


Top Users Sep 2017
  1. Habibkhan

    7166 Points

  2. Warrior

    2640 Points

  3. Arjun

    2574 Points

  4. rishu_darkshadow

    2520 Points

  5. A_i_$_h

    2280 Points

  6. nikunj

    1980 Points

  7. manu00x

    1846 Points

  8. makhdoom ghaya

    1770 Points

  9. Bikram

    1744 Points

  10. SiddharthMahapatra

    1718 Points


26,144 questions
33,726 answers
79,957 comments
31,116 users