|MCJOIN(1)||General Commands Manual||MCJOIN(1)|
[SOURCE,]GROUP0 .. [SOURCE,]GROUPN | [SOURCE,]GROUP+NUM]
mcjoincan be used to join IPv4 and IPv6 multicast groups, display progress as multicast packets are received, or sent when acting as sender, and also send multicast packets on select groups.
mcjoincan help verify intended IGMP snooping functionality in layer-2 bridges (switches), as well as verify forwarding of multicast in static (
SMCRoute) or dynamic (
pim6sd) multicast routing setups.
mcjoinsupports 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.
mcjoindoes not create or send IGMP or MLD frames directly. It only asks the underlying UNIX kernel for groups from a specific interface, which is then converted to the appropriate wire format by the kernel. This means, for instance, that if you want to create an IGMP v3 membership report on the wire that joins one group from multiple sources, you tell
mcjointo join two (S,G) pairs. The conversion to IGMP v3 report format is done by the kernel. On Linux systems you can change the IGMP version of an interface, and thus what type of packets the kernel generates, by writing to the file /proc/sys/net/ipv4/conf/eth0/force_igmp_version. E.g., to change
echo 2 | sudo tee /proc/sys/net/ipv4/conf/eth0/force_igmp_version
mcjoinacts 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:
mcjoinlog level; none, notice, debug. Default: notice
mcjoinat boot without syncing with networking bring-up
mcjoinexits, regardless of how many packets have been received. With this option
mcjoinexit either after SEC seconds, or after COUNT packets have been received
mcjoinon 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
-tTTL 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 sender: 184.108.40.206+20 For non-consecutive groups, simply add them in any order you want, up to 250 groups are supported: 220.127.116.11 18.104.22.168+12 22.214.171.124 126.96.36.199 To run
mcjoinas 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
mcjoinneeds 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.
mcjoincan be controlled at runtime with the following keys:
|January 14, 2021||Debian|