in Computer Networks edited by
16,595 views
32 votes
32 votes
An IP datagram of size $1000$ $\text{bytes }$arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is $100$ $\text{bytes }$. Assume that the size of the IP header is $20$ $\text{bytes }.$

The number of fragments that the IP datagram will be divided into for transmission is________.
in Computer Networks edited by
16.6k views

4 Comments

 the thing is- data must be in multiple of 8 only when a single packet has been fragmented into 2 or more parts by router(sender never fragments a packet or you can say at sender fragment offset of each packet is 0). so if router has to fragment a packet it must be divisible by 8 except the last packet.

2
2
edited by

If in this case instead of 100 MTU in question 90 MTU given then?

so each packet would have 20B header and 70B payload

but 70 is not multiple of 8 so so in one packet we can have 64B payload and 20B header so

the no. of fragments would be 980/64= 15.3125 so 16 fragments

is this correct?

1
1
Yes correct way u thinking about
1
1

6 Answers

67 votes
67 votes
Best answer
IP Datagram size $=1000B$
MTU $=100B$
IP header size $=20B$
So, each packet will have $20B$ header + $80B$ payload.
Therefore, $80 \times 12 = 960$
now remaining $20B$ data could be sent in next fragment.
So, total $12 + 1 = 13$ fragments.
edited by

4 Comments

It is 980/80 upper ceiling..last packet would be left with 20B
0
0
yes for last fragment, the following will be the values in the IP header:

offset: 120

Total length: 40

MF: 0

DF: 0

Identification number: Same as the original IP packet

Checksum: Updated as the total length, offset values have been changed
0
0
Why not 10 ? ...because Total number of fragments =packet size /MTU
0
0
48 votes
48 votes

MTU (M)  is $80 + 20 \text{ bytes}$

Datagram size (DS) is $980 + 20$

No. of fragments are $\dfrac{\text{DS}}{\text{M}}=\dfrac{980}{80}=12.25$

So Answer is 13.

edited by

4 Comments

why ans is not 14

ip datagram=980+20 and MTU= 20+80  , so we have to select multiple of 8 which is less than 80.

which is 72 then partitioning 980 then total 13 parts will be there like 20+72 and 14th part will be 20+48.then total 14 fragments will be ther???????? plz correct me if i am wrong
1
1
the last fragment need not be a multiple of 8 we count only the palyload to be a multiple of 8 hence out of the 980 bytes payload we divide it according to the mtu of the target which is 80(data) +20(header)  (mtu consists of the header part of the network layer also ) hence we split it as 80*12+ 20 bytes hence total 13 fragments
2
2
If payload is not multiple of 8 then what to do
1
1
when payload is not a multiple of 8 see that the beginning fragments should be a multiple of eight the last fragment need not be a multiple of 8 as it has no fragments behind it.. on the whole the entire payload need not be a mutiple of 8
2
2
5 votes
5 votes

       

thanks :)

by

2 Comments

@Harit, If datagram length includes header length, then data=980 B. However, 980 is not a multiple of 8, while data length should be a multiple of 8. So, is it that there are 2 incoming IP datagrams, and now they are to be divided?
2
2
@agoh

But it is not necessary for total length to be a multiple of 8. Only when the packets are being fragmented do we need to make sure that total length is a multiple of 8.
0
0
3 votes
3 votes
13 fragments
Answer:

Related questions