I need to test an application with more than 64K connections. I want to use the same host.
Today I start server that listents on 127.0.0.1 and connect to it from same machine, but of course it is limited to 64K connections.
I want to simulate a situation like I have one server and many clients connecting to a single server on specific single IP.
Server Listen: 1.2.3.4
Client Connect to 1.2.3.4 From 2.1.2.1
Client Connect to 1.2.3.4 From 2.1.2.2
Client Connect to 1.2.3.4 From 2.1.2.3
Client Connect to 1.2.3.4 From 2.1.2.4
So I need to setup a virtual network with multihoming so the client would be able to connect from several addressed and a server that listen on.
How can this be configured? On Linux?
Step 1: Add addresses to your loopback; I will add 10.0.0.1, 10.0.0.2, 10.0.0.3, 10.0.0.4 and 10.0.0.5 to
loStep 2: Increase max connections
Step 3: Start lots of connections...
Adjust values above to your preferences... however, you should keep in mind that tuning a linux server to accept so many connections may be challenging... but at this point, that isn't the question you are asking...