Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm searching for a setup where one Windows with one ethernet card is able to handle more then 65k open IPv4 TCP connections -- yes, it's not possible per default by the specification.

I've found a nice tutorial how to setup How to tune the TCP/IP stack for high volume of web requests Windows and Linux regarding maximum usable ports.

My idea would be to setup multiple IP address per ethernet controller (MAC address) and let the DNS server round robin over CNAME Resource Records.

The server application running on the Windows machine would bind to multiple IP addresses attached to the same MAC address (ethernet controller).

The clients would be redirected to different IP address by DNS server served by the same server.

Where is defined -- official Microsoft documentation in printed or online appreciated -- how many IP addresses can be set per ethernet controler? (Try it out is not reliable)

Are there any other ideas how to solve the limitations without using additional infrastructural changes e.g. visualization or additional nic?

share|improve this question
Covers the same ground as "Is an Apache use TCP port on each connection?". – JdeBP Jun 10 '11 at 10:52
You've made it rather difficult to help you. Instead of providing detailed information about your actual problem, you've written a lengthy text about how you are going to try and solve a non-existing issue. I'd recommend reading for some improvements. – the-wabbit Jun 10 '11 at 11:19
Not really. I would like to know how to setup the operating system in order to allow more then the theoretical limit for port numbers per IP address. – Raphael Bossek Jun 10 '11 at 11:51
I'm completely confused by your question and your comments to the answer that syneticon-dj posted. Is your problem on the client side or the server side? If it's on the server side then you're misunderstanding things as syneticon-dj has stated. From the listener (server) perspective, incoming connections are only limited to what that particular server can support in terms of resources used per connection. If the server has enough memory and CPU it could support millions of incoming connections per listener port (maybe not millions, but a heck of a lot). – joeqwerty Jun 10 '11 at 12:08
Sorry for that. I confirm with you that a server is able to respond to a bunch of connections but only if the socket connection is closed. Imagine a situation where the server and client does not close the connection. This is the case e.g. for long HTTP requests. – Raphael Bossek Jun 10 '11 at 12:52

You probably have misunderstood the limitation. If you are running a server with listening sockets, you are not affected by the port limit. The service just listens on one or several ports (e.g. port 80 for a web server) and does not "use up" more than that.

Only with the service's clients the picture is different. They need to "reserve" a port for each connection request to serve as the connection's endpoint. Usually you will not run out of ports unless the client is creating a huge number of connections for some reason or is rotating them very fast so the system runs out of ports before TIME_WAIT timers expire.

One client opens and hold multiple TCP connections but there are multiple 1000 workstations running this client in my scenario

You are not seeing port exhaustion then. If you are experiencing problems, it will be due to something else. There is a thing like the memory limit for the non-paged-pool which would mainly apply for 32-bit systems and effectively limit the number of connections at around 44.000 - see section 4.8 of the Winsock FAQ for details. You might be hitting a number of other limits too. This article explains some of them.

share|improve this answer
The client establish the initial connection over the well known port. Further data exchange is done over different ports but the socket is not closed in order to be able to exchange further data -- e.g. the same for AJAX application with long HTTP requests. For a big number of clients with long HTTP requests you run into these scenario where "all" port are in use. – Raphael Bossek Jun 10 '11 at 9:33
You never run into port exhaustion with listeners after they are opened. On the server side, client connections do not "use up" any ports. You may run into port exhaustion with client connections, but that is unlikely and not what you describe. – the-wabbit Jun 10 '11 at 9:45
Let me correct. Yes I've a scenario where I'm running out of port for client connections -- sorry for the incorrect description. The clients do not close their socket connections to the server. I'm looking now for a setup where I'm able to serve more then 65k open port connections on one server without visualization or further nic. – Raphael Bossek Jun 10 '11 at 10:43
So a single client is opening tens of thousands of connections? – the-wabbit Jun 10 '11 at 10:47
It's not port exhaustion then. I've updated the answer with some additional comments. – the-wabbit Jun 10 '11 at 11:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.