Question
Consider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header and a 40-byte TCP header. The packet is forwarded to an IPv4 router that supports a Maximum Transmission Unit (MTU) of 600 bytes. Assume that the length of the IP header in all the outgoing fragments of this packet is 20 bytes. Assume that the fragmentation offset value stored in the first fragment is 0.
The fragmentation offset value stored in the third fragment is _______.
Official answer and solution
- Official answer
- 144
- From
- Official GATE 2018 answer key
Solution
Calculate maximum payload per fragment aligned to 8 bytes, and compute offset for the third fragment.
Total length of incoming packet is 4,500 bytes (including 20-byte IP header and 40-byte TCP header). The data payload carried by the IP packet is bytes.
The router MTU is 600 bytes. With each fragment carrying a 20-byte IP header, the maximum payload per fragment is bytes.
Because fragment offset is measured in units of 8-byte blocks, fragment data payload size must be a multiple of 8:
Trace fragment data ranges and offset values:
- Fragment 1: bytes 0 to 575 (length 576 bytes). Offset .
- Fragment 2: bytes 576 to 1151 (length 576 bytes). Offset .
- Fragment 3: bytes 1152 to 1727 (length 576 bytes). Offset .
Therefore, the fragmentation offset value stored in the third fragment is 144.
144
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2018 Computer Science and Information Technology (CS)
- Question
- 64 of 65, printed as CS Q.54
- 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.