Unfix

Projects :: ecmh - Easy Cast du Multi Hub

ecmh - Easy Cast du Multi Hub

Multicast IPv6

Easy Cast du Multi Hub (ecmh) is a networking daemon that acts as a full IPv6 MLDv1 and MLDv2 Multicast "Router".

This allows IPv6 multicast routing on Linux and soon other OS's that do not implement IPv6 multicast routing. It will also allow IPv4 to IPv6 and IPv6 to IPv4 translation of multicast traffic. Allowing multicast where it is not available at the moment.

This code runs, included into sixxsd, on the SixXS PoPs thus enabling multicast IPv6 and allowing the m6bone to grow and provide IPv6 multicast along with translated IPv4 multicast everywhere we would want it to be.

My idea for this came out of thin air and I implemented it, apparently the IETF MAGMA Working Group had a similar idea some time before that which is documented in draft-ietf-magma-igmp-proxy.

Bugs etc

Contact the author at jeroen@massar.ch

License

ecmh is licensed under the standard BSD 3-clause license.

Copyright Information

The code for ecmh (Easy Cast du Multi Hub) was written by Jeroen Massar <jeroen@massar.ch>

The copyright for this package is owned by Jeroen Massar <jeroen@massar.ch>

©2004-2012 Jeroen Massar <jeroen@massar.ch>

The package is in the public domain, if you modify or enhance it notify the author.

Where to get it

Current and latest version is 2013.10.01 (github).

The latest and some older versions are available from the download dir.

Current version is available from Github repository.

Compiling and installing

One can install the debian package by using the above apt'able url or by compiling and installing it by hand:

  • run 'make' in the toplevel directory, this will build the binary.
  • Stick the daemon in a suitable directory or run make install.

Alternatively use 'make dist' which builds various distribution packages.

  • You will have to run it as root as it needs to open an PF_SOCKET (Linux) or a BPF (FreeBSD) socket.
  • root is dropped to the username specified using the -u option.
  • Sending a -SIGUSR1 to the process (or in debian /etc/init.d/ecmh dumpstats) causes the daemon to dump its stats in /var/run/ecmh.dump, which is human readable.
  • Sending a -SIGUSR2 to the process causes MLD Reports to be sent to the upstream interface.
  • One can run the daemon in the foreground using the -f option.
  • Upstream interface (eg one where a real Multicast router is on) must be configured using -i!
  • ecmh can be run in tunnelmode, it will then do proto-41 decapsulation, thus not require it to listen on every seperate BPF device, this is thus especially handy on FreeBSD, but not required on Linux
  • The daemon sets it's priority to -15 so that it has an advantage over most other tasks running on the machine, this is required so that packets are forwarded instantaniously, one will hear hickups in their streams otherwise when the machine running ecmh is too loaded (tested on a p100 ;).

On FreeBSD5, either use gmake or 'cd src', edit the Makefile, uncommenting the two ecmh lines and type 'make'For FreeBSD4 install the libgnugetopt port, 'cd src', edit the Makefile, uncommenting the two ecmh lines and type 'make'

Features

  • MLDv1/v2 "Routing" Implementation
  • Multicast Forwarding based on information gathered by MLD
  • MLDv2 detection and support, including SSM
  • ICMPv6 Echo Request Forwarding, ping6 $multicastaddress to see who is listening.
  • m6trace support.
  • Statistics for Packets/Bytes/ICMPv6 sent and received.
  • Daemonizes into the background.
  • OS support: Linux and FreeBSD *
  • Linux: Drops root fully after opening AF_PACKET socket.
  • Tunnel detection mode avoiding having to listen on tunnel interfaces
  • Zero-config: just run it
* = Others on request possible ;)

References

ecmh is included and used in amongst others: A paper written by Ellis Kullberg and Hannes Junnila titled IPv6 multicast home proxy contains the following quotes:
  • "ecmh was the simplest solution to set up and benchmark."
  • "ecmh needs no configuration, thus its administration is trivial. Additionally, it features an informative debug mode"
  • "Our conclusion is that ecmh is the most holistically useful platform for forwarding packets in an IPv6 multicast proxy."
References can also be found in:

How it works?

The following description is from Stig Venaas as posted on the m6bone mailinglist:

It pretty much works like what is described in
http://www.venaas.no/ietf/internet-drafts/draft-ietf-magma-igmp-proxy-06.txt

It sort of does multicast routing but without implementing PIM. Imagine
a setup like this:
                                 host A
                                  /
                                 /
PIM router ------- router with ecmh --- host B
                                 \
                                  \
                                 host C

When hosts behind ecmh (A, B, C) joins a multicast group, they will
send MLD report. ecmh listens for MLD reports and also sends MLD
queries, just like a normal multicast router. Doing this, ecmh will
like a normal multicast router know which of its interfaces it should
forward multicast on.

If ecmh learns that hosts behind it are interested in some groups, it
will send MLD reports for those groups to the PIM router in order to
receive multicast.

When ecmh receives multicast packet on any interface, it will forward
it towards the PIM router and on all interfaces where it has hosts
interested in the packet.

Well, that's a quick explanation. Note that it doesn't translate or
anything. It only forwards multicast packets, much like a normal
multicast router would. This is useful on e.g. Linux where there is
no multicast routing. In most cases it makes sense to do PIM routing
with kernel forwarding if possible though.

ecmh both learns where to forward packets and does the forwarding.
In theory those two functions could be separated.

Some cheap routers (e.g. wireless routers) implement the same
functionality, but unfortunately IGMP only.

Todo List

Following items are currently on the todo list:
  • More Interoperability Testing against other Multicast routers
  • RFC checkup and especially draft-ietf-magma-igmp-proxy
  • Recode linked lists into hashes or something similar to speed it all up. Interface list first.
  • Ignore interfaces, aka interfaces that should not be watched for MLD's nor multicast traffic
  • Kernel Multicast RIB support, when the kernel has one (and the user wants to use it)
  • Documentation
  • Config items
  • Limits
  • Loop Detection
  • MBGP support (partially implemented
  • PIM support (partially implemented
  • OpenBSD/NetBSD/Solaris/AIX
  • IPv6 Ready Logo testing?
  • TAHI testing?
  • much more

Thanks to

Thanks to Bernhard Schmidt & Marco d'Itri for letting ecmh be tested against their Ciscos which are attached to m6bone connected networks.