0

I'm thinking about just making my own http client with simple GET requests to generate the traffic, but how do I create multiple source IP's for each socket?

Jimmy Dean
  • 147
  • 1
  • 1
  • 7

3 Answers3

0

Create lots of clones of the http client.

Rik Heywood
  • 13,816
  • 9
  • 61
  • 81
  • how would I change the source IP if it's on one machine though? – Jimmy Dean Jun 14 '12 at 13:25
  • The article in my answer explains how to do it for both windows and linux. You can assign multiple IP addresses to the same nic and your http request can just pick and use one of the IPs as the source. – xelco52 Jul 04 '12 at 17:22
0

If your client doesn't actually live at the IP address that you're telling the destination - your client won't receive the responses from the server, and that may cause problems in your testing.

So, that being said - You can quickly script CURL to make the HTTP requests. This post shows how to make CURL set the source IP address in the HTTP header.

The other half of this solution would be to bind multiple IP addresses to the NIC on the source machine. This other article explains doing this for windows, and this one shows it in Linux.

If you're set on writing your own client, you can alternate the binding of your socket to the different addresses you created above.

Community
  • 1
  • 1
xelco52
  • 5,257
  • 4
  • 40
  • 56
0

In Vsphere 5, you can have 10 nics per VMs.

But as stated above, creating multiple cloned clients is probably easier to maintain from a networking/routing perspective.

Adi Dembak
  • 2,433
  • 2
  • 18
  • 26