Host A sends a UDP datagram containing 8880 bytes of user data to host...
The fragment offset: Offset of a fragment relative to the beginning of the original fragment IP datagram in units of 8 byte blocks.
Total size of input data in Network layer = 8880 + 8 = 8888.
View all questions of this test
Host A sends a UDP datagram containing 8880 bytes of user data to host...
Question Analysis:
- 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 header 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 the offset field in the last fragment?
Answer Explanation:
- As the size of the UDP datagram is 8880 bytes, it exceeds the maximum size of an Ethernet frame, which is 1500 bytes. Therefore, the datagram needs to be fragmented into smaller IP packets before transmission.
- The maximum size of an IP packet (including IP header) is 65,535 bytes. However, the maximum size of the data portion of an IP packet (excluding IP header) is limited by the MTU of the underlying network. In this case, the MTU is 1500 bytes, so the maximum size of the data portion of an IP packet is 1480 bytes (i.e. 1500 - 20 (IP header) - 8 (UDP header)).
- Therefore, the datagram needs to be divided into 6 IP packets (i.e. 8880 / 1480 = 6 with a remainder of 120), each carrying 1480 bytes of data and an IP header of 20 bytes.
- The offset field in the IP header indicates the position of the data in the original datagram. The offset is measured in units of 8 bytes (i.e. 64 bits). The offset of the first fragment is 0 and the offset of subsequent fragments is calculated as the position of the first byte of data in the fragment divided by 8.
- For the first 5 fragments, the offset field will be:
- Fragment 1: offset = 0
- Fragment 2: offset = 185
- Fragment 3: offset = 370
- Fragment 4: offset = 555
- Fragment 5: offset = 740
- The last fragment will carry the remaining 120 bytes of data and its offset will be:
- Fragment 6: offset = 925 (i.e. 740 + 1480 * 5 / 8)
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).