to set the cause of IP spoofing:
1, when an IP access is too frequent, or the traffic is too large, the server will deny access requests, this time through IP spoofing can increase the frequency of access and traffic to achieve the effect of stress testing
2, some servers configured load balancing, using the same IP can not detect the actual performance of the system. IP spoofing in LR by invoking different IPs can largely simulate the ability to actually use multi-IP access and test server equalization processing.
Settings for multiple IP addresses:
Can add IP directly in the local connection, or through the LR comes with the tool "IP Wizard" settings, of course, you can also use other software settings, the only thing to pay attention to is the validity of the IP set, I used the IP Wizard in this test, the specific operation is as follows:
(First, be aware that the load generator machine must use a fixed IP and cannot use dynamic IP)
If it is a dynamic IP, the following window will appear when opened:
1, Start--Program--lr--tools--ip Wizard, this will open the following window:
Three radio buttons: Select the first, add IP; Select the second one to get the IP from the saved file; Select the third one to release all added IPs (I chose the first one)
2, next to the following window:
At this point you need to enter the IP of the Web server you are going to test, it must be entered correctly, otherwise the newly generated IP (load machine) connection passes, and the run is still wrong.
3, fill in the good, next to the following window:
This window allows you to add or remove IP
4. Add to the following window:
The key is to enter the starting value of the virtual IP and the number of virtual IP required in the From IP field
5. Click OK
Successfully added the required IP, if there is an IP is already occupied, there will be a hint
6. Finish:
The above will show the increase of the IP, select Save As can save this increase in the IP file, the next direct use can be, OK
7, restart the computer before it can take effect. After restarting, you can use ping and ipconfig to check if the newly added IP is successful.
Note: When used up, the IP address should be released, otherwise people will not be able to use these IP.
Click Start-The Program--lr--tools--ip the wizard, which opens the following window:
Point third, release the IP that you have set, and then click Next.
Application in Controller:
1. In Conreoller, scenario--select Enable IP spoofer (IP spoofing allowed)
2, Conreoller, tools--selected expert mode
3, tools--options--general in the thread or process settings must and Run-time settings inside the same, or IP spoofing failure
4, point Generators--add All newly added ip--each go to connect to the ready state
If the connection succeeds, the taskbar will appear as a graph:
5. Add script, vusers number, set scene
There are two scenarios to design the scenario
A. Use virtual IP design scenarios locally (test with localhost without the load generator)
When you set up the scene, add a recorded script to the scene that adds the following code to see which IP address the virtual user is using to send the message, which is a thread-based performance test.
char * IP;
Ip=lr_get_vuser_ip ();
if (IP)
{
Lr_vuser_status_message ("The IP address is%s", IP);
}
Else
Lr_vuser_status_message ("IP spoofing Disabled");
When executing the script in the controller, view the virtual user's running state to see which IP address the current virtual user is using to send the message
B. The load generator uses the virtual IP design scenario
When you set up the scenario, you need to add the load generator, enter the virtual IP you created when you build the load generator, and each load generator is a virtual user group, which is a process-based performance test.
How to add a load generator creation scenario here is not much to describe.
But be careful, select Expert mode under Tools to activate
Then click Options under Tools
In the Genearl tab, set the thread mode or process mode for performance testing, this option must match the pattern of the current scene, that is, the use of local virtual IP testing needs to check the threading method, using the load generator to use the virtual IP test needs to check the process mode
Note:
1. Before connecting the newly added IP, the LR Agent Process must be turned on, otherwise the failure
2, if the run when the network error, you can view the firewall and other things, such as the shutdown of Kaspersky, etc., this test is because of Kaspersky's sake Run all failed
3, to virtual a lot of IP situation: on a machine virtual IP cross-network segment processing, can be implemented by adding routes on the server side.
Cases:
"Server" ip:192.168.0.1
"Test Machine" ip:192.168.0.2
Virtual ip:192.168.10.1~254 added on the test machine
Then execute the following command on the server side:
Route add 192.168.10.0 Mask 255.255.255.0 192.168.0.2
Note: "Format: Route add virtual IP network segment number Mask 255.255.255.0 test