Question

An IP router with a Maximum Transmission Unit (MTU) of 1500 bytes has received an IP packet of size 4404 bytes with an IP header of length 20 bytes. The values of the relevant fields in the header of the third IP fragment generated by the router for this packet are

Choose one option
Official answer and solution
Official answer
A
From
Official GATE 2014 answer key

Solution

Compute maximum payload capacity per fragment from MTU and calculate offset and length for the third fragment.

  1. Packet and MTU Parameters:

    • Total original packet size = 44044404 bytes.
    • IP header length = 2020 bytes.
    • Total data payload = 4404−20=43844404 - 20 = 4384 bytes.
    • Link MTU = 15001500 bytes.
    • Maximum fragment payload must be a multiple of 88 bytes and satisfy:
      Payload+20≤1500  ⟹  Payload≤1480.\text{Payload} + 20 \le 1500 \implies \text{Payload} \le 1480.
      Since 14801480 is divisible by 88 (1480=185×81480 = 185 \times 8), maximum payload per non-terminal fragment is 14801480 bytes.
  2. Fragment Details:

    • Fragment 1:
      • Data bytes: 00 to 14791479 (14801480 bytes).
      • Datagram length = 1480+20=15001480 + 20 = 1500 bytes.
      • Fragment offset = 0/8=00 / 8 = 0.
      • MF (More Fragments) bit = 11.
    • Fragment 2:
      • Data bytes: 14801480 to 29592959 (14801480 bytes).
      • Datagram length = 1480+20=15001480 + 20 = 1500 bytes.
      • Fragment offset = 1480/8=1851480 / 8 = 185.
      • MF bit = 11.
    • Fragment 3:
      • Remaining data payload = 4384−(1480×2)=4384−2960=14244384 - (1480 \times 2) = 4384 - 2960 = 1424 bytes.
      • Datagram length = 1424+20=14441424 + 20 = 1444 bytes.
      • Fragment offset = 2960/8=3702960 / 8 = 370.
      • MF bit = 00 (since this is the final fragment carrying the last byte of the original packet).
  3. Thus, for the third fragment:

    MF=0,Datagram Length=1444,Offset=370.\text{MF} = 0,\quad \text{Datagram Length} = 1444,\quad \text{Offset} = 370.

    This matches option A.

Final answer

A

Common trap

Using raw byte offset 2960 instead of dividing by 8 to obtain the 8-byte scaled fragment offset 370.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 3
Question
38 of 65, printed as CS Q.28
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.