Problem 2. IP Fragmentation
Suppose that a datagram of 2,700 bytes (20 bytes of IP header plus 2,680 bytes of IP payload) arrives at a router and must be forwarded to a link with an MTU of 900 bytes. Also suppose that the original datagram is stamped with an identification number of 15. How many IP fragments will be created by the router to forward this packet? For each fragment, determine its datagram length (bytes), identification, offset, and flag.
Fragment |
Bytes |
ID |
Flag |
Offset |
SOLUTION-(2):-
Datagram = 2700
IP Header = 20
MTU(Maximum Transmission Unit) = 900
The original datagram is stamped with an identification number of 15 .
The required number of fragments = (Datagram - IP header) / (MTU - IP header)
= (2700 - 20) / (900 - 20)
= (2680) / (880) = (3.045) = ceiling(3.045) = 4
So, the number of fragments generated = 4.
Fragment | Bytes | ID | Flag | Offset |
1 | 900 - 20 = 880 | 15 | Flag = 1 | 0 |
2 | 900 - 20 = 880 | 15 | Flag = 1 | 880/8 = 110 |
3 | 900 - 20 = 880 | 15 | Flag = 1 | (110 + 110) = 220 |
4 | (880*3) - 2700 = 60 | 15 | Flag = 0 | (220 + 110) = 330 |
Note: In the above table, the last datagram will be of size 60 bytes (including IP header) and offset is measured in 8 byte blocks so the offsets of the 4 fragments will be 0, 110, 220, 330.
===========================================================================
Get Answers For Free
Most questions answered within 1 hours.