in Computer Networks edited by
2,386 views
5 votes
5 votes
If a datagram of size 4000 bytes from transport layer arrives at network layer and it has to be forwarded through a link with maximum capacity of 800 bytes. Then calculate the number of fragments needed if the header size is 20 bytes. Also calculate the data size of the last fragment.
in Computer Networks edited by
2.4k views

3 Comments

6 fragments are needed and data size of last one will be 80.
0
0

How???  Ashwin Kulkarni

0
0
6 Fragments.
0
0

1 Answer

7 votes
7 votes
MTU of link = $800B$ (IPHeader + data) $800-20=780$(data)

For Fragmentation offset is stored dividing by 8 $({\frac{780}{8} \neq 0})$

$\therefore$ Units are fragmented as $ (776B \ \times\color{Blue} 5= 3880B )+ (120B \times \color{Blue} 1=\color{RED}{120B} ) = 4000B$

Answer = $6$ Fragments and size = $120$ B
edited by

4 Comments

last fragment i.e 20+100

here 100 not divisible by 8.so we have to add more 4 padding bytes to 100 which is equal to 104bytes

so total fragment size 20+104=124bytes

if i am wrong plz correct me???
0
0
No,because there is no more fragments are following last pkt so no need of offset and MF=0
0
0
Because the data of size 4000 came from Transport layer and hence it has no IP header. So there is need to subtract 20 from 4000.
0
0

Related questions