To determine the total number of fragments delivered to the destination, we follow the IPv4 fragmentation process across each router. By default, the IPv4 header size is 20 bytes, and the payload data in any non-terminal fragment must be a multiple of 8 bytes.
1. Fragmentation at Router-1:
MTU =5000 bytes
Maximum IP header size =20 bytes
Maximum available data payload per fragment =5000−20=4980 bytes
Since the data payload must be a multiple of 8, the maximum payload per fragment is:
⌊4980/8⌋×8=622×8=4976 bytes The original message size is 15000 bytes. It is split into fragments of data sizes:
Fragment 1: 4976 bytes
Fragment 2: 4976 bytes
Fragment 3: 4976 bytes
Fragment 4: 15000−(3×4976)=15000−14928=72 bytes
Thus, Router-1 produces 4 fragments.
2. Fragmentation at Router-2:
MTU =3000 bytes
Maximum available data payload per fragment =3000−20=2980 bytes
Since the data payload must be a multiple of 8, the maximum payload per fragment is:
⌊2980/8⌋×8=372×8=2976 bytes
Now, each incoming fragment is fragmented further if its total size (payload +20 bytes) exceeds 3000 bytes:
Fragment 1 (4976 bytes payload): exceeds MTU. It is split into:
Sub-fragment 1a: 2976 bytes
Sub-fragment 1b: 4976−2976=2000 bytes
→2 fragments
Fragment 2 (4976 bytes payload): split similarly into 2976 bytes and 2000 bytes.
→2 fragments
Fragment 3 (4976 bytes payload): split similarly into 2976 bytes and 2000 bytes.
→2 fragments
Fragment 4 (72 bytes payload): total size =72+20=92 bytes≤3000 bytes, so it is not fragmented.
→1 fragment
Total fragments delivered to the destination:
2+2+2+1=7