mcd —
IGMP and MLD querier for the Linux bridge
mcd |
[ -hnsv ]
[-f
FILE ]
[-i
NAME ]
[-l
LEVEL ]
[-p
FILE ]
[-u
FILE ] |
mcd is a multicast querier for the Linux
bridge. It runs one IGMP and one MLD querier on every interface enabled in
mcd.conf(5),
either the bridge itself or a VLAN interface on top of it.
The bridge has a querier of its own, but it can only send proxy queries, from
0.0.0.0 or ::, and has no version fallback. Some end devices ignore proxy
queries, and without a querier IGMP and MLD snooping times out and multicast
floods the LAN.
mcd fills that gap:
- IGMP queries are sent from the interface address, MLD queries from its
link-local address, as RFC 2710 and RFC 3810 require.
- Querier election per RFC 2236, 3376, 2710 and 3810, the lowest address
wins. When another querier wins,
mcd
backs off and takes over again if it goes silent for the
router-timeout.
- On assuming the querier role,
mcd sends
a startup burst of robustness queries,
query-interval / 4 apart, RFC 3376
§8.6 and §8.7.
- Starts at IGMPv3 and MLDv2 and falls back to IGMPv2, IGMPv1 or MLDv1 for
as long as older hosts are heard.
- Proxy mode, a backup querier that always loses the election. An interface
without an address is always in proxy mode.
- Raw VLAN mode, a querier on one VLAN of a VLAN filtering bridge with no
VLAN interface on top.
- Static groups, joined in the kernel so the bridge always forwards them to
itself.
Interfaces, links and addresses are followed with netlink, so an interface that
appears late or gets its address from DHCP needs no restart.
Use
mctl(8) to inspect a
running
mcd.
-f,
--config=FILE
- Configuration file, default derived from the identity, see
-i and
FILES.
-h,
--help
- Show usage, including the default paths, and exit.
-i,
--ident=NAME
- Identity, default
mcd. Sets the syslog
tag and the default names of the configuration, PID and IPC socket files.
Use one identity per instance to run several, and the same with
mctl(8).
-l,
--loglevel=LEVEL
- Log level, one of
none,
err,
notice,
info or
debug. Default
notice.
-n,
--foreground
- Run in the foreground, log to stderr.
-p,
--pidfile=FILE
- PID file, default derived from the identity. The file is touched when a
reload completes.
-s,
--syslog
- Log to syslog, the default unless
-n is
given.
-u,
--ipc=FILE
- IPC socket used by
mctl(8), default
derived from the identity.
-v,
--version
- Show version and exit.
- HUP
- Reload the configuration file and probe all interfaces again. Static group
memberships and packet sockets that are still configured are kept, so a
reload causes no traffic on the wire. The PID file is touched when
done.
- INT, TERM
- Exit. Static group memberships are dropped, the kernel sends the
leaves.
MCD_SOCK
- IPC socket path, overridden by
-u.
- /etc/mcd.conf
- Configuration file, see
mcd.conf(5).
- /run/mcd.pid
- PID file.
- /run/mcd.sock
- IPC socket.
The names follow the identity, so
-i
foo uses
/etc/foo.conf and so on. The directories
are set at build time.
mcd.conf(5),
bridge(8),
mctl(8)
Internet Group Management
Protocol, Version 2, RFC 2236.
Internet Group Management
Protocol, Version 3, RFC 3376.
Multicast Listener Discovery
(MLD) for IPv6, RFC 2710.
Multicast Listener Discovery
Version 2 (MLDv2) for IPv6, RFC 3810.
Lightweight IGMPv3 and MLDv2
Protocols, RFC 5790.
mcd began in 2021 as querierd, written by
Joachim Wiberg at Westermo with DNA strands
from mrouted. It gave the Linux bridge in WeOS 5 a querier that industrial end
devices would actually answer. Westermo's last release of querierd was v0.10,
in May 2023.
In 2024 its original author adopted it as
mcd. Version 2.0 replaced the last of the
mrouted code, and version 3.0 added the MLD querier. Today
mcd is the multicast querier in Infix OS.
mcd is maintained by
Joachim Wiberg,
Tobias Waldekranz and the KernelKit team.
KernelKit is the home of Infix OS, and the place where Open Source projects
from industrial networking are picked up and carried on.
Jacques de Laval added proxy mode to querierd
at Westermo and made four of its releases. The configuration parser goes back
to mrouted by
Bill Fenner.