in reply to Re: Can I simulate IP-addresses?
in thread Can I simulate IP-addresses?

I don't know if it is possible but I want to make one computer look like it is really several comuters. First I'll check how long it takes for user1 with IP-address so and so, then I'll check how long it takes for user2 which have IP address so and so. But I only want to use one computer so I need to make the requests pretend they are from different users...Does that make sense?

Replies are listed 'Best First'.
Re: Re: Re: Can I simulate IP-addresses?
by dws (Chancellor) on Apr 13, 2001 at 07:03 UTC
    Are you sure you're solving the right problem?

    If you're running timing tests, in all probability what someone wants is to gather statistics on how long it takes to load the pages from different computers. But they might not understand enough about networking to further qualify their request to mean computer located in different places on the internet, reaching the website through different paths.

    Gathering statistics from one computer that's pretending to be several is rather like asking the same person to take a survey three times.

    You may need to have a talk with whoever is asking you to run this experiment, to explain to them a bit about how networks work, and to help them clarify what they're trying to measure.

Re: Re: Re: Can I simulate IP-addresses?
by Fastolfe (Vicar) on Apr 13, 2001 at 06:29 UTC
    To do this correctly, the host doing the queries needs to have multiple IP addresses. I don't know how this is done in Windows, but under Unix it can be accomplished using IP aliasing or whatever synonym is appropriate for your OS variant. Contact your system or network administrator for help with this.

    Once the machine is configured with multiple IP addresses per your needs, make use of the bind function before you make your outbound connect (this can be done with IO::Socket just as easily using the LocalAddr variable). This ensures the outbound connection comes from the IP address (and port, if you want that level of control) that you want.