in Computer Networks edited by
25,583 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$
in Computer Networks edited by
25.6k views

4 Comments

dll mtu means only frame size here after fragmentation 20B of ip header will be added so actually respect to the n/w layer it can divide by 1480 B
1
1
What is offset ?
0
0
0
0

9 Answers

127 votes
127 votes
Best answer

Answer is C.

Number of fragments  $=\large\Big\lceil\frac{8888}{1480}\Big\rceil = 7$
Offset of last fragment $=\dfrac{(1500 - 20)\times  6} {8}=1110$
(scaling factor of $8$ is used in offset field).

$\text{TCP or UDP header}$ will be added to the DataUnit received from Transport Layer to Network Layer. And fragmentation happens at Network Layer. So no need to add $\text{TCP or UDP}$ header into each fragment.

edited by

4 Comments

The length of the UDP data is given as 8880 Bytes and the UDP header is 8 Bytes. The UDP datagram(header+data) is inserted into the data field of the IP datagram therefore the length of the data field of the IP datagram is 8880+8=8888B. Hope this clears your doubt :)
0
0
If you don't add TCP or UDP header to every fragment, then can you please tell me how you will identify the fragment belongs to which port number/process I'd in receiver ?
0
0
edited by

@dangling-else our main motive is to deliver a packet from A to B. routers use ip header(ip header is appended to each fragment) to securely deliver packet from source to the destination address. Then at the Destination host we reassemble the packets and forward to our target port/process.

1
1
44 votes
44 votes

 Answer is : 7 fragments and last fragment offset is 1110

edited by

3 Comments

during my classes we were taught that we cannot take 0- 1479 because 1480 is not divisible by 8 ..so we have to take number which is less than 1480 nd divisible by 8 i.e 1476?? solve this query please??
0
0
@vamp_vaibhav

1480 is divisible by 8 :) 185*8
3
3
hmm i realized my mistake earlier ..forgot to mention :)
0
0
6 votes
6 votes
UDP data = 8880 bytes
UDP header = 8 bytes
IP Header = 20 bytes

Total Size excluding IP Header = 8888 bytes.

Number of fragments  = ⌈ 8888 / 1480 ⌉ 
                     = 7
Offset of last segment = (1480 * 6) / 8 = 1110 

3 Comments

Paras Nath  excluding IP Header or Udp header ??????
0
0
udp header.
0
0
excluding ip header
0
0
4 votes
4 votes
1500 is MTU . And header length of ip is 20 . So net data can go is 1500-20 =1480 . and no. of fragment needed  (8880+8)/1472 = 6.something so 7 . and offset 6*1480/8= 1110 .
edited by

4 Comments

final answer is c ?
0
0
Answer is C)
0
0
y r u dividing by 1472 ?? not by 1480 ?? anyone ??
0
0
Answer:

Related questions