shuyiet has asked for the wisdom of the Perl Monks concerning the following question:

I am currently doing an internship at a networking firm which requires testing. The assignment is to simulate multiple IP addresses in a single computer for testing purposes. Our group of trainees are unable to find a solution for this matter. We are currently using Windows XP, P111 Please help...
  • Comment on Generating Multiple IP clients in a single interface

Replies are listed 'Best First'.
Re: Generating Multiple IP clients in a single interface
by dws (Chancellor) on Sep 06, 2002 at 03:43 UTC
    shuyiet, welcome to Perlmonks. This is a good place to discuss Perl-related issues, but not a particularly good place to questions that have no obvious link to Perl. If you can rephrase the question so that there's an obvious connection to Perl, we might be able to help.

      In short, please put your request in the form of a Perl question.    : )

Re: Generating Multiple IP clients in a single interface
by BrowserUk (Patriarch) on Sep 06, 2002 at 03:42 UTC

    I'm not sure if your question is in anyway Perl related. Basically, I can not grasp what it is you are trying to do.

    If your to stand any chance of getting useful responses, your going to have to elaborate (a lot) on what you mean by

    simulate multiple IP addresses in a single computer for testing purposes


    Well It's better than the Abottoire, but Yorkshire!
Re: Generating Multiple IP clients in a single interface
by thpfft (Chaplain) on Sep 06, 2002 at 12:28 UTC

    I think you mean you want a (let's assume) perl app to stress test some networking product or other by pretending to be many client machines, and that for the sake of realism the requests it generates should appear to come from several IP addresses. Let's also assume that you're not writing a DoS machine.

    The best place to start would probably be mstone, part of the mozilla project and very likely to handle the protocol you want. Not very perly, though.

    Or you could, if you really want, roll your own using LWP or some set of socket libraries, in which case merlyn has inevitably written a couple of columns that will help.

    as far as the IP address part of the question goes, I don't think it can be answered without knowing more about what you intend. IP spoofing is no good because you will presumably need to assess the server response. Your best bet is probably to set up the XP box to assign several IP addresses to a single network connection, which is easy enough, then spend some time with perlipc, get friendly with your sockets and then use IO::Socket or one of its offspring to do the work.

      It gets worse... you usually aren't allowed to nominate your 'source address'. That tends to be done at the kernel level. You could use raw sockets, but that could get very tough.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.