Virtual Machines

Products

Virtual Machines

Documentation > Products > Virtual Machines > Windows Excessive Time_Wait Causes Internet Failure

Windows Excessive Time_Wait Causes Internet Failure

Problem Phenomenon:

The server can ping the internet internally, but cannot access external websites or programs.

Problem Causes:

In general, the cause of the problem is the exhausted Windows dynamic port. A simple command test can be carried out in the CMD:

netstat -ano | findstr 445

Note: TCP Port 445 is the one used by the Windows File Sharing Service, default in monitoring status.

Execute

telnet 127.0.0.1 445

If it is not accessible, the dynamic port is exhausted. By this time, if netstat -ano is executed, a large number of connections can be found in the TIME_WAIT state.

Solution:

By this time, the number of dynamic ports is 16384 (from 49152 to 65536) after Windows 2008. If there are a large number of external connections in the server, and the default Time Wait Delay time is 4 minutes according to TCP, a large number of connections will be in Time Waits after disconnection, which cannot be quickly released to other connections for use and cause the ports exhausted.

  1. Increase the number of dynamic ports

Please run CMD as an administrator and run the following commands:

netsh int ipv4 set dynamicport tcp start=1025 num=60000

This step takes effect immediately without rebooting.

  1. Reduce the time of Time Wait, with 30 seconds in minimum.

Open the registry and locate to HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to add a new key value TcpTimedWaitDelay, with the type of REG_DWORD and decimal 30. It will take effect after modification.

If your problem still can not solved, please submit open ticket to us.

Update Time:2019-08-28 21:38:33