GateAI
IPv4 Fragmentation

GATE CSE 2025 Set 1 · Q57

NAT2 marksMedium

Time

Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is ______ . (Answer in integer)

GATE CSE 2025 Set 1 Q57 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 7

IPv4 Fragmentation

To determine the total number of fragments delivered to the destination, we follow the IPv4 fragmentation process across each router. By default, the IPv4 header size is 20 bytes20\text{ bytes}, and the payload data in any non-terminal fragment must be a multiple of 8 bytes8\text{ bytes}.

1. Fragmentation at Router-1:

  • MTU =5000 bytes= 5000\text{ bytes}

  • Maximum IP header size =20 bytes= 20\text{ bytes}

  • Maximum available data payload per fragment =5000−20=4980 bytes= 5000 - 20 = 4980\text{ bytes}

  • Since the data payload must be a multiple of 88, the maximum payload per fragment is:

    ⌊4980/8⌋×8=622×8=4976 bytes\lfloor 4980 / 8 \rfloor \times 8 = 622 \times 8 = 4976\text{ bytes}
  • The original message size is 15000 bytes15000\text{ bytes}. It is split into fragments of data sizes:

    • Fragment 1: 4976 bytes4976\text{ bytes}

    • Fragment 2: 4976 bytes4976\text{ bytes}

    • Fragment 3: 4976 bytes4976\text{ bytes}

    • Fragment 4: 15000−(3×4976)=15000−14928=72 bytes15000 - (3 \times 4976) = 15000 - 14928 = 72\text{ bytes}

Thus, Router-1 produces 4 fragments.

2. Fragmentation at Router-2:

  • MTU =3000 bytes= 3000\text{ bytes}

  • Maximum available data payload per fragment =3000−20=2980 bytes= 3000 - 20 = 2980\text{ bytes}

  • Since the data payload must be a multiple of 88, the maximum payload per fragment is:

    ⌊2980/8⌋×8=372×8=2976 bytes\lfloor 2980 / 8 \rfloor \times 8 = 372 \times 8 = 2976\text{ bytes}

Now, each incoming fragment is fragmented further if its total size (payload +20 bytes+ 20\text{ bytes}) exceeds 3000 bytes3000\text{ bytes}:

  • Fragment 1 (4976 bytes4976\text{ bytes} payload): exceeds MTU. It is split into:

    • Sub-fragment 1a: 2976 bytes2976\text{ bytes}

    • Sub-fragment 1b: 4976−2976=2000 bytes4976 - 2976 = 2000\text{ bytes}

    →2 fragments\rightarrow 2\text{ fragments}

  • Fragment 2 (4976 bytes4976\text{ bytes} payload): split similarly into 2976 bytes2976\text{ bytes} and 2000 bytes2000\text{ bytes}. →2 fragments\rightarrow 2\text{ fragments}

  • Fragment 3 (4976 bytes4976\text{ bytes} payload): split similarly into 2976 bytes2976\text{ bytes} and 2000 bytes2000\text{ bytes}. →2 fragments\rightarrow 2\text{ fragments}

  • Fragment 4 (72 bytes72\text{ bytes} payload): total size =72+20=92 bytes≤3000 bytes= 72 + 20 = 92\text{ bytes} \le 3000\text{ bytes}, so it is not fragmented. →1 fragment\rightarrow 1\text{ fragment}

Total fragments delivered to the destination:

2+2+2+1=72 + 2 + 2 + 1 = 7

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This IPv4 Fragmentation previous year question is Q57 of the GATE CSE 2025 Set 1 paper. Find more GATE CSE PYQs on IPv4 Fragmentation in Computer Networks, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related IPv4 Fragmentation PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

IPv4 Fragmentation in GATE CSE

IPv4 Fragmentation has 8 GATE CSE PYQs across 8 papers from 2014 to 2025. 3 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2025 Set 1.

How GATE tests IPv4 Fragmentation

More from GATE CSE 2025 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2025 Set 1 · Q57 · NAT

Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is … (Answer in integer)

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.