最近线上遇到windows机器访问其他机器的时候失败的情况。实际就是本地的端口不够用造成的。```bash $ netsh interface ipv4 show dynamicportrange protocol=tcp
可以修改一下起始端口
netsh int ipv4 set dynamicport tcp start=2000 num=63000netsh int ipv4 set dynamicport udp start=2000 num=63000netsh int ipv6 set dynamicport tcp start=2000 num=63000netsh int ipv6 set dynamicport udp start=2000 num=63000
然后修改一下注册表缩短time-wait的时间。regedit打开注册表,添加HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters“MaxUserPort”=dword:0000fffe“TcpTimeWaitDelay”=dword:0000005 (缩短为5秒)