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

Option C (according to me)

### Correct me if I am wrong!

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)

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)