Skip to Content
Product Information
Author's profile photo Dilip Mamidela

Loadrunner IP Spoofing – LR

When testing using Web and WinSocket protocols, by default Vusers on each host machine use the host’s (agent’s) IP address. Since a particular server keeps serving a specific IP address, load tests would reflect network router caching and other optimizations rather than the real-life situation where different users arrive to the server with different IP addresses.

This is especially needed when the hardware configuration under test balances load across a “farm” of several (web or database) servers. “IP spoofing” enables each host machine to “spoof” the server into thinking it is using many different IP addresses.  First, internal IP addresses (such as may need to be allocated by the organization’s Network Administrator unless you’re working in a closed network.

The IP Wizard program (ipwizard.exe in LR bin) is used to define multiple IP addresses on each load generator host.  However, the hosts must use static IP addresses rather than DHCP to dynamically assign addresses.  Note: IP addresses include two components, a netid and hostid.

The submask determines where the netid portion of the address stops and where the hostid begins.  When a host machine is re-started, routing tables are updated with the new addresses.

The IP Wizard program creates a batch file (nt_routing.bat for Windows and unix_routing.bat for UNIX machines) and .ips file which updates IP tables.  To enable multiple IP Addressing At the LoadRunner Controller, pull down menu item Scenario, check “Enable IP Spoofer” (In earlier versions, “Enable Multiple IP Addresses”). This enables “Multiple IP address mode” in the Options dialog General tab, which appears after “Expert mode” is checked on the Tools drop-down menu.  IP allocation should be consistent with the way users are running.

If users are running as a process then the IP allocation should be done as a process, and if users are running as a thread then IP allocation should be done as a thread .

After turning IP spoofing on or off, for the setting to take effect, the Load Generator needs to be disconnected and reconnected again.

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Dilip Mamidela
      Dilip Mamidela
      Blog Post Author

      In version 12.5 LoadRunner TruClient scripts, the TC prefix can be replaced with LR for TruClient Script this function can be used "TC.getUserIP" In version 11.5 IPv6 based applications can be tested in addition to IPv4 based ones. Support includes IP Spoofing. (Internal LoadRunner communication, such as Controller Load Generator, is still IPv4 based.) The TruClient Ajax - IE protocol does not support IP spoofing.