0

First please look at these:

https://en.wikipedia.org/wiki/Ephemeral_port

https://support.microsoft.com/en-us/help/929851/the-default-dynamic-port-range-for-tcp-ip-has-changed-in-windows-vista-and-in-windows-server-2008

I understand these port range are for outgoing connections per local IP, but for a typical home condition that only have 1 IP on the PC, does the values limiting all outgoing connections, or per destination?

For example, I set "netsh int ipv4 set dynamicport tcp start=10000 num=1000", then I begin to trying establish ipv4 TCP connections to 5 different IPs on the internet as many as I can, will I be able to establish 1000 connections in total, or 5000 in total(1000 per IP)?

1 Answer 1

1

The ephemeral port range allows you to establish one connection using each port number per destination IP per destination port per protocol.

Yes, you can have up to 5,000 established TCP connections when you have a range of 1,000 ports to 5 destinations.

The TCP socket is defined using 4-tuple:

  • Source IP (fixed).
  • Source port (ephemeral port).
  • Destination IP (5 IPs).
  • Destination port (assume fixed).

So, the total will be 1,000 ports multiplied by 5 IPs which allows for 5,000 connections.

1
  • Only seen EP start to become important when making loads of connections to the same place (often localhost...)
    – Tom Newton
    Apr 1, 2017 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .