GATE CS 2024 Set 1 | Question 65

NAT · 2 marks

Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is ________

Answer

6

Explanation

The datagram carries \(1420 - 20 = 1400\) bytes of data. Every fragment has its own 20-byte header, and every fragment except the last must carry a multiple of 8 data bytes.

  • First link (MTU 542): at most \(542 - 20 = 522\) data bytes, rounded down to 520. The data splits as \(520 + 520 + 360\), giving fragments of 540, 540 and 380 bytes.
  • Second link (MTU 360): at most \(360 - 20 = 340\) data bytes, rounded down to 336. Each 520-byte piece splits into \(336 + 184\), and the 360-byte piece into \(336 + 24\).

Routers do not reassemble fragments, so the receiver gets \(2 + 2 + 2 = 6\) fragments.

Answer: 6