The GATE Grind

GATE 2025 CS (CS1) – Question 57

Computer Networks · IPv4: Addressing, CIDR, Fragmentation and NAT · 2 marks · Numerical answer

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)

Diagram for GATE 2025 CS (CS1) question 57

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 7

Explanation

The message is 15000 bytes of data. An IP header is 20 bytes and fragment data must be a multiple of 8.

**Router 1 (MTU 5000):** max data per fragment $=5000-20=4980$, rounded down to a multiple of 8: **4976**. $15000=3\times4976+72$, so we get 3 fragments of 4976 bytes and one of 72 bytes: 4 fragments.

**Router 2 (MTU 3000):** max data per fragment $=3000-20=2980\to$ **2976**.
- Each 4976-byte fragment splits into $2976+2000$: 2 fragments. Three such fragments give $3\times2=6$.
- The 72-byte fragment fits in one: 1.

Total fragments delivered $=6+1=\mathbf{7}$.

More IPv4: Addressing, CIDR, Fragmentation and NAT questions

All IPv4: Addressing, CIDR, Fragmentation and NAT questions →