GATE | GATE CS 2013 | Question 65
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
Explanation: M = 0 indicates that this packet is the last packet among all fragments of original packet. So the answer is either A or C.
It is given that HLEN field is 10. Header length is number of 32 bit words. So header length = 10 * 4 = 40
Also, given that total length = 400.
Total length indicates total length of the packet including header.
So, packet length excluding header = 400 – 40 = 360
Last byte address = 2400 + 360 – 1 = 2759 (Because numbering starts from 0)
Quiz of this Question
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.