How can I accelerate re-use of TCP connections that are in the TIME-WAIT state?
Issue
- Sometimes we have TCP clients attempting to connect to the RHEL server reusing same source port and address as a connection that has been terminated very recently. The RHEL server replies to the SYN packet with a ACK (without SYN) that does not match the sequence number from the new connection. This causes the client to send back a RST and the connection cannot be established. Enabling sysctl net.ipv4.tcp_tw_recycle and/or net.ipv4.tcp_tw_reuse does not resolve the problem.
Environment
- TCP server on Red Hat Enterprise Linux 5 (probably applies to RHEL3, RHEL4 and RHEL6 as well)
- client does not use TCP timestamp option (as per tcpdump)
- client attempts to re-use same source/destination address/port quadruplet when the server still has the connection in TIME-WAIT state (as per netstat or same connection terminated less than about 60 seconds prior)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.