GATE 2003
October 7, 2023Compiler-Design
October 7, 2023IPv4-and-Fragmentation
Question 2 |
Host A sends a UDP datagram containing 8880 bytes of user data to host B over an Ethernet LAN. Ethernet frames may carry data up to 1500 bytes (i.e. MTU = 1500 bytes). Size of UDP header is 8 bytes and size of IP heard is 20 bytes. There is no option field in IP header. How many total number of IP fragments will be transmitted and what will be the contents of offset field in the last fragment?
6 and 925 | |
6 and 7400 | |
7 and 1110 | |
7 and 8880 |
Question 2 Explanation:
UDP data = 8880 bytes, UDP header = 8 bytes, IP Header = 20 bytes
Total Size excluding IP Header = 8888 bytes.
Number of fragments = ceil(8880+ UDP or TCP header /1500-IP header)
= ceil(8880+8 /1500-20)
= ceil(8888/1480)
= 7
Offset of last fragment = (MTU-IP header ) *( number of fragments -1) / scaling factor = 1110 (scaling factor of 8 is used in offset field).
= (1500-20)* (7-1)/8
= 1110
Total Size excluding IP Header = 8888 bytes.
Number of fragments = ceil(8880+ UDP or TCP header /1500-IP header)
= ceil(8880+8 /1500-20)
= ceil(8888/1480)
= 7
Offset of last fragment = (MTU-IP header ) *( number of fragments -1) / scaling factor = 1110 (scaling factor of 8 is used in offset field).
= (1500-20)* (7-1)/8
= 1110
Correct Answer: C
Question 2 Explanation:
UDP data = 8880 bytes, UDP header = 8 bytes, IP Header = 20 bytes
Total Size excluding IP Header = 8888 bytes.
Number of fragments = ceil(8880+ UDP or TCP header /1500-IP header)
= ceil(8880+8 /1500-20)
= ceil(8888/1480)
= 7
Offset of last fragment = (MTU-IP header ) *( number of fragments -1) / scaling factor = 1110 (scaling factor of 8 is used in offset field).
= (1500-20)* (7-1)/8
= 1110
Total Size excluding IP Header = 8888 bytes.
Number of fragments = ceil(8880+ UDP or TCP header /1500-IP header)
= ceil(8880+8 /1500-20)
= ceil(8888/1480)
= 7
Offset of last fragment = (MTU-IP header ) *( number of fragments -1) / scaling factor = 1110 (scaling factor of 8 is used in offset field).
= (1500-20)* (7-1)/8
= 1110
Subscribe
Login
0 Comments