Question
An IP datagram of size 1000 bytes arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is 100 bytes. Assume that the size of the IP header is 20 bytes.
The number of fragments that the IP datagram will be divided into for transmission is _____.
Official answer and solution
- Official answer
- 13
- From
- Official GATE 2016 answer key
Solution
Calculate the payload of the original datagram and determine the maximum payload per fragment subject to the 8-byte alignment rule.
Given parameters:
- IP datagram total size bytes.
- IP header size bytes.
- Total data payload bytes.
- Link MTU bytes.
Determine fragment payload capacity:
- Each fragment must include an IP header of 20 bytes.
- Maximum data payload possible per fragment bytes.
- In IPv4 fragmentation, the data payload of every fragment (except the last) must be a multiple of 8 bytes because the Fragment Offset field is expressed in 8-byte blocks.
- Here, is an exact multiple of (). Thus, each fragment can carry at most 80 bytes of payload.
Calculate number of fragments:
- Full fragments required: fragments, carrying bytes of payload.
- Remaining payload: bytes.
- The remaining 20 bytes require 1 final fragment (total size bytes, with ).
- Total number of fragments .
13
Dividing 1000 by 100 directly to get 10, completely ignoring that each fragment must carry its own 20-byte IP header.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2016 Computer Science and Information Technology (CS) Session 1
- Question
- 63 of 65, printed as CS Q.53
- 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.