You are not logged in.

#1 2006-07-24 13:53:37

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

iptables-tutorial error?

I'm very confused.  I'm not a CS major as many linux users are...more of a minor and even then not the technical stuff.  I'm reading _the_ iptables-tutorial (more like a degree course) and there is something that makes no sense to me.  I wondered if it may be just me.

Go to the diagram of the IP Header in section 2.3 - it then goes on to give the bit range for each part of the header.  I can't see how the descriptions match the diagram though!  Surely the second row of the diagram begins with the 32nd bit.  In the diagram it appears that the Identification section is bits 32-47 (I counted) but in the text it says 32-46.

First of all, which is correct?  I assume both are correct and that I am misreading the diagram.  Help?

Offline

#2 2006-07-24 23:46:56

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: iptables-tutorial error?

Identification - bits 32 - 46. This field is used in aiding the reassembly of fragmented packets.

Flags - bits 47 - 49. This field contains a few miscellaneous flags pertaining to fragmentation. The first bit is reserved, but still not used, and must be set to 0. The second bit is set to 0 if the packet may be fragmented, and to 1 if it may not be fragmented. The third and last bit can be set to 0 if this was the last fragment, and 1 if there are more fragments of this same packet.

Fragment Offset - bits 50 - 63. The fragment offset field shows where in the datagram that this packet belongs. The fragments are calculated in 64 bits, and the first fragment has offset zero.

You are right. Fragment Offset + Flags should be 16 bit according to the diagram, but according to the text they are 17. Meanwhile, the Identification is 15 bits in the text, but 16 in the diagram.

Offline

Board footer

Powered by FluxBB