问题
Is there any way for IP Spoofing in jmeter.i have tried it by "CSV data set config".Is there any other way..please let me know.Thanks in advance.
回答1:
Following steps will help you implement the IP Spoofing:
- Request for 6 static IP address (it depends on your requirement) from your IT team.
- Go to IPv4 properties, add the primary IP, Subnet mask, Gateway, DNS etc.
- Click on advanced button, in IP Address section add all the remaining IP address.
- Save all the 6 IP address in a CSV file
- Now open Jmeter, add a CSV data set config (at the top below Test Plan)and configure IP address CSV file in it
- Click on your HTTP samplers 1 by 1 and change the below mentioned value as per your CSV Data Set Config
Note: Spoofing will not work using Wifi. The Jmeter machine must be connected to LAN to achieve IP Spoofing.
Update---------------------------------
http://www.filedropper.com/ipchangersetconfig
http://www.filedropper.com/ipaddresslist
Hope this will help.
回答2:
Yes, you can send request using multiple Ip addresses to your application something like real world scenario.
Please check following :
Use IP spoofing in jmeter
You will have to use HTTPClient implementations.
Please check : Helpful tutorial
回答3:
First we need to create the virtual IP Enter the command in Terminal
ifconfig
go to root folder by:- sudo su
suppose you want a series of 10.0.0.1~10.0.0.255 then run the blow command :-
for each in $(seq 1 254); do ifconfig eth0:$each 10.0.0.$each; done
Print your IPs:- for each in $(seq 1 254); do cat 10.0.0.$each > ip.txt; done
for each in $(seq 1 254); do echo "10.0.0.$each"; done > ip.txt
After generating the reports run this command :- for each in $(seq 1 254); do ifconfig eth0:$each 10.0.0.$each; done
do :- ifconfig and check that IPs are assigned to every eth port Now open your Jmeter create a thread user add CSV Data Set Config, Add HTTP Request Sampler, Add Listner according to you enter image description here give the path of saved csv file which is containg your virtual IPs and your Variable name like this in below imageenter image description here
Now give your IP or host address of your software, give the port number, give the API address which you want to test and body of your POST data if any
Now give your variable name in advance tab like this ${Variable_name_given_in_CSV Config Element} and Click on Run button it will hit you API with multiple virtual IPs [enter image description here][3]
来源:https://stackoverflow.com/questions/27602217/send-requests-with-multiple-ip-address-to-my-application-using-apache-jmeterip