LoadRunner IP Spoofing

Source: Internet
Author: User

First, why to set 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, in order 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.

Second, IP spoofing setting method

L First make sure that the local IP is fixed before configuration and cannot be obtained automatically.

L added IP can only be the network segment within the LAN, that is, only add 192, 172, 10 segment IP address

L IP Spoofer enabled before connection to Load generators

Open the Tools folder under the LoadRunner folder in the Start menu and click on the IP Wizard:

The first run of the IP Wizard needs to select the first "Create new settings", if previously run, you can select the second item, select the saved file, and the third item is used for IP spoofing after the test is completed, the IP is released. (because this operation can consume a large amount of IP resources, it may cause the other machine to have no IP available embarrassing situation, use this item, can revert to the original condition).

This selects the first item, "Next", which appears in the second window of the IP wizard:

Enter the IP address of the Web server here (enter the IP address of the server where the application resides, the IP wizard will check to see if the Server routing table needs to be updated and, if necessary, will generate a script to help you update the server routing table, if the server and client are in the same network segment, This IP can not be filled in). Then "Next", the third window of the wizard appears:

Enter the first IP value from the From IP text box to use the IP range, and then enter a number in "Numbers to Add" that represents the value of the IP range; "Submask" uses the default, depending on which type of network IP is used, the class is used in the general LAN C can.


It is recommended to select Save As for saving IP here. After you save the IP list, you can import the IP list directly the next time you use it, or you can directly modify the saved IP list file and import it.

When the settings are complete, restart the computer.

After rebooting, enter ipconfig on the command line to view IP:

Three Using IP spoofing in a scene

1. Tick "Scenario" – "Enable IP spoofer";

2. Tick "Tools"-"Export Mode";

3. "Tools"-"Options"-"General"

Multiple IP address mode select "IP address allocation per process"

This option must match the pattern of the current scene, that is, you need to check the threading method when using the local virtual IP test, and you need to check the process mode when using the virtual IP test with the load generator.

4. "Diagnositics"-"Configuration"

Web page Diagnostics is set to disable.

Iv. Verification of validity

Method One:

Add the following code to the script:

Char *ip = LR_GET_VUSER_IP ();
if (IP)
Lr_output_message ("The IP address is%s", IP);
Else
Lr_output_message ("IP spoofing Disabled");

Note: This does not work in generator, so you will see "IP spoofing Disabled" When you play back the code. When IP spoofing is set in the controller, it can be seen in the log. Such as:

Method Two:

Controller run the page, run the scene, in Vusers, the Status column right-click can view the VUser log, the first few lines of the popup box will show the currently used IP.

Five Release IP

Open the Tools folder under the LoadRunner folder in the Start menu and click on the IP Wizard:

Select the third item:

Restart your computer.

Vi. problems encountered in use

1. When IP spoofing is enabled, the scene that runs 1 virtual users fails; After IP spoofing is not enabled, the running scenario passes;

Cause: View the IP address used by the failed virtual user, and check the network settings through the server-side commands such as Ping, if the server ping does not pass the virtual IP, it indicates that there is a problem with the network settings.

    1. Run Ip-wizard under the Start menu, prompting for the following error:

Cause: If the IP is set to "Auto Get", an error message will pop up when running the IP wizard, and the machine running IP wizard must use a fixed IP and cannot use dynamic IP.

3. Add IP spoofing after using the IP, there will be a prompt box prompt to save the IP list, OK, cancel the button, it is recommended to save the IP list and then determine the completion.

Cause: After you save the IP list, you can import the IP list directly the next time you use it, or you can directly modify the saved IP list file and import it.

4. Add IP spoofing and release IP to restart the machine before it takes effect

Cause: After a reboot, the network configuration will not take effect.

5. When running the scene, error "Error ... Failed to connect to load generator. Check the output windows for more details "

Workaround: Manually start the agent service.

6. Run the scene error "ACTION.C (): Error:socket descriptor not found. Hint:the problem might is solved applying the following: (1) Update run-time Settings to Run vusers as a process. (2) Add the following line to Mdrv.exe,[lr_socks] section: ' Extcmdlineconc=-usingwininet Yes '

Workaround:

A. Based on the error, set "Run VUser as a process" in the "Miscellaneous" item in Run-time settings; find Mdrv.dat in the DAT folder in the installation directory, find [Lr_socks], At the end, add the phrase "Extcmdlineconc=-usingwininet Yes".

B. After selecting the Expert mode, select Option-general and select "IP address allocation per process"

C. If you still get an error, click the Diagnostics-configuration item in the menu bar to remove the disable of the Web page diagnositics item (the path is in lr11 position, if lr8.0, The diagnositics-distribution,disable Web page disagnositics option).

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

LoadRunner IP Spoofing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.