Reserving ports in the Windows 10 Dynamic Port Range











up vote
0
down vote

favorite












I want to set a Windows 10 dynamic port range between 20000 and 29999 (inclusively), so a range of 10000 ports.



To do this, I run the following commands:



netsh int ipv4 set dynamicport tcp start=20000 num=10000
netsh int ipv4 set dynamicport udp start=20000 num=10000
netsh int ipv6 set dynamicport tcp start=20000 num=10000
netsh int ipv6 set dynamicport udp start=20000 num=10000


Following this, querying the range using the following example command:



netsh int ipv4 show dynamicport tcp


...produces the following result:



Protocol tcp Dynamic Port Range
-------------------------------
Start Port : 20000
Number of Ports : 10000


Which looks correct to me.



Now suppose I want to reserve certain ports within that Windows Dynamic Port Range, say 21000-21050, then I run the following command:



reg add HKLMSYSTEMCurrentControlSetServicesTcpipParameters /v ReservedPorts /t REG_MULTI_SZ /d 21000-21050 /f


Following this, requerying the Windows Dynamic Port range produces the following result:



Protocol tcp Dynamic Port Range
-------------------------------
Start Port : 20000
Number of Ports : 10000


Is this expected behaviour? Or should the resultant table be fragmented somewhat to reflect the port reservations which fall within the middle of the dynamic range, e.g. something like:



Protocol tcp Dynamic Port Range
-------------------------------
Start Port : 20000, 21051
Number of Ports : 1000 , 8950


My port reservation command has updated the registry with the ReservedPorts setting so I assume this is all correct behaviour.



Are there any other ways to test this process prior to deployment in a system?



Thanks










