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.

2 thoughts on “Disable an IP for machine with multiple NIC when using IP spoofing”

  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


Leave a Comment