SMCRoute is a daemon and command line tool to manipulate the multicast routes of the Linux kernel. It can be used as an alternative to dynamic multicast routers like 'mrouted' in situations where (only) static multicast routes should be maintained and/or no proper IGMP signaling exists.
| Tags | Internet Networking |
|---|---|
| Licenses | Public Domain GPL |
| Operating Systems | POSIX Linux |
| Implementation | C |
Recent releases


Changes: The 'mroute: pending queue full, dropping entries' kernel message error has been fixed. For the power/alias users, the number of interfaces recognized by smcroute has been increased from 16 to 40.


Changes: This release has new options to join and leave multicast groups (IGMP). This allows smcroute to be the connecting link between static and dynamic multicast routing. Minor changes include improved error handling and documentation (man page).
- All comments
Recent commentsRe: bug report with multiple output interfaces (plus a workaround)
> SMCRoute works quite well for me and I
> highly recommend it! I have however
> discovered an apparent bug. I have sent
> it to the developer, but I am also
> posting it here because I have found a
> workaround which might be useful to
> other people.
>
> In a configuration with multiple output
> interfaces, the syntax for adding routes
> is given in the man page as:
>
> smcroute -a <InputIntf>
> <OriginIpAdr> <McGroupAdr>
> <OutputIntf> [<OutputIntf>]
> ...
>
> So to outut to two interfaces should
> simply be something like:
>
> smcroute -a eth0 192.168.70.4 225.1.1.1
> eth1 eth2
>
> Unfortunately, that doesnt work - the
> second output interface (eth2) seems to
> be completely ignored. Apparently,
> smcroute ignores _every other_ output
> interface. So to make this work, simply
> insert a dummy interface in the even
> position (ie, repeat the previous
> interface) and viola! It works! For
> example:
>
> smcroute -a eth0 192.168.70.4 225.1.1.1
> eth1 eth1 eth2
>
> should accomplish what was intended in
> the previous example.
It is a bug in the code, cmdpkt.c file. The function convCmdPkt2MRouteDesc() loop have a double count for advancing the argument.
for( ArgSt += strlen( ArgSt ) +1; *ArgSt; ArgSt += strlen( ArgSt ) +1 ) {
int VifIx;
if( (VifIx = getVifIxfromArg( ArgSt )) < 0 )
return "invalid output interface";
if( VifIx == MrDp->InVif )
log( LOG_WARNING, 0, "forwarding multicast to the input interface may not make sense: %s", ArgSt );
MrDp->TtlVc[ VifIx ] = 1; // !!! use a TTL threashold
ArgSt += strlen( ArgSt ) +1; // !!! should remove this line because the for loop() has it already.
}
After correcting the double count, it works fine for multiple output auguments.
SMC Route
Most of the time SMC route works fine but some time it does not enable multicast forwarding on the ethernet interfaces. I checked using the sysctl command and found that value of
net.ipv4.conf.eth2.mc_forwarding was 2. This value should have been 1.
Please help me if anybody have some idea.
Thanks
-Mayank
Two bugs.
Bug 1:
When more than 32 interfaces (VALN or virtual) leads to smcroute not going into daemon mode.
Bug 2:
On getting into daemon mode, smcroute adds all interfaces on the system to be part of multicast. This may not be so.
I have patched my copy of smcroute, and am in the process of testing the updates. Will release the patches soon to you.
Re: bug report with multiple output interfaces (plus a workaround)
Hi, i found another bug - smcroute seems only work well when the input interface is 1. If you specify the input interface be eth0 and output interface be eth1. You will get some problem (check ip_mr_cache).
Furthermore, i doubt whether the commands are valid:
./smcroute -a eth0 192.168.2.1 224.100.0.1 eth1
./smcroute -a eth1 192.168.2.1 224.100.0.1 eth2
Because after i have runned the second command, the first command will be lost!
Any solutions or opinions are welcomed.
> SMCRoute works quite well for me and I
> highly recommend it! I have however
> discovered an apparent bug. I have sent
> it to the developer, but I am also
> posting it here because I have found a
> workaround which might be useful to
> other people.
>
> In a configuration with multiple output
> interfaces, the syntax for adding routes
> is given in the man page as:
>
> smcroute -a <InputIntf>
> <OriginIpAdr> <McGroupAdr>
> <OutputIntf> [<OutputIntf>]
> ...
>
> So to outut to two interfaces should
> simply be something like:
>
> smcroute -a eth0 192.168.70.4 225.1.1.1
> eth1 eth2
>
> Unfortunately, that doesnt work - the
> second output interface (eth2) seems to
> be completely ignored. Apparently,
> smcroute ignores _every other_ output
> interface. So to make this work, simply
> insert a dummy interface in the even
> position (ie, repeat the previous
> interface) and viola! It works! For
> example:
>
> smcroute -a eth0 192.168.70.4 225.1.1.1
> eth1 eth1 eth2
>
> should accomplish what was intended in
> the previous example.
bug report with multiple output interfaces (plus a workaround)
SMCRoute works quite well for me and I highly recommend it! I have however discovered an apparent bug. I have sent it to the developer, but I am also posting it here because I have found a workaround which might be useful to other people.
In a configuration with multiple output interfaces, the syntax for adding routes is given in the man page as:
smcroute -a <InputIntf> <OriginIpAdr> <McGroupAdr> <OutputIntf> [<OutputIntf>] ...
So to outut to two interfaces should simply be something like:
smcroute -a eth0 192.168.70.4 225.1.1.1 eth1 eth2
Unfortunately, that doesnt work - the second output interface (eth2) seems to be completely ignored. Apparently, smcroute ignores _every other_ output interface. So to make this work, simply insert a dummy interface in the even position (ie, repeat the previous interface) and viola! It works! For example:
smcroute -a eth0 192.168.70.4 225.1.1.1 eth1 eth1 eth2
should accomplish what was intended in the previous example.