edited by
27,218 views
76 votes
76 votes

$\text{Host A}$ sends a $\text{UDP}$ datagram containing $8880\text{ bytes}$ of user data to $\text{host B}$ over an $\text{Ethernet LAN}.$ Ethernet frames may carry data up to $1500\text{ bytes (i.e. MTU = 1500 bytes)}.$ Size of $\text{UDP}$ header is $8\text{ bytes}$ and size of $\text{IP}$ header is $20\text{ bytes}.$ There is no option field in $\text{IP}$ header. How many total number of $\text{IP}$ fragments will be transmitted and what will be the contents of offset field in the last fragment?

  1. $6$ and $925$
  2. $6$ and $7400$
  3. $7$ and $1110$
  4. $7$ and $8880$
edited by

9 Answers

3 votes
3 votes
A.   6 and 925

Fragment 1,  8880 - 1472 = 7408,  Offset = (1472 * 0) / 8 = 0

Fragment 2,  7408 - 1472 = 5936,  Offset = (1472 * 1) / 8 = 184

Fragment 3,  5936 - 1472 = 4464,  Offset = (1472 * 2) / 8 = 368

Fragment 4,  4464 - 1472 = 2992,  Offset = (1472 * 3) / 8 = 552

Fragment 5,  2292 - 1472 = 820,  Offset = (1472 * 4) / 8 = 736

Fragment 6,  820,  Offset = (1472 * 5) / 8 = 920
edited by
3 votes
3 votes

The concept that you should be clear with before or after attempting this question is how UDP datagram is handled during fragmentation at IP layer

You can read whole thing here https://notes.shichao.io/tcpv1/ch10

Or remember following

The UDP header that contains the source and destination port numbers appears only in the first fragment (a complicating factor for firewalls and NATs). Fragmentation is controlled by the IdentificationFragment Offset, and More Fragments (MF) fields in the IPv4 header. 

Rest calculation is easy 

Total size of IP payload $=ceil( 8888 /1480)=7

Fragmentation offset is (1480*6)/8=1110

edited by
0 votes
0 votes
This question is just for creating confusion but it tests your very basics too

It is given that UDP header is 8 Bytes now when you will send this data to network layer you will possible add this header value to your UDP data

So net data to be transmitted in Network layer becomes 8880+8 B = 8888 B of data for network layer.

 

Now if you note 8888/1480 = 6.005 that means you need 7 packets

So option A and option B are incorrect

The fragments are numbered as

0 Ist fragment

1 2nd fragment

2 3rd fragment

3 4th fragment

4 5th fragment

5 6th fragment

6 7th fragment

Now coming back to the contents of offset field in the last fragment(7th fragment)

is 6/8(1480) as total data is 1480 in each fragment

Ans is 1110
Answer:

Related questions

12.3k
views
4 answers
38 votes
go_editor asked Feb 12, 2015
12,294 views
A link has transmission speed of $10^6$ bits/sec. It uses data packets of size $1000$ $\text{bytes}$ each. Assume that the acknowledgment has negligible ... . The value of the one way propagation delay (in milliseconds) is_____.
15.3k
views
5 answers
27 votes
go_editor asked Feb 12, 2015
15,276 views
Consider the following routing table at an IP router: ... {i-b, ii-c, iii-d, iv-e}$\text{i-b, ii-c, iii-e, iv-d}$
28.5k
views
5 answers
71 votes
go_editor asked Feb 12, 2015
28,451 views
Assume that the bandwidth for a $\text{TCP}$ connection is $1048560$ bits/sec. Let $\alpha$ be the value of RTT in milliseconds (rounded off to the nearest integer) after ... $ $\times $2$^{14}$500$ milliseconds, $65535$ $\times $2$^{16}$
9.9k
views
4 answers
28 votes
go_editor asked Feb 12, 2015
9,942 views
Identify the correct order in which a server process must invoke the function calls accept, bind, listen, and recv according to UNIX socket API. ... textsf{bind, accept, listen, recv}$\textsf{accept, listen, bind, recv}$