send requests with multiple ip address to my application using apache-JMeter(IP Spoofing)

时间秒杀一切 提交于 2019-12-24 02:13:06

问题


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:

  1. Request for 6 static IP address (it depends on your requirement) from your IT team.
  2. Go to IPv4 properties, add the primary IP, Subnet mask, Gateway, DNS etc.
  3. Click on advanced button, in IP Address section add all the remaining IP address.
  4. Save all the 6 IP address in a CSV file
  5. Now open Jmeter, add a CSV data set config (at the top below Test Plan)and configure IP address CSV file in it
  6. 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

  1. ifconfig

  2. 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 :-

  1. for each in $(seq 1 254); do ifconfig eth0:$each 10.0.0.$each; done

  2. Print your IPs:- for each in $(seq 1 254); do cat 10.0.0.$each > ip.txt; done

  3. for each in $(seq 1 254); do echo "10.0.0.$each"; done > ip.txt

  4. After generating the reports run this command :- for each in $(seq 1 254); do ifconfig eth0:$each 10.0.0.$each; done

  5. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!