Skip to content
Official PYQ · 2025

GATE CS 2025 Set 1 Q47 — Fragmentation and IP Addressing, IPv4, CIDR

Explain with AI

Suppose a message of size 1500015000 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)

Network Diagram

 

View worked solution

Answer: 7:7

To find the number of fragments delivered to the destination, we analyze the fragmentation process at each hop. Let the IP header size be 2020 bytes.

1. First Hop (Source to Router 1): MTU=5000\text{MTU} = 5000 bytes

  • Maximum payload size per fragment =5000−20=4980= 5000 - 20 = 4980 bytes.
  • Since the fragment offset must be a multiple of 88, the payload size must be a multiple of 88.
  • The largest multiple of 88 less than or equal to 49804980 is ⌊4980/8⌋×8=4976\lfloor 4980 / 8 \rfloor \times 8 = 4976 bytes.
  • The 1500015000 bytes message payload is fragmented into:
    • 33 fragments with 49764976 bytes payload (total size =4996= 4996 bytes each)
    • 11 fragment with 15000−(3×4976)=7215000 - (3 \times 4976) = 72 bytes payload (total size =92= 92 bytes)
  • Total fragments sent to Router 1 =4= 4.

2. Second Hop (Router 1 to Router 2): MTU=3000\text{MTU} = 3000 bytes

  • Maximum payload size per fragment =3000−20=2980= 3000 - 20 = 2980 bytes.
  • The largest multiple of 88 is ⌊2980/8⌋×8=2976\lfloor 2980 / 8 \rfloor \times 8 = 2976 bytes.
  • Router 1 fragments each incoming packet that exceeds the MTU:
    • Each of the 33 large fragments (49764976 bytes payload) is split into two sub-fragments: one of size 29762976 bytes payload and another of size 4976−2976=20004976 - 2976 = 2000 bytes payload.
    • The small fragment (7272 bytes payload) is forwarded as-is.
  • Total fragments leaving Router 1 =(3×2)+1=7= (3 \times 2) + 1 = 7.

3. Third Hop (Router 2 to Destination): MTU=3000\text{MTU} = 3000 bytes

  • The maximum size among the 77 incoming fragments is 29962996 bytes (payload 29762976 bytes + header 2020 bytes).
  • Since 2996≤30002996 \le 3000 bytes, no further fragmentation occurs at Router 2.

Thus, the number of fragments delivered to the destination is 7.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Fragmentation and IP Addressing, IPv4, CIDR questions