multicast testing tool
can be used to join IPv4 and IPv6 multicast
groups, display progress as multicast packets are received, and also send
multicast packets on select groups.
can help verify intended IGMP snooping
functionality in layer-2 bridges (switches), as well as verify forwarding of
multicast in static or dynamic multicast routing setups.
supports source-specific multicast, SSM
(S,G), as well as any-source multicast, ASM (*,G). The source IP of an (S,G)
pair is an optional argument that must precede the group and be separated with
a comma. No spaces are allowed between source and group in this form. Multiple
(S,G) pairs are separated with space.
With no options given mcjoin
acts as a multicast
receiver (or sink), joining the default group 126.96.36.199, listening on the
default interface, eth0, binding to the default port, 1234.
Use the following options to adjust this behavior:
- Stop sending/receiving after COUNT number of packets
- Run as a daemon in the background, detached from the
current terminal. All output, except progress is sent to
- Print a summary of the options and exit
- Interface to use for sending/receiving multicast, default:
- Join groups, default unless acting as sender
- Control mcjoin log level;
none, notice, debug. Default: notice.
- UDP port number to send/listen to, default: 1234
- Act as sender, sends packets to select groups, 1/100 msec,
- Do leave/join repeatedly every SEC seconds. Should not be
needed anymore, kept for backwards compatibility.
- TTL to use when sending multicast packets, default: 1
- Show version information
- Initial wait, sleep SEC
seconds before starting anything. Useful for scripting test systems that
launch mcjoin at boot without syncing with
creation of networking.
To verify multicast connectivity, the simplest way is to run
on one system, without arguments, and on
the other with the command option -s
. In this
setup one system joins the group 188.8.131.52
waiting for packets to arrive, and the other end starts sending packets to the
same group. To verify routing of multicast, make sure to add the
option to the sender since the default
TTL is 1 and every router (simplified) decrements the TTL.
For a more advanced example, say you want to verify that your topology can
forward 20 consecutive groups in the MCAST_TEST_NET, as defined in RFC5771.
Simply add the following as a standalone argument to both the receiver and the
For non-consecutive groups, simply add them in any order you want, up to 250
groups are supported: 184.108.40.206 220.127.116.11+12
To run mcjoin
as both a sender and a receiver on
the same host you will likely need to employ something like network namespaces
(Linux netns) for at least one of them. Otherwise the network stack will
likely let the sender's data stream take a short cut to the receiver, without
passing through an actual wire.
Also, like most network applications, to run properly
needs both the loopback (lo) interface and
a default route set up. At least in the default (receiver) case. In a network
namespace neither of these are set up by default.
Use the project's GitHub page to file bug reports, feature requests or patches
(preferably as GitHub pull requests), or questions at
Originally written by David Stevens, currently maintained by Joachim Nilsson at