views:

329

answers:

4

If I want to test a set of multicast IP programs (sender/receiver) without having to set up the networking, can this be done on the same box? If so, what needs to be setup or done differently?

+1  A: 

This may not be what you're looking for, but when I was writing code that used a bunch of broadcast and socket connections and such, I just made two virtual machines in VMWare, booted them off the live CDs, and uploaded my code. If your code runs in Windows, just make two installs of Windows. VMWare places the machines on the same subnet, so communication between them works just fine, broadcast and all. (and I assume multicast, though I didn't have direct experience with that.)

Derek
A: 

Some amount of network setup is necessary. If you do not want to create a physical network you can add multiple IP addresses to a single network card. If your machine has more than one network card you can even create a network with just two cards and a hub. Also if your machine has a wireless interface and a wired interface then connecting your machine to your wireless hub via both the wireless and wired interfaces will also get you a network.

Hope one of these ideas helps. Pat O

Pat O
A: 

I would say the easiest thing to do would be to setup multiple IPs on your NIC. Just make sure you listen on specifict address and not on all.

HTH

unclepaul84
+1  A: 

Why not download a trial version of VMWare? It'll take a while, but setup a VM. Then, run x-copies of the VM on your one system (if you can). Each will have a virtual NIC. You can then setup the networking such that they are each reachable within the same network. Then, do your testing.

Dan7el