0

I'm trying to test a server with jmeter and I want to use different source IP without spoofing (although I'm willing to hear about it as well), on each run.

These are so far the only ideas I have:

  1. changing a static IP on the ETH in a batch script and re-running jmeter-n.cmd check.jmx and looping;
  2. dialing with vpn connection running the jmeter script disconnecting and looping.

But the problem is that I want to change parameters (username/pass) on every run of the script, from a list of about 1000 parameters.

Aliaksandr Belik
  • 259
  • 6
  • 17
tutuDajuju
  • 110
  • 1
  • 7

1 Answers1

1

One way to do is it to create lots of aliases for your eth0, like

for each in $(seq 1 254); do ifconfig eth0:$each 192.168.1.$each; done

And then just do a little bit of NAT voodoo:

iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 192.168.1.1-192.168.1.254 

But that may change the source IP too often for you ... I'm not 100% sure what you're going to do.

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
  • Thanks Janne, I think that will work fine, but how do I make jmeter run with different parameters each time? The only way I imagine right now is making lots of cvs files for each parameter set (for 1000 users - 1000 files) – tutuDajuju Nov 09 '10 at 11:49