Unit 2 Numericals
Unit 2 Numericals
A datagram of 4,000 bytes (20 bytes of IP header plus 3,980 bytes of IP payload) arrives at a
router and must be forwarded to a link with and MTU of 1,500 bytes.
This implies that the 3,980 data bytes in the original datagram must be allocated to three separate
fragments (each of which is also an IP datagram)
Suppose that the original datagram is stamped with an identification number of 777. The
characteristics of three fragments are shown in the table below
Table….
Example 2
An IP router with MTU of 200 bytes has received an IP packet of size 520 bytes with an IP
header of length of 20 bytes. The values of the relevant fields in the IP header.
Since MTU is 200 bytes and 20 bytes is header size,
so the maximum length of data = 180 bytes. But it can’t be represented in fragment offset since it
is not divisible by 8. So, maximum feasible length of data =176 bytes
Number of fragments = 520/200 =3
Header Length =5 (since scaling factor is 4, i.e. 20/4 = 5)
Efficiency = Data without header/ Data with header =500/560 = 89.2%
Table…
Example 3
Consider:
There is a host A present in Network X. MTU size of network X = 520 bytes.
There is a host B present in network Y. MTU size of network Y = 200 bytes.
Host A wants to Send a message to host B.
Consider router receives a datagram from network X having
Header length = 20 bytes
Payload length = 500 bytes
Total length = 520 bytes
Now,
Router examines the datagram.
It finds that the destination is network Y which has MTU size = 200 bytes.
Consider Do Not Fragment bit is set to 0, otherwise datagram will be discarded.
Since, the MTU size of network Y is less, so router decides to divide the datagram into
smaller fragments.
Now, router decides the amount of data that it will send in each fragmented datagrams.
So,
Given, MTU size of destination network Y = 200 bytes.
Thus, maximum length of each fragmented datagram can be 200 bytes.
Out of 200 bytes, 20 bytes will be taken by the header.
Thus, maximum data that can be sent in each fragmented datagram = 180 bytes.
Finally, Router decides to send maximum 176 bytes of data in each fragmented datagram since it
is a multiple of 8. Thus, router creates total three fragmented datagrams where
First datagram takes the data = 176 bytes
Second datagram takes the data = 176 bytes
Third fragment takes the data = 148 bytes
Header information for 1st fragmented datagram
Header length field value =20/4 =5
Total length field value = 196
MF bit = 1
Fragment offset field value = 0
Header checksum is recalculated.
Identification number is same as that of original datagram.
Header information for 2nd fragmented datagram
Header length field value =20/4 =5
Total length field value = 196
MF bit = 1
Fragment offset field value = 176/8 =22
Header checksum is recalculated.
Identification number is same as that of original datagram.
Header information for 3rd fragmented datagram
Header length field value =20/4 =5
Total length field value = 168
MF bit = 0
Fragment offset field value = (176+176)/8 = 44
Header checksum is recalculated.
Identification number is same as that of original datagram.