Question
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)
Official answer and solution
- Official answer
- 7
- From
- Official GATE 2025 answer key
Solution
Fragment the 15000-byte payload first at Router-1 (MTU = 5000 B, 20 B IPv4 header, payload multiple of 8 B) and then fragment each resulting datagram at Router-2 (MTU = 3000 B).
Assume the standard 20-byte IPv4 header. In IPv4 fragmentation, every non-final fragment's data payload must be a multiple of bytes:
- At Router-1 ( bytes):
- Maximum data per fragment bytes.
- Dividing the -byte message payload: .
- Thus Router-1 outputs 4 fragments with data payloads of and bytes.
- At Router-2 ( bytes):
- Maximum data per fragment bytes.
- Each of the three -byte fragments splits into 2 fragments of data sizes bytes and bytes.
- The 4th fragment ( bytes of data + bytes of header bytes) is not fragmented further (1 fragment).
Total fragments delivered to the destination .
7
Dividing directly by Router-2's payload capacity () instead of fragmenting sequentially through Router-1 and then Router-2.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
- Question
- 57 of 65
- 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.