Question:

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 of 542 bytes, while the second link (router to receiver) has an MTU of 360 bytes. The number of fragments that would be delivered at the receiver is \_\_\_\_\_.

Updated On: Jan 22, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation


Total size of the datagram: \(1420\) bytes.
IP header size: \(20\) bytes.
Payload size: \(1420 - 20 = 1400\) bytes. Step 1: Fragmentation on the first link (MTU = 542 bytes)
Maximum payload size per fragment = \(542 - 20 = 522\) bytes.
Number of fragments = \(\lceil \frac{1400}{522} \rceil = 3\).
Sizes of fragments after the first link:
Fragment 1: \(522 + 20 = 542\) bytes.
Fragment 2: \(522 + 20 = 542\) bytes.
Fragment 3: \(356 + 20 = 376\) bytes. Step 2: Fragmentation on the second link (MTU = 360 bytes)
Maximum payload size per fragment = \(360 - 20 = 340\) bytes.
Each of the three fragments is further fragmented:
Fragment 1: \(\lceil \frac{522}{340} \rceil = 2\) fragments.
Fragment 2: \(\lceil \frac{522}{340} \rceil = 2\) fragments.
Fragment 3: \(\lceil \frac{356}{340} \rceil = 2\) fragments.
Total fragments delivered to the receiver = \(2 + 2 + 2 = 6\). Final Answer: \[ \boxed{6} \]
Was this answer helpful?
0
0

Questions Asked in GATE CS exam

View More Questions