Redirected
2,180 views
4 votes
4 votes
An IPV4 datagram is received by a router, in which total length is 1500, HLEN value is 10 and offset value is 100.The MTU of the forwarding link is 200. What is the offset value of last fragment?

3 Answers

Best answer
7 votes
7 votes

HLEN  value is..10 total header length is 40 at NL

payload:- 1500-40->1460...MTU 200 means 160bytes of data is valid on channel

...1460/160 ...9+1 fragment ...160*9=1440->1460-1440=20bytes of data in last frgment...offset value is 1440/8+100=280

selected by
7 votes
7 votes

Given , total length of packet   =  1500 B

           header length               =  10 * 4   =  40 B [ As HLEN field value = 10 ]

          So payload (data) length   =   1500  -  40   =  1460 B

Now fragmentation is done into fragment sizes of 200 B [ As MTU of router given =  200 B ]

We should know that the header of packet is there in each fragment with some changes e.g. in flags and offset fields..

So payload length  in each fragment   =   200  -  40   =   160 B

Hence number of offsets in each fragment  =  160 / 8    =  20

Now as 160 is a multiple of 8 , hence it is allowed as it is else we have to take nearest multiple of 8 which is less than 160..To accomodate this , we do padding in last fragment..Payload in each fragment should be a multiple of 8 because 1 offset = 8 bytes by convention..

So number of fragments needed   =  ceil ( 1460 / 160 )   =  10

Hence offset of last fragment       =  Offset of 1st fragment + (number of fragments - 1) * (no of offsets in each fragment)

                                                  =  100  +  9 * 20

                                                  =   280

Hence offset of last fragment        =   280

0 votes
0 votes

IP Packet Size: 1500bytes

Header Size: 10x4bytes (always considered as multiple of 4b)= 40bytes.

IP Payload= 1460bytesMTU=200-40=160bytes; Fragment Size=MTU/8=20

Byte Address 160 160 160 160 160 160 160 160 160 160 20
Fragment Offset 100(given) 120 140 160 160 180 200 220 240 260 280

Answer: 280

Related questions

0 votes
0 votes
0 answers
1
mridul_negi asked Feb 25
101 views
A packet has arrived in which the offset value is 100. Then what's the number of 1st Byte?
1 votes
1 votes
1 answer
2
rayhanrjt asked Dec 13, 2022
513 views
Suppose a 22-byte packet is to be transmitted through a network of MTU = 3byte. The elementary fragment size is 1 byte. Show the segment numbering of the above packet. Pa...
0 votes
0 votes
2 answers
3
Na462 asked Dec 2, 2018
1,386 views
Which of the following statements are True ?