StreakPeaked· Practice

ExamsGATETechnical

In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are

  1. Last fragment, 2400 and 2789
  2. First fragment, 2400 and 2759
  3. Last fragment, 2400 and 2759
  4. Middle fragment, 300 and 689

Correct answer: Last fragment, 2400 and 2759

Solution

The M bit being 0 indicates that this is the last fragment. The HLEN of 10 means the header is 40 bytes, and with a total length of 400 bytes, the payload is 360 bytes. The fragment offset of 300 indicates that the first byte of the payload starts at byte 2400 (300 * 8) and ends at byte 2759 (2400 + 360 - 1), confirming the correct option.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →