<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Good Day!</DIV>
<DIV>I have set up virtual IPs on my Ubuntu client machine & assigned IPs <BR>192.168.12.3 - eth0<BR>192.168.12.4 - eth0:1<BR>192.168.12.5 - eth0:2<BR>192.168.12.6 - eth0:3</DIV>
<DIV>I have written python code to send multiple HTTP requests to my web server to load test it.When I check the logs on the apache server ,i find that the HTTP 'GET' request is sent from the client IP 192.168.12.3.Is there any way that I can send the http requests from the other IPs on the virtual interfaces?</DIV>
<DIV> [code]def send(self, url):<BR> conn = httplib.HTTPConnection(url)<BR> try:<BR> conn.request('GET', url)<BR> body = conn.getresponse().read()[/code] </DIV>
<DIV>This code works fine,but since the apache default configuration doesnt allow a large number of simultaneous requests from single host,the code fails to load the server to my expectation.(Ofcourse I can change the default configuration,but wish to try something else)Hence was wondering whether I could possibly send 'get' requests randomly from the virtual IPs? I could then have a list -.txt file of virtual IPs,the python script could fetch it and send the HTTP requets (in a loop)......Appreciate if anyone could suggest a way to do this.I am new to python...thanks in advance</DIV>
<DIV><BR>CHeers<BR>David</DIV></td></tr></table><br>