retagged by
18,892 views
43 votes
43 votes
Consider an IP packet with a length of $4,500\;\text{bytes}$ that includes a $20\text{-byte}\;\textsf{IPv4}$ header ans $40\text{-byte}$ TCP header. The packet is forwarded to an $\textsf{IPv4}$ router that supports a Maximum Transmission Unit (MTU) of $600\;\text{bytes}$. Assume that the length of the IP header in all the outgoing fragments of this packet is $20\;\text{bytes}$. Assume that the fragmentation offset value stored in the first fragment is $0$.

The fragmentation offset value stored in the third fragment is ________.
retagged by

8 Answers

Best answer
82 votes
82 votes

Packet Length $= 4500\;\textsf{B}$

IP Payload $= 4500-20 = 4480\;\textsf{B}$

MTU $= 600\;\textsf{B}$
MTU Payload $= 600\;\textsf{B} -20\;\textsf{B} = 580\;\textsf{B}$
But payload should be multiple of $8$ so number nearest to $580$ and multiple of $8$ is $576$, so MTU payload $= 576\;\textsf{B}$
IP Packet size $= 576\;\textsf{B} + 20\;\textsf{B} = 596\;\textsf{B}$
Size of Offset $= \frac{576}{8} = 72$

  • $1^{\text{st}}$ fragment offset  $= 0$
  • $2^{\text{nd}}$ fragment offset  $= 72$
  • $3^{\text{rd}}$ fragment offset  $= 144$
edited by
38 votes
38 votes

IP Packet $=$ Data $+$ Header

i.e $4500$ bytes $= 4480$ (Data) $+ 20$ (Header) bytes [Given]

Now MTU is $600$ bytes.

MTU includes Data $+$ Header

$\therefore$ Max data that can be sent is $580$ bytes.

However, the total length should be a multiple of $8$ (except for the last fragment), because this number will be stored in the Fragmentation offset, which specifies the number of bytes ahead of this fragment.

The nearest number to $580$ which is a multiple of $8$ is $576$

Therefore, the fragmentation will be done in this way $\Rightarrow$

$\begin{array}{l|c|c|c|c|c|c|c|c} \hline \text{Fragment#} & 1 & 2 & \textbf{3} & 4 & 5 & 6 & 7 & 8 \\\hline \text{Data(B)} & 576 & 576 & \textbf{576} & 576 & 576 & 576 & 576 & 448 \\\hline \text{Header Length(B)} & 20 & 20 & \textbf{20} & 20 & 20 & 20 & 20 & 20 \\\hline \text{Total Length(B)} & 596 & 596 & \textbf{596} & 596 & 596 & 596 & 596 & 468 \\\hline \text{Fragment Offset(B)} & 0 & 72 & \textbf{144} & 216 & 288 & 360 & 432 & 504 \\\hline \text{More Fragement} & 1 & 1 & \textbf{1} & 1 & 1 & 1 & 1 & 0 \\\hline \end{array}$

Since they have mentioned that the first fragment has an offset of $0$, the third fragment has an offset value of $144.$  

edited by
23 votes
23 votes

In diagram data at network layer is 4480 small mistake 

Number of fragments=4480/576= =8

Offset of third fragment = (0+576+576)/8 =144

Offset of fourth fragment = (0+576+576+576)/8 =216 and so on..

Hence 144 is correct answer

edited by
3 votes
3 votes
IP length = 4500B. Payload = 4480B.

MTU = 600B.

So, max packet we can make here is: Header(20) + Payload (580). But the payload isn't a multiple of 8 here.

Hence legally the max packet here is: Header(20) + Payload(576).

Seven such packets make up a total payload of 4032B.

 

So, last packet would be Header(20) + Payload (448).

 

Offset of first packet = 0.

Offset of second packet = 576B = 72

Offset of third packet = 72 + 72 = 144.
Answer:

Related questions