Re: Forwarding multicast packets in Linux, for different subnets.
From: Alexander Clouter (alex_at_digriz.junk-this.org.uk)
Date: 04/28/05
- Next message: Alexander Clouter: "Re: Remote acces to /dev/ttyS*"
- Previous message: thelinuxguy1997_at_yahoo.com: "netgear wgr614 v5: cannot connect to it"
- In reply to: smshahriar_at_gmail.com: "Forwarding multicast packets in Linux, for different subnets."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Apr 2005 16:34:03 -0000
On 2005-04-26, smshahriar@gmail.com <smshahriar@gmail.com> wrote:
> Here is my setup:
>
> [snipped]
>
> The Linux box does not seem to forward multicast packets. Can someone
> shed any light on this?
>
oh I fiddled with this for ages and only solved it last week for the purpose
of getting the multicasting of my DVB-T card working perfectly. After a
while I gave up on 'mrouted' as I did not need to have dynamic multicast
routing, I only plan on routing a single source (or rather few known sources)
and stumbled on my travels into 'smcroute'[1].
I think I worked out what my problem with 'mrouted' was, the details in
'ip_mr_vif' were wrong and the interface I wanted to route out on was not in
the 'available' list. Below I have show a 'working' setup:
---------
alex@guacamole:~$ cat /proc/net/ip_mr_vif
Interface BytesIn PktsIn BytesOut PktsOut Flags Local Remote
0 eth2 0 0 0 0 00000 5433860E 00000000
1 eth0 0 0 0 0 00000 0A8000FE 00000000
2 eth2 -1109020840 113793114 0 0 00000 5433860E 00000000
3 eth0 0 0 0 0 00000 0A8000FE 00000000
4 eth4 0 0 -1109020840 113793114 00000 0A800AFE 00000000
alex@guacamole:~$ cat /proc/net/ip_mr_cache
Group Origin Iif Pkts Bytes Wrong Oifs
E0000102 0A8000C0 2 113795120 -1106011840 0 4:1
---------
First time I noticed, heh, spot the 32 bit signed variables :)
Now to fix this I found bringing down all the interfaces and back up fixed
things. Then using smcroute I typed:
# /usr/local/sbin/smcroute -d
# /usr/local/sbin/smcroute -a eth2 10.128.0.192 224.0.1.2 eth4
The first line runs the daemon, the second line says "add a multicast source
from the interface 'eth2' where the source's unicast address is 10.128.0.192
and multicast address of the stream is 224.0.1.2 and then support routing
this out on 'eth4'". According to the manpage you simply append further
interfaces to the end of the line to route across more than one interface; I
only needed it over eth4.
Then to check:
-----
guacamole:/home/alex# ip mroute show
(10.128.0.192, 224.0.1.2) Iif: eth2 Oifs: eth4
-----
Iifs == inputs, Oifs == outputs. Then you should be cooking :)
I would go back to 'mrouted' now that I know about the interfaces were not
showing up in 'ip_mr_vif' originally (I had initially the same problem with
smcroute), but it is overkill for my needs.
None of this is well documented, I plan on making a howto at somestage, I
worked it out through the good old method of "if you hit it hard enough it
will go a long way". To make my life more difficult, eth4 is to a wifi point
and the gateway acts as an IPSec wifi access point. My firewall rules were
playing havoc and it takes a while to get used to writing 'multicast'
compatible firewall rules :) Even if the linux kernel supported it, you
cannot IPSec multicast packets, I could not IPSec my multicast traffic as the
CPU on my router is only a 50Mhz Sun Lunchbox RISC processor, the beauty will
only shift 200kB/s ESP traffic or 450kB/s AH; not enough for DVB-T :)
Good luck.
Cheers
Alex
[1] http://www.cschill.de/smcroute/
> Thanks,
>
- Next message: Alexander Clouter: "Re: Remote acces to /dev/ttyS*"
- Previous message: thelinuxguy1997_at_yahoo.com: "netgear wgr614 v5: cannot connect to it"
- In reply to: smshahriar_at_gmail.com: "Forwarding multicast packets in Linux, for different subnets."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|