Skip to content
Official PYQ · 2018

GATE CS 2018 Q54 — Fragmentation and IP Addressing, IPv4, CIDR

Explain with AI
Consider an IP packet with a length of 4,500  bytes4,500\;\text{bytes} that includes a 20-byte  IPv420\text{-byte}\;\textsf{IPv4} header and a 40-byte40\text{-byte} TCP header. The packet is forwarded to an IPv4\textsf{IPv4} router that supports a Maximum Transmission Unit (MTU) of 600  bytes600\;\text{bytes}. Assume that the length of the IP header in all the outgoing fragments of this packet is 20  bytes20\;\text{bytes}. Assume that the fragmentation offset value stored in the first fragment is 00.

The fragmentation offset value stored in the third fragment is ________.
View worked solution

Answer: 144

To find the fragmentation offset of the third fragment, we analyze the payload distribution across the fragments:

  1. Total IP Payload:
    Total Payload=Total Packet Length−IP Header Length=4500−20=4480 bytes\text{Total Payload} = \text{Total Packet Length} - \text{IP Header Length} = 4500 - 20 = 4480 \text{ bytes} Note: The 40-byte TCP header is treated as part of the IP payload.
  2. Maximum Payload per Fragment:
    Max Payload=MTU−IP Header Length=600−20=580 bytes\text{Max Payload} = \text{MTU} - \text{IP Header Length} = 600 - 20 = 580 \text{ bytes}
  3. 8-Byte Alignment:
    The payload size in all intermediate fragments must be a multiple of 88 bytes. Fragment Payload Size=⌊5808⌋×8=72×8=576 bytes\text{Fragment Payload Size} = \left\lfloor \frac{580}{8} \right\rfloor \times 8 = 72 \times 8 = 576 \text{ bytes}
  4. Fragment Offsets:
    • Fragment 1: Carries bytes 00 to 575575.
      Offset=08=0\text{Offset} = \frac{0}{8} = 0
    • Fragment 2: Carries bytes 576576 to 11511151.
      Offset=5768=72\text{Offset} = \frac{576}{8} = 72
    • Fragment 3: Carries bytes starting from 11521152.
      Offset=11528=144\text{Offset} = \frac{1152}{8} = 144

Thus, the fragmentation offset value stored in the third fragment is 144.

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

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