




















English Version: Solving the issue of ports being randomly occupied by some applications on the Windows platform
netsh int ipv4 show dynamicport tcp 查看起始端口号是否为 1024,如果是,恭喜你遇到了和我一样的问题,不是则自求多福。netsh int ipv4 set dynamic tcp start=49152 num=16384 和 netsh int ipv6 set dynamic tcp start=49152 num=16384 重设起始端口号。Windows 可能在某次更新中会意外的重设动态端口范围至 1024,这其实和 Hyper-V 无关,但是!Hyper-V会随机占用在这个范围内的几千个端口作为保留服务,你还不能通过 netstat -ano 发现这一点。正常的动态端口范围应是 49152-6553512。
显然,很多 APP 都会使用地位端口,比如 VBAN 默认使用的 6980,如果这个端口极为幸运的被 Hyper-V 所使用,其他应用就不能使用了。如果你的代理或者其他下载软件出现了这个问题,可以尝试使用 netsh int ipv4 show excludedportrange protocol=tcp 来检查是否被占用。
netsh int ipv4 show dynamicport tcp to check if the starting port number is 1024. If it is, you’ve encountered the same issue as me. If not, you’re on your own.netsh int ipv4 set dynamic tcp start=49152 num=16384 and netsh int ipv6 set dynamic tcp start=49152 num=16384 to reset the starting port number.Windows may accidentally reset the dynamic port range to 1024 during an update. This is actually unrelated to Hyper-V, but Hyper-V will randomly occupy several thousand ports within this range as reserved services, and you can’t even detect this using netstat -ano. The normal dynamic port range should be 49152-6553512.
Obviously, many apps use lower ports, such as VBAN which defaults to 6980. If this port is unluckily used by Hyper-V, other applications won’t be able to use it. If your proxy or other download software encounters this problem, you can try using netsh int ipv4 show excludedportrange protocol=tcp to check if it’s being occupied.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。