Question

An IP datagram of size 1000 bytes arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is 100 bytes. Assume that the size of the IP header is 20 bytes.

The number of fragments that the IP datagram will be divided into for transmission is _____.

Official answer and solution
Official answer
13
From
Official GATE 2016 answer key

Solution

Calculate the payload of the original datagram and determine the maximum payload per fragment subject to the 8-byte alignment rule.

Given parameters:

  • IP datagram total size =1000= 1000 bytes.
  • IP header size =20= 20 bytes.
  • Total data payload =1000−20=980= 1000 - 20 = 980 bytes.
  • Link MTU =100= 100 bytes.

Determine fragment payload capacity:

  • Each fragment must include an IP header of 20 bytes.
  • Maximum data payload possible per fragment =100−20=80= 100 - 20 = 80 bytes.
  • In IPv4 fragmentation, the data payload of every fragment (except the last) must be a multiple of 8 bytes because the Fragment Offset field is expressed in 8-byte blocks.
  • Here, 8080 is an exact multiple of 88 (80=10×880 = 10 \times 8). Thus, each fragment can carry at most 80 bytes of payload.

Calculate number of fragments:

  • Full fragments required: ⌊980/80⌋=12\lfloor 980 / 80 \rfloor = 12 fragments, carrying 12×80=96012 \times 80 = 960 bytes of payload.
  • Remaining payload: 980−960=20980 - 960 = 20 bytes.
  • The remaining 20 bytes require 1 final fragment (total size 20+20=4020 + 20 = 40 bytes, with MF=0MF = 0).
  • Total number of fragments =12+1=13= 12 + 1 = 13.
Final answer

13

Common trap

Dividing 1000 by 100 directly to get 10, completely ignoring that each fragment must carry its own 20-byte IP header.

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

Source

Paper
GATE 2016 Computer Science and Information Technology (CS) Session 1
Question
63 of 65, printed as CS Q.53
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.