GATE Exam  >  GATE Questions  >  In an IPv4 datagram, the M bit is 0, the valu... Start Learning for Free
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
  • a)
    Last fragment, 2400 and 2789
  • b)
    First fragment, 2400 and 2759
  • c)
    Last fragment, 2400 and 2759
  • d)
    Middle fragment, 300 and 689
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the valu...
M= 0 – Means there is no fragment after this, i.e. Last fragment
HLEN=10 - So header length is 4×10=40, as 4 is constant scale factor
Total Length = 400(40 Byte Header + 360 Byte Payload)
Fragment Offset = 300, that means 300×8 Byte = 2400 bytes are before this last fragment
So the position of datagram is last fragment
Sequence number of First Byte of Payload = 2400 (as 0 to 2399 Sequence no are used)
Sequence number of Last Byte of Payload = 2400+360-1=2759
View all questions of this test
Most Upvoted Answer
In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the valu...
Explanation:

The given information can be used to determine the position of the datagram, the sequence number of the first byte of the payload, and the sequence number of the last byte of the payload.

M bit and HLEN value

The M bit is 0, which means that this is the last fragment. The value of HLEN is 10, which means that the IP header is 40 bytes long (10 x 4 bytes).

Total length value

The value of the total length is 400, which means that the datagram has a total length of 400 bytes, including the IP header.

Fragment offset value

The fragment offset value is 300, which means that this fragment starts at byte 300 in the original datagram.

Position of the datagram

Since the M bit is 0, this is the last fragment. Therefore, the position of the datagram is the sum of the fragment offset and the length of this fragment.

- Position of the datagram = 300 + (400 - 40) = 660

Sequence numbers of the first and last bytes of the payload

The sequence number of the first byte of the payload is obtained by adding the position of the datagram to the sequence number of the first byte of the original datagram. The sequence number of the last byte of the payload is obtained by subtracting the length of the IP header from the sequence number of the last byte of the original datagram.

- Sequence number of the first byte of the payload = 2400 + 300 = 2700
- Sequence number of the last byte of the payload = 2400 + 400 - 40 - 1 = 2759

Therefore, the correct answer is option C, which states that the position of the datagram is the last fragment, and the sequence numbers of the first and last bytes of the payload are 2400 and 2759, respectively.
Explore Courses for GATE exam

Similar GATE Doubts

In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer?
Question Description
In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer?.
Solutions for In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer?, a detailed solution for In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice In an IPv4 datagram, the M bit is 0, the value of HLEN is 10, the value of total length is 400and the fragment offset value is 300. The position of the datagram, the sequence numbers ofthe first and the last bytes of the payload, respectively area)Last fragment, 2400 and 2789b)First fragment, 2400 and 2759c)Last fragment, 2400 and 2759d)Middle fragment, 300 and 689Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev