|
NAMEsmcroute —
SMCRoute, a static multicast router
SYNOPSIS
DESCRIPTIONsmcroute is a command line tool to manipulate the
multicast routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast
routing. SMCRoute can be used as an alternative to dynamic multicast routers
like mrouted or pimd in
situations where static multicast routes should be maintained and/or no proper
IGMP or MLD signaling exists.
Generally multicast routes exists in the kernel only as long as
smcroute or another multicast routing daemon is running. Only one multicast
routing daemon can be active at a time, so it's impossible to run smcroute
and, e.g., Because WARNINGBy using multiple output interfaces (traffic multiplication), using the input interface also as output interface (direct loop) or constructing some other forms of indirect loops you can easily flood your networks!OPTIONS
The The script CMD is called with an argument
reload or install to let the
script know if it is called on SIGHUP/startup, or when a (*,G) rule is
matched and installed. In the latter case COMMANDSThe following are commands that can only be passed to an already running daemon.
Multicast routes can be added with the To be able to add/remove routes or join/leave multicast groups
using these commands the A multicast route is defined by an input interface IFNAME, the sender's unicast IP address SOURCE, the multicast group GROUP and a list of, at least one, output interface IFNAME [IFNAME ...]. The sender's address and the multicast group must both be IPv4 addresses or IPv6 addresses. If IPv4 addresses are specified then SMCRoute will operate on the IPv4 multicast routes. If IPv6 addresses are specified then SMCRoute will operate on the IPv6 multicast routes. The output interfaces are not needed when removing routes using
the The intended purpose of
To emulate a multicast client using
The command is passed to the daemon that passes it to the kernel. The kernel then tries to join the multicast group GROUP on interface IFNAME by starting IGMP, or MLD for IPv6 group address, signaling on the given interface. This signaling may be received by routers/switches connected on that network supporting IGMP/MLD multicast signaling and, in turn, start forwarding the requested multicast stream eventually reach your desired interface. With this command CONFIGURATION FILEFrom version 1.98.0 smcroute supports reading and setting up multicast routes from a config file. The default location is /etc/smcroute.conf, but this can be overridden using the-f FILE command line option.
# # smcroute.conf example # # The configuration file supports joining multicast groups, to use # Layer-2 signaling so that switches and routers open up multicast # traffic to your interfaces. Leave is not supported, remove the # mgroup and SIGHUP your daemon, or send a specific leave command. # # NOTE: Use of mgroup should really not be needed! It is only available # to aid a user in figuring out problems in multicast forwarding. # Only 20 mgroup lines can be configured, this is a HARD kernel # maximum. If you need more, you probably need to find another # way of forwarding multicast to your router. # # Similarily supported is setting mroutes. Removing mroutes is not # supported, remove/comment out the mroute or send a remove command. # # Syntax: # phyint IFNAME <enable|disable> [ttl-threshold <1-255>] # mgroup from IFNAME group MCGROUP # mroute from IFNAME [source ADDRESS] group MCGROUP to IFNAME [IFNAME ...] # This example disables the creation of a multicast VIF for WiFi # interface wlan0. The kernel (at least Linux) sets the ALLMULTI # flag for all interfaces that have a VIF enabled. Hence, it can # cause quite a bit of unnecessary traffic to reach the CPU if too # many interfaces have a VIF (or MIF in IPv6 lingo). Only enable # interfaces required for inbound and outbound traffic. phyint wlan0 disable # The following example instructs the kernel to join the multicast # group 225.1.2.3 on interface eth0. Followed by setting up an # mroute of the same multicast stream, but from the explicit sender # 192.168.1.42 on the eth0 network and forward to eth1 and eth2. # mgroup from eth0 group 225.1.2.3 mroute from eth0 group 225.1.2.3 source 192.168.1.42 to eth1 eth2 # Here we allow routing of multicast to group 225.3.2.1 from ANY # source coming in from interface eth0 and forward to eth1 and eth2. # NOTE: Routing from ANY source is currently only available for IPv4 # multicast. mgroup from eth0 group 225.3.2.1 mroute from eth0 group 225.3.2.1 to eth1 eth2 Fairly simple. As usual, to identify the origin of the inbound multicast we need the IFNAME, the sender's IP address and, of course, the multicast group address, MCGROUP. The last argument is a list of outbound interfaces. From 1.99.0 the sender's IP address is actually optional for IPv4
multicast routes. If omitted it defaults to 0.0.0.0 (INADDR_ANY) and will
cause Following the standard UNIX tradition the file format support comments at the beginning of the line using a hash sign. It is untested to have comments at the end of a line, but should work. When starting up, the daemon by default lists the success of parsing each line and setting up a route. LIMITSThe current version compiles and runs fine on Linux kernel version 2.4, 2.6 and 3.0. Known limits:
SIGNALSsmcroute responds to the following signals:
For convenience in sending signals,
DEBUGGINGThe most common problem when attempting to route multicast is the TTL. Always start by verifying that the TTL of your multicast stream is not set to 1, because the router decrements the TTL of an IP frame before routing it. Test your setup using ping(8) or iperf(1). Either of which is capable of creating multicast traffic with an adjustable TTL. Iperf in particular is useful since it can act both as a multicast source (sender) and a multicast sink (receiver). For more advanced IP multicast testing the omping(8) tool can be used.FILES
SEE ALSOmrouted(8), pimd(8), omping(8), ping(8), iperf(1)BUGSThe English wording of this man page.AUTHORSOriginally written by Carsten Schill <carsten@cschill.de>. Support for IPv6 was added by Todd Hayton <todd.hayton@gmail.com>. Support for FreeBSD was added by Micha Lenk <micha@debian.org>.SMCRoute is maintained by Joachim Nilsson <troglobit@gmail.com>, Todd Hayton <todd.hayton@gmail.com>, Micha Lenk <micha@debian.org> and Julien BLACHE <jblache@debian.org> at https://github.com/troglobit/smcroute TIPSA lot of extra information is sent under the daemon facility and the debug priority to the syslog daemon.
Visit the GSP FreeBSD Man Page Interface. |