Some web applications are behind a load balancer that routes traffic to different Webservers depending on the client's IP Address. Therefore, to make a realistic load test, the virtual users (VUs) must have different IPs, so the load balancer does not route all traffic to a single Webserver.
Multiple Load Agents
One way of achieving this is to use multiple load agents. Since each agent (and controller) has a different IP, VUs generated from each agent will have a different IP address. The number of unique IPs in the test will be the same as the number of load agents. It is recommended to have at least as many load agents as the number of Webservers.
Single Load Agent
If only a single local load agent (controller) is available, it can still emulate multiple IPs. The first step is to make multiple IPs available on the controller machine. If the machine has multiple network adapters (NICs), then no further steps are necessary. If only a single NIC exists (or you only want to use one for the load test), then you need to define multiple IPs to the NIC.
Define multiple IPs to NIC
In Windows, go to Control Panel > Network and Sharing Center > Change Adapter Settings.
In the Network Adapters list, right-click the adapter to use for the load test and select Properties.
Select Internet Protocol Version 4 (or Version 6) and click the Properties button.
In the Properties dialog, select the 'Use the following IP address' radio button and fill out the first IP Address, subnet mask, and default gateway. Then identify the DNS server address.
Then click the Advanced button to bring up the Advanced settings dialog. Click the Add... button to add as many IP Addresses as necessary. Click OK on all open dialogs to save changes.
Enable multiple IPs
Once multiple IPs are available on the controller, they can be added to the test. In the Load Agents node (a) in the workflow tree, select Local agent (b) and select the IP Address pool property (c) and click the button on the right side of the field to open the IP Address Picker. Alternatively, you can manually enter semicolon-separated IP Addresses.
In the IP Address picker (d), select the Network Adapter from the list (e), and its available IP Addresses will appear on the list.
Chose the IP Addresses you want to add to the test and click the Add button. Click OK to add the selected IP addresses to the test.
IP Spoofing on remote agents:
If performing a distributed test, then every load agent can also perform IP spoofing. Just select the load agent and enter the comma-separated list of IP Addresses in the IP address pool property. Note that the IP Address picker is not available for load agents.
- No labels