Bug 26136

Summary: local ip address configurable
Product: JMeter - Now in Github Reporter: Heinrich Soebke <heinrich>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: sample

Description Heinrich Soebke 2004-01-14 17:58:04 UTC
Sometimes it would be useful, if the ip address of a http request is 
configurable (out of set of ip-addresses which are known for this pc).
I didn't find a possibility to do this in JMeter so far.
Comment 1 Sebb 2004-01-14 18:04:13 UTC
I don't understand - where would this be used?
Comment 2 Heinrich Soebke 2004-01-14 18:47:25 UTC
in cases where the client is identified in the server by its ip-address
(normally the identification is done by the session identifier). The actual
topic is creating GPRS load in a GSM network.
Comment 3 Heinrich Soebke 2004-01-14 18:50:20 UTC
in cases where the client is identified in the server by its ip-address
(normally the identification is done by the session identifier). The actual
topic is creating GPRS load in a GSM network.
Comment 4 Eric Bloch 2006-01-30 22:23:15 UTC
I would use this too.  Having the ability to round-robin requests/sessions as
coming from different client IPs helps a lot when trying to simulate real
network performance for the lower level software (e.g. kernel networking
stacks).  If all traffic comes from one IP address, that is not very real world.


-Eric
Comment 5 Sebb 2006-01-31 14:23:31 UTC
Not sure how this can be done - any suggestions?

Also, note that proxies will present the same IP address to the server even 
though there may be many different IPs behind the proxy.

It is wrong to assuming that an IP address is unique to a host - let alone a 
session, as there maye be many sessions/browsers running on a single host.
Comment 6 Heinrich Soebke 2006-02-01 07:58:21 UTC
Created attachment 17557 [details]
sample
Comment 7 Heinrich Soebke 2006-02-01 07:58:40 UTC
> Not sure how this can be done - any suggestions?
I'm no longer in that project, but I try to remember:
There was a solution based on the org.apache.commons.httpclient package.
We had to configure every ip-address which was used for a request on the local
machine, otherwise no request with that address was possible. This was possible
on Windows and on Linux. 
We created for every source ip address http requests in a loop. The attached
code snippet may demonstrate it. Starting point is the method runTest.

> Also, note that proxies will present the same IP address to the server even 
> though there may be many different IPs behind the proxy.
> It is wrong to assuming that an IP address is unique to a host - let alone a 
> session, as there maye be many sessions/browsers running on a single host.
Yes, that's true, but in that special case we needed requests with different
source ip addresses.

Comment 8 Sebb 2006-04-13 23:09:16 UTC
I've added the code to the 2.1 branch.

It will be in the next release, and in the the nightly from 2-1.20060414

Sorry it has taken so long.

Note that it will only work with the Apache HttpClient sampler.
Comment 9 The ASF infrastructure team 2022-09-24 20:37:32 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1291