-3

I'm trying to build a test setup which test my server's performance under high load. In order to do that I want to open thousands of tcp connection. The problem is that I only have two hosts, one is for the server and the other is for the load generator.

Is there a way to do that?

Ezra
  • 97
  • 3
  • 4
    NOTICE: Crossposted to http://unix.stackexchange.com/questions/191118/how-to-artificially-open-many-tcp-connection-on-a-host-testing – mdpc Mar 19 '15 at 06:36
  • 1
    I'm voting to close this question as off-topic because it's crossposted to http://unix.stackexchange.com/questions/191118/how-to-artificially-open-many-tcp-connection-on-a-host-testing – Jenny D Mar 19 '15 at 14:52

1 Answers1

3

You can open thousands of connections with just 2 machines. Remember, a TCP connection consists of 4 items, a Source IP:Port connecting to a destination IP:Port e.g. 192.168.2.1:24543 -> 192.168.2.101:80. The TCP/IP guide is a great resource here.

On the destination side, it is often the case that whatever is listening is able to handle multiple connections on one destination IP:Port e.g. httpd can handle thousands of requests on port 80.

So with the above information it's easy to see that thousands of connections can be made from a single source IP address to a single destination IP address, all you need to do is create new connections, each using a unique port on the source IP.

How you do that is probably OS and tool specific and as you don't mention either ...

user9517
  • 114,104
  • 20
  • 206
  • 289