views:

82

answers:

2

I am testing a network device driver's ability to cope with corrupted packets. The specific case I want to test is a when a large TCP packet is fragmented along the path because of smaller MTU in the way.

What most interests me about the IP Fragmentation of the large TCP packet is, is the protocol attribute of the IP Fragment packet set to TCP for each packet, or just the first fragment?

+1  A: 

The protocol field will be set to TCP (6) for each fragment.

From RFC 791 - Internet Protocol

To fragment a long internet datagram, an internet protocol module (for example, in a gateway), creates two new internet datagrams and copies the contents of the internet header fields from the long datagram into both new internet headers. ... This procedure can be generalized for an n-way split, rather than the two-way split described.

Protocol is part of the header and will consequently be copied into each of the fragments.

Brandon E Taylor
+1  A: 

IP Fragmentation is a layer-3 activity, while the packet will be marked TCP, the intermediate fragments will not be usable by TCP. The TCP layer will have to wait for a re-assembly of the actual IP packet (unfragmented) before it can process it.

Wikipedia IP Fragmentation reference.


Path MTU-Discovery will usually update the source MTU and TCP packets (actually segments) will be sent with sizes limited to not cause fragmentation on the way

nik