mrouted automatically configures itself to forward on all multicast-capable interfaces, i.e., interfaces that have the IFF_MULTICAST flag set (excluding the loopback "interface"), and it finds other
mrouted directly reachable via those interfaces. To override the default configuration, or to add tunnel links to other
mrouted configuration commands may be placed in
/etc/mrouted.conf (or an alternative file, specified by the
-c option). There are four types of configuration commands:
phyint <local-addr> [disable] [metric <m>]
[threshold <t>] [rate_limit <b>]
[boundary (<boundary-name>|<scoped-addr>/<mask-len>)]
[altnet <network>/<mask-len>]
tunnel <local-addr> <remote-addr> [metric <m>]
[threshold <t>] [rate_limit <b>]
[boundary (<boundary-name>|<scoped-addr>/<mask-len>)]
name <boundary-name> <scoped-addr>/<mask-len>
The file format is free-form; whitespace (including newlines) is not significant. The
boundary and
altnet options may be specified as many times as necessary.
The phyint command can be used to disable multicast routing on the physical interface identified by local IP address
<local-addr>, or to associate a non-default metric or threshold with the specified physical interface. The local IP address
<local-addr> may be replaced by the interface name (e.g., le0). If a phyint is attached to multiple IP subnets, describe each additional subnet with the altnet keyword. Phyint commands must precede tunnel commands.
The tunnel command can be used to establish a tunnel link between local IP address
<local-addr> and remote IP address
<remote-addr>, and to associate a non-default metric or threshold with that tunnel. The local IP address
<local-addr> may be replaced by the interface name (e.g., le0). The remote IP address
<remote-addr> may be replaced by a host name, if and only if the host name has a single IP address associated with it. The tunnel must be set up in the mrouted.conf files of both routers before it can be used.
The cache_lifetime is a value that determines the amount of time that a cached multicast route stays in kernel before timing out. The value of this entry should lie between 300 (5 min) and 86400 (1 day). It defaults to 300.
The
pruning option is provided for
mrouted to act as a non-pruning router. It is also possible to start
mrouted in a non-pruning mode using the
-p option on the command line. It is expected that a router would be configured in this manner for test purposes only. The default mode is pruning enabled.
You may assign names to boundaries to make configuration easier with the name keyword. The boundary option on phyint or tunnel commands can accept either a name or a boundary.
The metric is the "cost" associated with sending a datagram on the given interface or tunnel; it may be used to influence the choice of routes. The metric defaults to 1. Metrics should be kept as small as possible, because
mrouted cannot route along paths with a sum of metrics greater than 31.
The threshold is the minimum IP time-to-live required for a multicast datagram to be forwarded to the given interface or tunnel. It is used to control the scope of multicast datagrams. (The TTL of forwarded packets is only compared to the threshold, it is not decremented by the threshold. Every multicast router decrements the TTL by 1.) The default threshold is 1.
In general, all
mrouted connected to a particular subnet or tunnel should use the same metric and threshold for that subnet or tunnel.
The rate_limit option allows the network administrator to specify a certain bandwidth in Kbits/second which would be allocated to multicast traffic. It defaults to 500Kbps on tunnels, and 0 (unlimited) on physical interfaces.
The boundary option allows an interface to be configured as an administrative boundary for the specified scoped address. Packets belonging to this address will not be forwarded on a scoped interface. The boundary option accepts either a name or a boundary spec.
mrouted will not initiate execution if it has fewer than two enabled vifs, where a vif (virtual interface) is either a physical multicast-capable interface or a tunnel. It will log a warning if all of its vifs are tunnels; such an
mrouted configuration would be better replaced by more direct tunnels (i.e., eliminate the middle man).