CS FundamentalsVery hardProduct company interview · GATE level

An IPv4 datagram of total length 4020 bytes (20-byte header, no options) is forwarded over a link with MTU 1500 bytes and then over a link with MTU 620 bytes. Each router fragments whatever it receives into the largest fragments its outgoing link allows, and nothing is reassembled until the destination. How many fragments reach the destination, and what is the fragment-offset field of the one carrying the final bytes of the payload?

  1. A. 7 fragments; offset 450
  2. B. 8 fragments; offset 445
  3. C. 8 fragments; offset 450
  4. D. 8 fragments; offset 3560

Correct answer: B. 8 fragments; offset 445

MTU 1500 allows 1480 payload bytes: the 4000-byte payload becomes 1480 + 1480 + 1040 (offsets 0, 185, 370). MTU 620 allows 600 payload bytes: each 1480-byte fragment becomes 600 + 600 + 280 and the 1040-byte one becomes 600 + 440, giving 3 + 3 + 2 = 8 fragments. The last starts at payload byte 2960 + 600 = 3560, so its offset field is 3560/8 = 445 (length 440 + 20 = 460). Fragmenting the original directly at MTU 620 would give 7 fragments with last offset 450, but routers re-fragment the fragments they receive; 3560 is the byte position, not the field value in 8-byte units.

More Computer Networks questions

Exams that ask this topic