edited by
404 views
7 votes
7 votes
Host $X$ sends a UDP datagram containing $5516\;\text{bytes}$ of user data to host $Y$ over an Ethernet LAN. Ethernet frames may carry data upto $1400\;\text{bytes}$. Size of UDP header is $8\;\text{bytes}$ and size of IP header is $20\;\text{bytes}$. There is no option field in IP header. If the total number of IP fragments transmitted is $a$ and the contents of offset field in the last fragment is $b,$ $a+b = $__________
edited by

1 Answer

Best answer
8 votes
8 votes
Each Ethernet frame contains $1376\;\text{bytes}$ (largest multiple of $8 \leq 1380$) of user data and $20\;\text{bytes}$ of IP header. So for $5516\;\text{bytes}$ of user data and $8$ bytes of UDP header, we need $\left\lceil\dfrac{5516+8}{1376} \right\rceil = 5 $ IP fragments.
    
 Offset of the last fragment $ = 4 \times 1376/8 = 688.$
    
So, $a+b = 5+688 = 693.$

Note: The Fragment Offset field $(13\;\text{bits})$ is used to indicate the starting position of the data in the fragment in relation to the start of the data in the original packet. This information is used to reassemble the data from all the fragments (whether they arrive in order or not). In the first fragment, the offset is $0$ as the data in this packet starts in the same place as the data in the original packet (at the beginning). In subsequent fragments, the value is the offset of the data the fragment contains from the beginning of the data in the first fragment $\text{(offset 0)}$, in $\textbf{8 byte 'blocks' (aka octawords).}$
selected by
Answer:

Related questions

6 votes
6 votes
1 answer
4
gatecse asked Oct 23, 2020
447 views
Consider that $24$ machines need to be connected in a LAN using $5$-port Ethernet switches. Assume that these switches do not have any separate uplink ports. The minimum ...