CloudTest supports IP spoofing from Maestros, which will assign a different virtual IP to each VUser within the same Load Generator instance. There are pre-requisites and steps need to be done to use the feature.
1- Use upip.sh to create fake IPs
This tool is a shell script that can be used to create new fake IP addresses in the Load Generator instance, the tool is attached below, more info in this post: https://sourceforge.net/p/grinder/mailman/message/10934051/
Below is an example using the tool to create 2 IPs: 192.168.61.xx, make sure these IPs do not exist in the network to avoid any conflicts.
sudo ./upip.sh -o 192 -a 168 -n 1 -s 60 2
Output is shown below:
2- Restart JBOSS
Once the IPs are added a restart of jboss is required to reload the interfaces, either use ctadmin page to restart CloudTest application or use the commands below:
sudo /etc/ini.d/jboss stop
Verify jboss process is killed:
ps -ef | grep jboss
Then start jboss again:
sudo /etc/init.d/jboss start
3- Update Routing Tables on Target
In the Target Server, we need to update the routing table so that the packets sent by CT will be routed back to the LG instance, since the fake IPs do not exist in the network.
For the IPs example above, the route command used in Mac OSX instance:
sudo route -n add -host 192.168.61.1 [LG IP Address]
sudo route -n add -host 192.168.61.2 [LG IP Address]
You can also use the -net parameter and mask the IP range.
4- Enable the settings in CT:
To enable IP Spoofing feature in CT, follow the steps below:
- Login to CT, go to the "Servers" page
- Click on the LG or the instance used for IP spoofing.
- Click on the "Settings"tab below
- Choose "Maestro" form the list of services
- From the list of Settings, click on "HTTP.UseMultipleLocalAddresses"
- Type "true" in the value and save the settings.
5- Confirm IP spoofing is working:
- Run a simple test using 2 VUsers against the target server in General mode and lookup the client IP used in the "Target" section of the result for each VUser, you should see the new fake IPs.
- On the target server side, verify in the "Access" logs that the client IP for the incoming requests are the fake IPs.
If you are using CloudTest Lite or CLoudTest instance that is running using VMPlayer or VirtualBox, make sure the instance gets its own IP address and does not share the host IP, see screen shots for Mac OSX and Windows 7
Mac OSX: use "Display Ethernet" option
Windows: use "Bridged Network" option: