Disable an IP for machine with multiple NIC when using IP spoofing

The user has a Load Generator that has two NIC cards, where one of them contributes to the network management interface and the other one goes to the Web server. With LoadRunner’s IP spoofing, both NIC spoofed multiple IPs.

When running the Vusers on the machine, all the IPs will be picked up. The Vusers using the IP of first NIC card will fail, as they cannot go to the Web server. How can the user have both the cards enabled, but disallow LoadRunner to see the IP from the first NIC card that has the management interface, if this card cannot be disabled from the machine?

Add logic using lr_get_vuser_ip() or manually assign the IP using web_socket_option()

Since it is not possible to make LoadRunner see some of the IPs and leave some from the routing table of the machine, you can:

1. Add some kind of logic into the script to obtain the IP address of the Vuser using the lr_get_vuser_ip() function and do a conditional check to kill the Vuser if the desired IP is not picked up.

2. Alternatively, use the web_socket_option() with the option "IP_ADDRESS_BY_INDEX " and use a random number generator with a seed for the index so the IPs would be picked up randomly within the desired range omitting the IP from the first NIC card.



  1. you’re really a good webmaster. The website loading pace is incredible.
    It kind of feels that you’re doing any distinctive trick.
    Moreover, The contents are masterpiece. you have performed a excellent job in this

  2. I got this web site from my buddy who informed me on the topic of this site and now this
    time I am visiting this web site and reading very informative articles
    at this place.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s