1、查看當前 系統 開放的動態端口范圍:
netsh int ipv4 show dynamicportrange tcp
2、netsh命令修改可用端口數
- netsh int ipv4 set dynamicport tcp start=2000 num=63000
- netsh int ipv4 set dynamicport udp start=2000 num=63000
- netsh int ipv6 set dynamicport tcp start=2000 num=63000
- netsh int ipv6 set dynamicport udp start=2000 num=63000
3、tcp 最大可使用端口數 調整,注冊表 regedit :
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- “MaxUserPort”=dword:0000fffe
- “TcpTimedWaitDelay”=dword:0000005 // (縮短為5秒)