ip欺骗设置:
1.在总控机上使用loadrunner->tools->ip wizard工具设置虚拟ip,其中server ip指要监控的服务器的ip,添加ip时选择A、B或C类ip,设置开始ip和要添加的虚拟ip的个数,并选中verify the new ip addresses are not already use,已检查添加的ip是否与局域网中的其它ip冲突
2.重启机器
3.在controller的scenario中勾选enable ip spoofer,启用虚拟ip. 3.在controller的tools中选中expert mode,在options->general中设置multiple ip address mode与run-time settings中的multithreading设置保持一致
4.在load generators中选择localhost.查看脚本执行过程中是否使用了设置的虚拟ip,可以如下设置:
在脚本中添加代码:
char *ip = lr_get_vuser_ip();
if (ip)
lr_output_message("The IP address is %s", ip);
else. lr_output_message("IP spoofing disabled");
在脚本运行过程中查看controller的output,view->show output,选择all messages,查看输出的ip是否为设置的虚拟ip.
ip欺骗设置
最新推荐文章于 2023-03-14 11:41:51 发布