edited by
25,351 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

35 votes
35 votes
7 answers
2
makhdoom ghaya asked Feb 13, 2015
10,038 views
Which of the following fields of an IP header is NOT modified by a typical IP router?Check sumSource addressTime to Live (TTL)Length