This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

Fragmentation flags in IP Header

asked Nov 22 '17

updated Nov 22 '17

Hey! I have been observing ip-ethereal-trace-1 in which I noticed an unusual thing.

When we have a packet that is greater than 1514 bytes, it gets fragmented. So when it is fragmented, Flag of More fragments is set. When it doesn't need to be fragmented, Flag of Don't fragment is set. But in packet 378 and 379, I have noticed that both the flags (Don't fragment and More fragments) are set. Can anyone help me for that? Why is this happening?

The file ip-ethereal-trace-1 is available on the internet.

http://gaia.cs.umass.edu/wireshark-la...

1 Answer

0

answered Nov 22 '17

First of all it looks like a traceroute with ICMP packets. And the ICMP packets are all to long. Indeed the combination (Do not Fragment and More Fragments) is an unallowed combination.

I would call it a misbehaviour of that stack, which has the packet fragmented.

https://crnetpackets.com/2015/08/29/a...

Comments

You don't know if there are any intermediate nodes in that path that don't want to handle fragmented IP fragments. So that combination of flags could very well be correct.

User 39986 ( Nov 23 '17 )

But let´s assume the following:

  • Packets gets started without DNF Bit set
  • Packet gets fragmented (Most likely by the sender itsself)
  • Some device is setting the DNF Bit - which is most likely not an L4 device, otherwise we won´t be able to see the fragments here.
    • This is first of all not necessary, as a already fragmented packet is not allowed to be fragmented again.
    • If the DNF bit would be set in the middle of the way (for a non fragmented packet), the packet will be dropped, if it is to big. And a ICMP Message will be generated for the originally sender.
    • But the sender is not able to interpret this message correctly. As if it is a Windows host we are allowed to assume, that PMTUD is disabled, otherwise the DNF would have been set.

So I stay on my opinion, setting the DNF bit on the path is a misbehaviour for a L3 device. As only L4 Devices are allowed to do so, in my opinion.

User 23750 ( Nov 23 '17 )

Indeed the combination (Do not Fragment and More Fragments) is an unallowed combination.

You may be right, but where is it stated that this is disallowed? Which RFC, for example? I ask because recently I've had a discussion about fragmentation and was wondering about possible improvements to PMTUD. Currently it seems that fragmented packets originating from a host do not have the DNF bit set, but why not? If a smaller PMTU is later encountered, the fragment will be fragmented again and forwarded along, but this is not ideal. I would rather see fragments rejected with an ICMP T3C4 and next-hop MTU returned so that the originating host could learn the true PMTU and perform fragmentation only once, right at the source. Note that per RFC 792, only the first fragment with offset=0 would cause the ICMP T3C4 to be sent; all other fragments would simply be dropped. I realize packets could take different paths and a PMTU for one path could be different from a PMTU for a different path, but I would still rather packets be fragmented at the source to the least common PMTU rather than end up with fragments of fragments on some paths.

This is first of all not necessary, as a already fragmented packet is not allowed to be fragmented again.

I don't think this is true at all. I've personally seen plenty of fragmented fragments. If there's an RFC somewhere that indicates that this behavior is not allowed, please share it.

(And to be clear, I'm only wondering about the possibility for the originating host to set the DNF bit for fragments that it generates, and not for intermediate devices to set DNF. I don't think intermediate devices should be doing that.)

User 1680 ( Nov 27 '17 )

@User 1680 Ok. I think I have misinterpreted the RFC 6864 Chapter 4:

Non-atomic datagrams are datagrams either that already have been
      fragmented or for which fragmentation remains possible.

So I think now fragmentation of fragmented packet can happen.

The rest I will discuss later....

User 23750 ( Nov 27 '17 )

@User 1680: As I have written before agree now, too, that further fragmentation is allowed,

So I agree that setting the DNF Bit on an already fragmented packet is not explicit forbidden. But it still makes no sense under normal conditions.

Because the ICMP T3C4 is routed to the original sender and I am not sure if he can handle this message, if PMTUD is not enabled on his site. So there 3 behaviours how he can react from my point of view:

  1. In the best case the original sender (he) will understand it, and sends the right segment size
  2. He will send a 576 Byte large packet (Min Transmission Unit Size)
  3. He will ignore it and packets gets still dropped.

So maybe it is some kind of intelligent NAT device in that path, which sends those packets? Or it is just an educational example of the year 2004. ???

Hope I have understood your discussion right? And what do you think which device should generate such strange packets?

User 23750 ( Nov 30 '17 )

But let´s assume the following:
•Packets gets started without DNF Bit set
•Packet gets fragmented (Most likely by the sender itsself)
•Some device is setting the DNF Bit - which is most likely not an L4 device, otherwise we won´t be able to see the fragments here.

Why do you assume that the DNF bit is not set by the sender itself? Why must it be set by some other device? All packets with both the DNF and MF bits set originate from the same host, namely 128.59.23.100 (frames 130, 171, 173, 213, 267, 268, 270, 322, 323, 378 and 379 in the ip-ethereal-trace-1 capture file). Is it not possible that that host, 128.59.23.100, is the device setting DNF on all packets it transmits whether those packets are fragments or not? And if it is, then what about that behavior is not allowed? This behavior actually seems very desirable to me. It's something I've wanted to experiment with but haven't been able to figure out how to force a host to set DNF on fragments yet.

Regarding 128.59.23.100 processing ICMP T3C4, it could receive an ICMP T3C4 for non-fragmented packets too (say for a packet sent with a length less than its interface MTU of 1500 but more than the PMTU, assuming the PMTU is less than 1500), and not just for fragments, but it would have to deal with those ICMP T3C4's exactly the same way, wouldn't it? If communication is to work, the host would need to adjust its PMTU to the next-hop MTU carried in the ICMP T3C4 message. Setting DNF on fragments avoids fragments of fragments and I personally see that as a good thing. I'm actually very curious to know more about that host and how it's able to set DNF for fragments, because that's exactly the behavior I want to experiment with in order to avoid fragments of fragments.

That aside, if there's an intermediate device setting DNF on fragments, then I don't think that should be happening. The only device that should do it, if any, is the sender. Maybe OP could provide more information about that device?

User 1680 ( Nov 30 '17 )

Yes I agree that could be the host 128.168.1.102. As in Paket 34 we can see he has enabled DNF even on a small paket.

Maybe newer Operating systems does not do so.Ot it just works with ICMP Replys??? I agree, too that it makes sense only at a receiver host. . And I think it can be intelligent, but not in all cases. Think about Multicast for IPTV.

User 23750 ( Dec 01 '17 )
cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.