Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In IPv4, fragmentation is done by routers on way to the destination if DF(do not fragment) flag is not set in the IP packet.

Once a packet is fragmented, its fragments may take different paths (due to various reasons like topology changes) to the destination.

If, on some link again in the path to destination, one routers find that the link MTU is smaller than the frame size, then either the packet needs to be fragmented or dropped.

Can fragments of a packet be refragmented again? If yes, what will be the value of MF flag in the new individual fragments created by this?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Yes, they can be refragmented. Every refragment but the last will have the MF flag set. The last fragment will have the same MF flag as the original fragment. So it's just as if they had originally been fragmented that way.

share|improve this answer
    
Thanks for your reply David. –  gsinha Jun 11 '12 at 15:06
    
Suppose the last fragment of the first fragmentation gets fragmented again. When these refragments reach the destination, how will the destination host know that it has received the last fragment(ie, it has received all the refragments/fragments)? I thought that it uses the MF flag to determine this but my logic will not work if multiple refragments have MF flag set. –  gsinha Jun 11 '12 at 15:15
    
All fragments except the last have the MF flag set. If you split a fragment whose MF flag is set (a middle fragment) you set the MF flag on all fragments, so still fragments but the last have their MF flag set. If you split the last fragment, you set the MF flag on all fragments but the last, so still all fragments but the last have their MF flag set. –  David Schwartz Jun 11 '12 at 16:17
    
[Sorry, there was a typo in the last word of my previous comment] @David: Suppose the last fragment of the first fragmentation gets fragmented again. When these refragments reach the destination, how will the destination host know that it has received the last fragment(ie, it has received all the refragments/fragments)? I thought that it uses the MF flag to determine this but my logic will not work if multiple refragments have MF flag RESET. –  gsinha Jun 11 '12 at 17:44
    
It can still use the MF flag. All fragments except the last will always have the MF flag set. Only the last fragment ever has the MF flag clear. –  David Schwartz Jun 18 '12 at 16:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.