Suppose that a given TCP fragment is fragmented into two IP datagrams, and that the first datagram arrives to the TCP server, but the second datagram never arrives.

After a certain amount of time the TCP server sends a keepalive, and determines that the client is alive. What does the TCP server then do with this first datagram? Does is wait for the second datagram to arrive, or does it discard the first datagram?

2 Answers 2


After the fragment reassembly timeout expires, the fragment is dropped; the other end would need to retransmit.

This timeout is generally configurable. On Linux, it's 30 seconds by default and controlled via /proc/sys/net/ipv4/ipfrag_time.

  • Is the fragment reassembly timeout with respect to the first fragment received, or is the timer reset for each new arriving fragment?
    – Randomblue
    Oct 29, 2012 at 14:20
  • 2
    I think you'd have to read the source code to answer that definitively. Oct 29, 2012 at 14:21

There is no definitive answer to this question;

If you see this article about adaptive retransmition you will see TCP uses RTT as a factor in calculating appropriate delays.

This is a more detailed article. Essentially, there isn't a special timeout value just for fragmentation.

This Cisco article though indicates that an IOS XR virtual firewall has a default timeout of 10 seconds for fragments, with its own configurable timer. I'm linking this in to say OSs and devices are going to behave differently and if you are passing a connection though a device like this for example, it could negatively interfere with you connection.

It would be best to connect two machines of the same configuration with a cross over and start testing from there if you wanted to test the effects of fragmentation delay.

  • Thanks. Do you think that the fragment timeout in the Cisco article is calculated with respect to the first received fragment, or the last received fragment?
    – Randomblue
    Oct 29, 2012 at 13:00
  • The last received fragment makes more sense than the first, but I don't know, its at Cisco's discretion in that example.
    – jwbensley
    Oct 29, 2012 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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