In: Computer Science
A program at host A sends a UDP datagram carrying 4500 octets1 of data (or payload) to its counterpart at host C. In between A and C is router B. The MTU between A and B is 1500 octets while between that B and C 1320 octets. Show IP packets and fragments along the path. For each IP packet and fragment, show key header fields like Total Length, Identification, More Flag, and Fragmented Offset
Solution:
Given,
=>Total data or payload size = 4500 octets
=>A.....B......C
=>MTU between A and B = 1500 octets
=>MTU between B and C = 1320 octets
Explanation:
=>Lets consider minimum header size of IPV4 header = 20 bytes
=>1 octet = 1 byte
Datagram:
20 bytes | 4500 bytes |
Header Data
MTU in between A and B:
20 bytes | 1480 bytes |
=>As MTU in between A and B is less than the datagram size so fragmentation will be there.
Fragmentation between A and B:
Fragment 1:
=>Total length = 1500 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because fragment 2, 3 and 4 will be following.
=>Fragment offset = 0
20 bytes | 1480 bytes |
Header Data
Fragment 2:
=>Total length = 1500 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because fragment 3 and 4 will be following.
Calculating fragment offset:
=>1480/8 = 185
=>Fragment offset = 185
20 bytes | 1480 bytes |
Header Data
Fragment 3:
=>Total length = 1500 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because fragment 4 will be following.
Calculating fragment offset:
=>1480/8 = 185
=>Fragment offset = 370
20 bytes | 1480 bytes |
Header Data
Fragment 4:
=>Total length = 1500 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 0 because no fragment will be following.
Calculating fragment offset:
=>1480/8 = 185
=>Fragment offset = 555
20 bytes | 20 bytes |
Header Data
Fragmentation in between B and C:
MTU in between B and C:
20 bytes | 1300 bytes |
Header Data
Fragment 1 of fragment 1:
=>Total length = 1316 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because other fragments are following
Calculating fragment offset:
=>Fragment offset = 0
20 bytes | 1296 bytes |
Header Data
Fragment 2 of fragment 1:
=>Total length = 204 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because other fragments are following
Calculating fragment offset:
=>1296/8 = 162
=>Fragment offset = 162
20 bytes | 184 bytes |
Header Data
Fragment 1 of fragment 2:
=>Total length = 1316 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because other fragments are following
Calculating fragment offset:
=>Fragment offset = 185
20 bytes | 1296 bytes |
Header Data
Fragment 2 of fragment 2:
=>Total length = 204 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because other fragments are following
Calculating fragment offset:
=>1296/8 = 162
=>Fragment offset = 347
20 bytes | 184 bytes |
Header Data
Fragment 1 of fragment 3:
=>Total length = 204 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because other fragments are following
Calculating fragment offset:
=>Fragment offset = 370
20 bytes | 1296 bytes |
Header Data
Fragment 2 of fragment 3:
=>Total length = 204 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 1 because other fragments are following
Calculating fragment offset:
=>1296/8 = 162
=>Fragment offset = 532
20 bytes | 184 bytes |
Header Data
Fragment 4:
=>Total length = 40 bytes
=>Let say identification = ID because it remains same for a datagram throughout.
=>More flag = 0 because no other fragments are following
Calculating fragment offset:
=>Fragment offset = 555
20 bytes | 20 bytes |
Header Data
I have explained each and every part with the help of statements attached to it.