share|improve this question


























    up vote
    0
    down vote

    favorite












    I want to set a Windows 10 dynamic port range between 20000 and 29999 (inclusively), so a range of 10000 ports.



    To do this, I run the following commands:



    netsh int ipv4 set dynamicport tcp start=20000 num=10000
    netsh int ipv4 set dynamicport udp start=20000 num=10000
    netsh int ipv6 set dynamicport tcp start=20000 num=10000
    netsh int ipv6 set dynamicport udp start=20000 num=10000


    Following this, querying the range using the following example command:



    netsh int ipv4 show dynamicport tcp


    ...produces the following result:



    Protocol tcp Dynamic Port Range
    -------------------------------
    Start Port : 20000
    Number of Ports : 10000


    Which looks correct to me.



    Now suppose I want to reserve certain ports within that Windows Dynamic Port Range, say 21000-21050, then I run the following command:



    reg add HKLMSYSTEMCurrentControlSetServicesTcpipParameters /v ReservedPorts /t REG_MULTI_SZ /d 21000-21050 /f


    Following this, requerying the Windows Dynamic Port range produces the following result:



    Protocol tcp Dynamic Port Range
    -------------------------------
    Start Port : 20000
    Number of Ports : 10000


    Is this expected behaviour? Or should the resultant table be fragmented somewhat to reflect the port reservations which fall within the middle of the dynamic range, e.g. something like:



    Protocol tcp Dynamic Port Range
    -------------------------------
    Start Port : 20000, 21051
    Number of Ports : 1000 , 8950


    My port reservation command has updated the registry with the ReservedPorts setting so I assume this is all correct behaviour.



    Are there any other ways to test this process prior to deployment in a system?



    Thanks










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want to set a Windows 10 dynamic port range between 20000 and 29999 (inclusively), so a range of 10000 ports.



      To do this, I run the following commands:



      netsh int ipv4 set dynamicport tcp start=20000 num=10000
      netsh int ipv4 set dynamicport udp start=20000 num=10000
      netsh int ipv6 set dynamicport tcp start=20000 num=10000
      netsh int ipv6 set dynamicport udp start=20000 num=10000


      Following this, querying the range using the following example command:



      netsh int ipv4 show dynamicport tcp


      ...produces the following result:



      Protocol tcp Dynamic Port Range
      -------------------------------
      Start Port : 20000
      Number of Ports : 10000


      Which looks correct to me.



      Now suppose I want to reserve certain ports within that Windows Dynamic Port Range, say 21000-21050, then I run the following command:



      reg add HKLMSYSTEMCurrentControlSetServicesTcpipParameters /v ReservedPorts /t REG_MULTI_SZ /d 21000-21050 /f


      Following this, requerying the Windows Dynamic Port range produces the following result:



      Protocol tcp Dynamic Port Range
      -------------------------------
      Start Port : 20000
      Number of Ports : 10000


      Is this expected behaviour? Or should the resultant table be fragmented somewhat to reflect the port reservations which fall within the middle of the dynamic range, e.g. something like:



      Protocol tcp Dynamic Port Range
      -------------------------------
      Start Port : 20000, 21051
      Number of Ports : 1000 , 8950


      My port reservation command has updated the registry with the ReservedPorts setting so I assume this is all correct behaviour.



      Are there any other ways to test this process prior to deployment in a system?



      Thanks










      share|improve this question













      I want to set a Windows 10 dynamic port range between 20000 and 29999 (inclusively), so a range of 10000 ports.



      To do this, I run the following commands:



      netsh int ipv4 set dynamicport tcp start=20000 num=10000
      netsh int ipv4 set dynamicport udp start=20000 num=10000
      netsh int ipv6 set dynamicport tcp start=20000 num=10000
      netsh int ipv6 set dynamicport udp start=20000 num=10000


      Following this, querying the range using the following example command:



      netsh int ipv4 show dynamicport tcp


      ...produces the following result:



      Protocol tcp Dynamic Port Range
      -------------------------------
      Start Port : 20000
      Number of Ports : 10000


      Which looks correct to me.



      Now suppose I want to reserve certain ports within that Windows Dynamic Port Range, say 21000-21050, then I run the following command:



      reg add HKLMSYSTEMCurrentControlSetServicesTcpipParameters /v ReservedPorts /t REG_MULTI_SZ /d 21000-21050 /f


      Following this, requerying the Windows Dynamic Port range produces the following result:



      Protocol tcp Dynamic Port Range
      -------------------------------
      Start Port : 20000
      Number of Ports : 10000


      Is this expected behaviour? Or should the resultant table be fragmented somewhat to reflect the port reservations which fall within the middle of the dynamic range, e.g. something like:



      Protocol tcp Dynamic Port Range
      -------------------------------
      Start Port : 20000, 21051
      Number of Ports : 1000 , 8950


      My port reservation command has updated the registry with the ReservedPorts setting so I assume this is all correct behaviour.



      Are there any other ways to test this process prior to deployment in a system?



      Thanks







      windows networking windows-10 port






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 at 11:48









      SRB

      1




      1






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Windows Vista and higher do not support the ReservedPorts registry value. (Source)



          Instead, you can use the netsh utility to achieve the same effect:




          netsh int <ipv4|ipv6> Add excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          You can also remove entries:




          netsh int <ipv4|ipv6> delete excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          ...or list them:




          netsh int <ipv4|ipv6> show excludedportrange [protocol=]tcp|udp [[store=]active|persistent]



          I doubt any of that would affect the output of netsh int <ipv4|ipv6> show dynamicport tcp.






          share|improve this answer





















          • Thanks. Are you sure that ReservedPorts thing doesn't just affect Server 2008? I know the page says "This issue occurs because Windows Server 2008 and Windows Server 2008 R2 do not support the ReservedPorts registry key". Where does it say it also affects Windows 10? Thanks.
            – SRB
            Nov 14 at 13:15










          • It’s because of the new network stack since Vista/Server 2008. But really, just try. The commands I quoted are available, they will most likely work.
            – Daniel B
            Nov 14 at 21:49











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375289%2freserving-ports-in-the-windows-10-dynamic-port-range%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          Windows Vista and higher do not support the ReservedPorts registry value. (Source)



          Instead, you can use the netsh utility to achieve the same effect:




          netsh int <ipv4|ipv6> Add excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          You can also remove entries:




          netsh int <ipv4|ipv6> delete excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          ...or list them:




          netsh int <ipv4|ipv6> show excludedportrange [protocol=]tcp|udp [[store=]active|persistent]



          I doubt any of that would affect the output of netsh int <ipv4|ipv6> show dynamicport tcp.






          share|improve this answer





















          • Thanks. Are you sure that ReservedPorts thing doesn't just affect Server 2008? I know the page says "This issue occurs because Windows Server 2008 and Windows Server 2008 R2 do not support the ReservedPorts registry key". Where does it say it also affects Windows 10? Thanks.
            – SRB
            Nov 14 at 13:15










          • It’s because of the new network stack since Vista/Server 2008. But really, just try. The commands I quoted are available, they will most likely work.
            – Daniel B
            Nov 14 at 21:49















          up vote
          0
          down vote













          Windows Vista and higher do not support the ReservedPorts registry value. (Source)



          Instead, you can use the netsh utility to achieve the same effect:




          netsh int <ipv4|ipv6> Add excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          You can also remove entries:




          netsh int <ipv4|ipv6> delete excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          ...or list them:




          netsh int <ipv4|ipv6> show excludedportrange [protocol=]tcp|udp [[store=]active|persistent]



          I doubt any of that would affect the output of netsh int <ipv4|ipv6> show dynamicport tcp.






          share|improve this answer





















          • Thanks. Are you sure that ReservedPorts thing doesn't just affect Server 2008? I know the page says "This issue occurs because Windows Server 2008 and Windows Server 2008 R2 do not support the ReservedPorts registry key". Where does it say it also affects Windows 10? Thanks.
            – SRB
            Nov 14 at 13:15










          • It’s because of the new network stack since Vista/Server 2008. But really, just try. The commands I quoted are available, they will most likely work.
            – Daniel B
            Nov 14 at 21:49













          up vote
          0
          down vote










          up vote
          0
          down vote









          Windows Vista and higher do not support the ReservedPorts registry value. (Source)



          Instead, you can use the netsh utility to achieve the same effect:




          netsh int <ipv4|ipv6> Add excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          You can also remove entries:




          netsh int <ipv4|ipv6> delete excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          ...or list them:




          netsh int <ipv4|ipv6> show excludedportrange [protocol=]tcp|udp [[store=]active|persistent]



          I doubt any of that would affect the output of netsh int <ipv4|ipv6> show dynamicport tcp.






          share|improve this answer












          Windows Vista and higher do not support the ReservedPorts registry value. (Source)



          Instead, you can use the netsh utility to achieve the same effect:




          netsh int <ipv4|ipv6> Add excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          You can also remove entries:




          netsh int <ipv4|ipv6> delete excludedportrange [protocol=]tcp|udp [startport=]<integer> [numberofports=]<integer> [[store=]active|persistent]



          ...or list them:




          netsh int <ipv4|ipv6> show excludedportrange [protocol=]tcp|udp [[store=]active|persistent]



          I doubt any of that would affect the output of netsh int <ipv4|ipv6> show dynamicport tcp.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 14 at 11:56









          Daniel B

          32.7k75985




          32.7k75985












          • Thanks. Are you sure that ReservedPorts thing doesn't just affect Server 2008? I know the page says "This issue occurs because Windows Server 2008 and Windows Server 2008 R2 do not support the ReservedPorts registry key". Where does it say it also affects Windows 10? Thanks.
            – SRB
            Nov 14 at 13:15










          • It’s because of the new network stack since Vista/Server 2008. But really, just try. The commands I quoted are available, they will most likely work.
            – Daniel B
            Nov 14 at 21:49


















          • Thanks. Are you sure that ReservedPorts thing doesn't just affect Server 2008? I know the page says "This issue occurs because Windows Server 2008 and Windows Server 2008 R2 do not support the ReservedPorts registry key". Where does it say it also affects Windows 10? Thanks.
            – SRB
            Nov 14 at 13:15










          • It’s because of the new network stack since Vista/Server 2008. But really, just try. The commands I quoted are available, they will most likely work.
            – Daniel B
            Nov 14 at 21:49
















          Thanks. Are you sure that ReservedPorts thing doesn't just affect Server 2008? I know the page says "This issue occurs because Windows Server 2008 and Windows Server 2008 R2 do not support the ReservedPorts registry key". Where does it say it also affects Windows 10? Thanks.
          – SRB
          Nov 14 at 13:15




          Thanks. Are you sure that ReservedPorts thing doesn't just affect Server 2008? I know the page says "This issue occurs because Windows Server 2008 and Windows Server 2008 R2 do not support the ReservedPorts registry key". Where does it say it also affects Windows 10? Thanks.
          – SRB
          Nov 14 at 13:15












          It’s because of the new network stack since Vista/Server 2008. But really, just try. The commands I quoted are available, they will most likely work.
          – Daniel B
          Nov 14 at 21:49




          It’s because of the new network stack since Vista/Server 2008. But really, just try. The commands I quoted are available, they will most likely work.
          – Daniel B
          Nov 14 at 21:49


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375289%2freserving-ports-in-the-windows-10-dynamic-port-range%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Сан-Квентин

          8-я гвардейская общевойсковая армия

          Алькесар