smcroute.conf example

```conf #

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 the mgroup command should be avoided if possible.

Instead configure “router ports” or similar on the switches

or bridges on your LAN. This to have them direct all the

multicast to your router, or select groups if they have

such capabilities. Usually MAC multicast filters exist.


Some switch manufacturers support mrdisc, RFC4286, which

SMCRoute can use to advertise itself on source interfaces.


The UNIX kernel usually limits the number of multicast groups

a socket/client can join. In Linux, 20 mgroup lines can be

configured by default, but this can be changed with sysctl:


sysctl -w net.ipv4.igmp_max_memberships=30


Similarly supported is setting mroutes. Removing mroutes is not

supported, remove/comment out the mroute from the .conf file, or

send a remove command with smcroutectl.



phyint IFNAME [mrdisc] [ttl-threshold <1-255>]

mgroup from IFNAME [source ADDRESS] group MCGROUP

mroute from IFNAME [source ADDRESS] group MCGROUP[/LEN] 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

phyint eth0 enable ttl-threshold 11 phyint eth1 enable ttl-threshold 3 phyint eth2 enable ttl-threshold 5 phyint virbr0 enable ttl-threshold 5

The following example instructs the kernel to join the multicast

group on interface eth0. Followed by setting up an

mroute of the same multicast stream, but from the explicit sender on the eth0 network and forward to eth1 and eth2.

# mgroup from eth0 group mroute from eth0 source group to eth1 eth2

Similar example, but using source-specific group join

mgroup from virbr0 source group mroute from virbr0 source group to eth0

Here we allow routing of multicast to group 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


mgroup from eth0 group mroute from eth0 group to eth1 eth2

The previous is an example of the (*,G) support. Such rules cause

SMCRoute to dynamically add multicast routes to the kernel when the

first frame of a stream reaches the router. It is also possible to

specify a range of such rules, again, note that this currently only

works for IPv4. Also, it is not possible to set a range of groups

to join atm.

mroute from eth0 group to eth1 eth2