CS FundamentalsVery hardGATE CS (PYQ pattern)

A client (initial sequence number 1000) connects to a server (initial sequence number 5000). After the handshake the client sends 200 bytes, the server sends 300 bytes, then the client sends FIN, and the server answers with one segment carrying both its ACK and its own FIN. Finally the client acknowledges the server's FIN. What are the acknowledgement number in the server's FIN segment and the sequence and acknowledgement numbers of the client's final ACK?

  1. A. 1201; seq 1201, ack 5301
  2. B. 1202; seq 1201, ack 5302
  3. C. 1202; seq 1202, ack 5302
  4. D. 1202; seq 1202, ack 5301

Correct answer: C. 1202; seq 1202, ack 5302

The client's SYN uses 1000, its data 1001-1200, and its FIN 1201, so the server acknowledges 1202. The server's data is 5001-5300 and its FIN uses 5301. The client's final ACK carries seq 1202 (its next unused number; the FIN consumed 1201) and ack 5302. Forgetting that SYN and FIN each consume a number gives the 1201/5301 answers.

More Computer Networks questions

Exams that ask this topic