Skip to content
Official PYQ · 2013

GATE CS 2013 Q37 — Fragmentation and IP Addressing, IPv4, CIDR

Explain with AI

In an IPv4 datagram, the MM bit is 00, the value of HLENHLEN is 1010, the value of total length is 400400 and the fragment offset value is 300300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are:

Choose one option
View worked solution

Answer: C

To determine the position of the datagram and the byte range of its payload, we analyze the given IPv4 header fields:

  1. Position of the Datagram (MM bit):

    The More Fragments (MM) bit is 00, which indicates that there are no more fragments following this one. Thus, this is the last fragment.

  2. Header Length (HLENHLEN):

    The HLENHLEN field is expressed in units of 4-byte words.

    Header Size=HLEN×4=10×4=40 bytes\text{Header Size} = HLEN \times 4 = 10 \times 4 = 40\text{ bytes}
  3. Payload Size:

    The Total Length field represents the combined length of the header and the payload.

    Payload Size=Total Length−Header Size=400−40=360 bytes\text{Payload Size} = \text{Total Length} - \text{Header Size} = 400 - 40 = 360\text{ bytes}
  4. First Byte Sequence Number (Fragment Offset):

    The Fragment Offset field is expressed in units of 8 bytes. It specifies the offset of the payload relative to the start of the original unfragmented payload.

    First Byte=Fragment Offset×8=300×8=2400\text{First Byte} = \text{Fragment Offset} \times 8 = 300 \times 8 = 2400
  5. Last Byte Sequence Number:

    Since the payload starts at byte 24002400 and has a size of 360360 bytes, the sequence numbers of the bytes range from 24002400 to:

    Last Byte=First Byte+Payload Size−1=2400+360−1=2759\text{Last Byte} = \text{First Byte} + \text{Payload Size} - 1 = 2400 + 360 - 1 = 2759

Therefore, the datagram is the last fragment, with the first and last bytes of the payload being 24002400 and 27592759 respectively.

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

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