Suppose a message of size 15000 bytes is transmitted from a source to a…
2025
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)

Attempted by 112 students.
Show answer & explanation
Correct answer: 7
Answer: 7 fragments.
Explanation and steps:
Assume the IPv4 header is 20 bytes. The data to be carried by IP is therefore 15000 - 20 = 14980 bytes (if the 15000 was the entire datagram) — the calculation below is the same if you treat 15000 as data because the fragmentation arithmetic yields the same final count.
At Router-1 the MTU is 5000 bytes, so the maximum payload per fragment is 5000 - 20 = 4980 bytes. Because fragment offsets are in 8-byte units, each fragment's payload must be a multiple of 8, so use 4976 bytes per fragment.
Split 14980 bytes of data into 4976-byte chunks: 4976 * 3 = 14928, leaving a final piece of 14980 - 14928 = 52 bytes. So after Router-1 we have three fragments carrying 4976 bytes each and one fragment carrying 52 bytes (total 4 fragments).
At Router-2 the MTU is 3000, so maximum payload per fragment is 3000 - 20 = 2980 bytes. Adjusting to an 8-byte multiple gives 2976 bytes per fragment.
Each 4976-byte payload from Router-1 must be split into 2976 + 2000 bytes (4976 = 2976 + 2000). The 2000-byte piece is already a multiple of 8, so no further splitting is needed. Thus every large fragment from Router-1 becomes two fragments at Router-2.
The small 52-byte fragment from Router-1 fits within Router-2's MTU and is not fragmented further.
Total fragments delivered to the destination = (3 large fragments × 2 after second fragmentation) + (1 small fragment) = 6 + 1 = 7.
A video solution is available for this question — log in and enroll to watch it.