GateAI
IPv4, CIDR and NAT

GATE CSE 2013 · Q37

MCQ2 marksMedium

Time

In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) Last fragment, 2400 and 2759

IPv4, CIDR and NAT

Let us analyze the given parameters of the IPv4 datagram:

  1. Position of the Datagram:

    • MF (More Fragments bit)=0\text{MF (More Fragments bit)} = 0.

    • An offset value of 300>0300 > 0 with MF=0\text{MF} = 0 signifies that this is the Last fragment.

  2. Header Length and Payload Length:

    • Header Length (in bytes)=HLEN×4=10×4=40 bytes\text{Header Length (in bytes)} = \text{HLEN} \times 4 = 10 \times 4 = 40\text{ bytes}.

    • Total Length=400 bytes\text{Total Length} = 400\text{ bytes}.

    • Payload Length=Total Length−Header Length=400−40=360 bytes\text{Payload Length} = \text{Total Length} - \text{Header Length} = 400 - 40 = 360\text{ bytes}.

  3. Byte Sequence Numbers:

    • The fragment offset is measured in units of 8 bytes8\text{ bytes}.

    • First byte number of the payload =Offset×8=300×8=2400= \text{Offset} \times 8 = 300 \times 8 = 2400.

    • Last byte number of the payload =First byte+Payload Length−1=2400+360−1=2759= \text{First byte} + \text{Payload Length} - 1 = 2400 + 360 - 1 = 2759.

Thus, the datagram is the Last fragment, with payload byte range 2400 to 2759 (Option C).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This IPv4, CIDR and NAT previous year question is Q37 of the GATE CSE 2013 paper. Find more GATE CSE PYQs on IPv4, CIDR and NAT in Computer Networks, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related IPv4, CIDR and NAT PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

IPv4, CIDR and NAT in GATE CSE

IPv4, CIDR and NAT has 14 GATE CSE PYQs across 10 papers from 2012 to 2025. 4 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2013.

How GATE tests IPv4, CIDR and NAT

More from GATE CSE 2013

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2013 · Q37 · MCQ

In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400 and the fragment offset value is 300. The position of the datagram, the sequence numbers of the first and the last bytes of the payload, respectively are

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.