0

I wrote small program and I would like to use some TCP ports. Same ports for a longer period of time. The problem is each time Windows 10 wakes up it makes its mind which ports to reserve for its purpose.

So far I set port A, two weeks later Windows reserved it, so I used another port, it is reserved again. And so the game continues.

So what range is safe from Windows 10 taking it over?

For the record, I am checking reserved ports with command:

netsh interface ipv4 show excludedportrange protocol=tcp
6
  • Windows does not put anything there, in fact. Hyper-V maybe. Even then, just use lower ports? Everything under 10000 should be just fine.
    – Daniel B
    Commented Mar 3, 2022 at 7:54
  • @DanielB, it is enough Windows takes over several ranges, you cannot use those ports. And under 10000 I see today 14 ranges taken by Windows and it is basically sweeping this area. So for sure this range is no-go. Commented Mar 3, 2022 at 7:57
  • 2
    Again: Windows does not put anything there. I have a VM here (build agent) and the list is just empty. That's a fact. Whatever is happening on your PC is caused by other software. Even the Hyper-V reservations are in 50,000+.
    – Daniel B
    Commented Mar 3, 2022 at 7:59
  • @DanielB, thank you for clarification, I misread you as "put anything" meaning "no traffic". Commented Mar 3, 2022 at 8:14
  • Is your program crashing and/or not releasing ports? Have you tried rebooting you computer?
    – Mokubai
    Commented Mar 3, 2022 at 8:17

0

You must log in to answer this question.

Browse other questions tagged .