This section covers how to configure your computer to generate virtual users from more than one IP address. This is only needed if your web application makes use of the client's IP addresses, which is quite rare, or if a piece of hardware such as load balancer uses client IP addresses. The concepts behind networks and which IP addresses are valid for your network are beyond the scope of the manual. Please consult with your network administrator before going any further. The following modifications have a high probability of rendering your computer inoperable if done incorrectly.
An IP address is intended to identify the source of a computer's network traffic, and is used to route network packets on a network. By default virtual users will originate from the IP address of the computer running Web Performance Load Tester, but there are reasons why you may want virtual users to each have their own IP address. For example, some hardware load balancing devices use the IP address to route packets to different computers.
By default Web Performance Load Tester will use the Operating System to select an available network address, but at most you might have four network cards, which is not nearly enough to give every virtual user its own IP address. To get past this limitation the multiple IP address feature uses the ability of your operating system to configure virtual network devices. When it starts, Web Performance Load Tester will create a list of all real and virtual network devices. During a performance test as each virtual user is created it will be assigned a new IP address; if there are more users than IP addresses, the virtual users will grab an IP address from the front of the list.
The use of multiple IP addresses will also work if you have multiple playback engines, but you must configure virtual network devices on each computer separately.
The following sections describe how to configure virtual network devices on the different operating systems. Note that this feature of Web Performance Load Tester makes use of the built-in feature of your operating system to configure virtual network devices, and the complicated setup procedure is required by the operating system.
To configure a Windows machine to use multiple virtual IP addresses for right-click on My Network Places (on the Desktop) or execute Start->Control Panel, and double click on Network and Dial-up Connections:
Note that a limitation of Windows is that you can only configure virtual network devices using a Local Area Connection; VPNs and ISDN or other modem connections do not have this ability.
The next step is to edit the properties of your network connection, bringing up the following dialog:
Select Internet Protocol (TCP/IP) and click on the Properties button, which brings up the following dialog:
Note that in order to configure virtual IP addresses your computer must be configured to use fixed IP addresses; DHCP is not supported. If you are not on control of the IP addresses on your local network you should work with your network administrator to reserve a block of IP addresses.
The next step is to click on the Advanced button, bringing up this dialog:
The above dialog (Advanced TCP/IP Settings) shows the list of IP addresses for your local computer. To add virtual network devices click on the Add button, which brings up the TCP/IP Address Dialog:
Enter the IP address and subnet mask of the virtual network device you wish to configure, and this will be added to the list shown in the Advanced TCP/IP Settings Dialog:
The procedure should be repeated for each virtual IP address/network device that you wish to add.
As with the Windows configuration, choosing valid IP addresses is beyond the scope of this manual, but typically you would want to perform this modification on a computer using private IP addresses in a test lab.
The ifconfig command can be used to dynamically create virtual network device. The following example shows the creating of a single virtual network device:
[root@bigtoe root]# ifconfig eth0:0 10.1.1.1
[root@bigtoe root]# ifconfig
eth0 Link
encap:Ethernet
HWaddr
00:A0:C9:5A:DF:F7
inet
addr:10.0.0.100
Bcast:10.0.0.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST
MTU:1500
Metric:1
RX
packets:454545 errors:0 dropped:0 overruns:0 frame:0
TX packets:311037 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX
bytes:94017376 (89.6 Mb)
TX bytes:31798276 (30.3 Mb)
Interrupt:10 Base address:0xdc00 Memory:ef201000-ef201038
eth0:0
Link encap:Ethernet
HWaddr
00:A0:C9:5A:DF:F7
inet
addr:10.1.1.1
Bcast:10.1.1.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST
MTU:1500
Metric:1
RX
packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX
bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0xdc00 Memory:ef201000-ef201038
This command would then have to be repeated with different parameters to add more than one virtual device. To make this permanent on a BSD or SysV style system like RedHat you can modify the /etc/rc.d/rc.local startup script. For more information please consult the Linux IP Alias mini-HOWTO .
Once your workstation has been configured with the IP addresses desired, you may also wish to configure the IP aliasing options of Web Performance Load Tester.