farsonic / mnc

Automatically exported from code.google.com/p/mnc
Other
0 stars 0 forks source link
                         MNC - Multicast NetCat
                        ------------------------
  1. Introduction

mnc is a simple, one-direction-at-a-time, "netcat"-like application using multicast. The aim is to provide a tool for easy debugging and testing when setting up a multicast network or host. MNC supports IPv4 and IPv6 any-source-multicast and single-source-multicast, but depending on your platform some of those features may not be available:

   L = Listen (Implies IGMP/MLD mupport)
   S = Send

   +----------+----------+----------+----------+----------+
   | Platform | IPv4 ASM | IPv4 SSM | IPv6 ASM | IPv6 SSM |
   +----------+----------+----------+----------+----------+
   | *nix     |  L + S   |  L + S   |  L + S   |  L + S   |
   +----------+----------+----------+----------+----------+
   | Win2k    |  L + S   |    S     |   None   |   None   |
   +----------+----------+----------+----------+----------+
   | WinXP    |  L + S   |  L + S   |    S     |    S     |
   +----------+----------+----------+----------+----------+
   | Win2k3   |  L + S   |  L + S   |    S     |    S     |
   +----------+----------+----------+----------+----------+

man doc/mnc.1 for information and help on how to run multicast.

  1. Supported platforms

As of September 2004, mnc has been compiled and tested with Linux 2.6.8 kernels, the BSD KAME stack and Windows XP Profesional. Currently automatic interface selection does not work on a KAME-based host and you will need to specify the interface when in listening mode.

  1. Installing mnc from source on UNIX: (you will need to make configure executable)

    ./configure ; make ; make install

  2. Compiling from source on Windows:

nmc is compilable with free utilities available from Microsoft. You need to download and install the free (as in beer) MS Visual C++ command-line tools from:

http://msdn.microsoft.com/visualc/vctoolkit2003/

and the SDK relevant to your platform from:

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

You can run a Visual C++ command-line session, and use:

cl /DWINDOWS=1 /TC /c *.c 
link /fixed /out:mnc.exe *.obj ws2_32.lib

to compile a working mnc.exe. The Windows version of MNC does not yet fully support IPv6 due to underlying limitation in the Operating System.

  1. Reporting problems

Any problems, bugs or suggested features should be mailed to colm at apache.org.

  1. Usage

Once you have the mnc binary compiled you simply run one instance as a multicast sender and one as a receiver.

Server side

while true; do printf "IPv4 Multicast --> " ; date +%s ;sleep 1;done| mnc -p 1234 236.1.1.2

Client side

./mnc -l -p 1234 236.1.1.2

If all is working on the client side you will see this constantly…in one second increments.

pi@MC-Server ~ $ ./mnc -l -p 1234 236.1.1.2

IPv4 Multicast --> 1385898549 IPv4 Multicast --> 1385898550 IPv4 Multicast --> 1385898551 IPv4 Multicast --> 1385898552 IPv4 Multicast --> 1385898553 IPv4 Multicast --> 1385898554

The only other trickery I've had to modify was the IGMP version on my Linux box which defaulted to 0, effectively using the highest version available to it. I hardcoded this to 2 which resolved any IGMP issues I was having.

sudo echo "2" > /proc/sys/net/ipv4/conf/ens33/force_igmp_version

If you have multiple interfaces ensure multicast is routing over the correct one, for example.

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth1