GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER NETWORKS

Refragment existing IPv4 fragments at a smaller MTU

2 questions solved the same way, newest first. Back to Computer Networks

How these are solved

Apply the second MTU separately to each first-stage fragment, retaining boundaries and per-fragment IP headers; count resulting fragments. Do not repartition the original datagram directly at the final MTU.

2 marks · NAT
Report issue

Fragmenting an IPv4 message across two MTUs

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

2 marks · NAT
Report issue

Fragment each existing fragment at the next MTU

IP Addressing, Fragmentation & Address Resolution

Question 65, GATE 2024: An IPv4 datagram totals 1420 bytes including a 20-byte header. It traverses a sender-to-router link with MTU 542, then a router-to-receiver link with MTU 360. Assuming ordinary permitted fragmentation and 20-byte fragment headers, how many fragments reach the receiver?
Tap to enlarge
Answer & solution

Official answer: 6

Step through it (8 steps)

Approach: MTU includes each fragment's header. Nonfinal payload boundaries must align to eight-byte units, and the intermediate router fragments existing fragments rather than reassembling the original datagram.
1. Original payload is 1420−20=1400 bytes. On the first link, raw payload capacity is 542−20=522 bytes. Round down to a multiple of 8: floor(522/8)×8=520 bytes.
2. The sender creates payloads 520,520,360, each with a 20-byte header. Their original-data starting offsets are 0,520,1040 bytes.
3. On the second link, raw capacity is 360−20=340 bytes, with aligned nonfinal capacity floor(340/8)×8=336 bytes. Each 520-byte payload splits into 336+184; the 360-byte payload splits into 336+24.
4. Six payload fragments arrive: 336,184,336,184,336,24. Their starting offsets, in eight-byte units, are 0,42,65,107,130,172. Only the last has no more-fragments flag; total payload still sums to 1400.
Answer: 6. Applying ceil(1400/336)=5 directly at the second link incorrectly assumes that the router reassembles and repacks the first-link fragments. Normal IPv4 forwarding leaves reassembly to the final destination, and fragmentation presumes DF is unset.

Original paper, page 36 · Answer key