GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 57

Fragmenting an IPv4 message across two MTUs

Computer Networks · IP Addressing, Fragmentation & Address Resolution · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q57 2 marks · NAT
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 57, GATE 2025: A 15000-byte message travels Source→Router 1→Router 2→Destination. Router 1 has MTU 5000 bytes and Router 2 MTU 3000 bytes, each including its IPv4 header. How many fragments reach the destination? Use ordinary IPv4 fragmentation; no reassembly takes place at intermediate routers.
Tap to enlarge
Answer & solution

Official answer: 7

Approach: Fragment at the first MTU, then split each existing fragment separately at the second MTU. Nonfinal IPv4 fragment payloads must be multiples of eight bytes.
Using a standard 20-byte header, Router 1 can carry at most floor((5000−20)/8)×8=4976 payload bytes in a nonfinal fragment. Treating 15000 as payload gives fragment payloads 4976,4976,4976,72, so four fragments leave Router 1.
At Router 2, the aligned maximum is floor((3000−20)/8)×8=2976. Each 4976-byte payload splits into 2976 and 2000 bytes, producing two fragments. The final 72-byte payload already fits and stays as one. Thus the destination receives 2+2+2+1=7 fragments.
It would be wrong to divide the original payload by Router 2’s MTU as though all first-stage fragments were reassembled; IPv4 routers do not coalesce them. If the original 15000 bytes includes its header, the first-stage remainder becomes 52 instead of 72, with the same total count. The count also remains seven for ordinary legal IPv4 header lengths.

Original paper, page 57 · Answer key