Problem 5 Assume a router X in the figure below receives an IP packet containing
ID: 3873969 • Letter: P
Question
Problem 5 Assume a router X in the figure below receives an IP packet containing 4000 bytes from host A, X fragments the packet and routes the fragments to router Y via subnet . Y in turn routes all the fragments except the second one to router Z via subnet 3. However, it fragments the second one and sends the fragments to Z via subnet 2. Show the fragments that Z receives before delivering them to host B and specify the relevant values in the fragment headers. Subnet 1 MTU 1000 byte Subnet 2 MTU = 400 byte Host A Router X Router Y Subnet 3 MTU = 1000 bytes Router Z Host BExplanation / Answer
A packet of size 4000B from host A is sent through router X to router Y using the subnet having MTU 1000B.
Since the packet size is larger than MTU,router X fragments the packet and send them through subnet 1 to router Y
IP header size is 20B. So the maximum size of payload in each fragment is MTU - 20.
Size of payload(actual data)= 1000-20=980B. But it is not a multiple of 8. So the nearest value from 980 that is divisible by 8 is 976. Hence each fragment has actual data size as 976B.
So total number of fragments required to transfer 4000B = 4000/976=5 fragments
Below is the table that gives the fragments details that are sent through subnet 1.
for first fragment, offset is 0.
For second fragment, offset is 0+976/8= 122
For third fragment, offset = 122+976/8=122+122=244
For fourth fragment, offset = 244+976/8=366
For fifth fragment, offset = 366+976/8=488
Now from the above fragments, second fragment of size 996B from router Y is sent through subnet 2 having MTU =400bytes to router Z. Hence fragmentation is required.
Actual payload size required to pass through this subnet= MTU-20=400-20=380B. Since it should be divisible by 8. The nearest value to 380 divisible by 8 is 376. Hence actual payload size of each fragment = 376B
Total number of fragments required for the second fragment having payload size 976B to be sent through subnet 2 = 976/376=3 fragments
Below is the table that gives details of fragments that are sent through subnet 2.
Offset for first fragment is 122. It is obtained from the 2 row of table that is shown for the fragments that are sent through subnet 1.
Offset for second fragment = 122+376/8=169
Offset for third fragment = 169+376/8=216.
Thus so far 216*8+224=1952B have been received at the end of the last fragment received through subnet2.
Other fragments(1,3,4 and 5) given in the first table received through subnet 3 will not have any changes as the MTU of subnet 3 is same as subnet 1.
Fragments Total Bytes Header size(in bytes) Data size (in bytes) "More fragments" flag Fragment Offset field 1 996 20 976 1 0 2 996 20 976 1 122 3 996 20 976 1 244 4 996 20 976 1 366 5 116 20 96 0 488Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.