Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multicast Router with Gentoo?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Thu Jul 07, 2005 7:39 pm    Post subject: Multicast Router with Gentoo? Reply with quote

Hello,

My ISP is broadcasting TV programs BBC and Discovery over their network with multicast. I'd like to be able to view these TV programs from my LAN clients.

The problem is now on how to make my Gentoo Linux router to work with multicast, and let my clients subscribe to the different channels and receive the multicast data.

I currently have a working linux router with NAT, etc, which I manage with iptables.

I can ping 224.0.0.1 from my LAN clients and my Gentoo box (192.168.0.1) will respond.

My LAN is like this:
LAN[192.168.0.x] <--> [192.168.0.1]-Gentoo-[83.227.154.117] <--> [83.227.154.65]-ISPs router

I get every few seconds a IGMPv2 "Membership Query" from my ISP. They also respond to ping 224.0.0.1 from my Gentoo box.

How should I setup with iptables, mrouted, or something similar to allow my LAN clients to receive the multicast data from the internet?
Back to top
View user's profile Send private message
egberts
Guru
Guru


Joined: 04 Nov 2003
Posts: 357
Location: Dimmed Cathode Ray Tube

PostPosted: Tue Jul 12, 2005 11:42 am    Post subject: emerge mrouted Reply with quote

What you've describe is a end-host multicasting functionality of joining/leaving a multicast group.

To do forwarding, what you appear to need is a multicasting router.

Check out 'emerge mrouted'
_________________
Clusters of Fry's Special, AMD 2200, 2 GB DDR, 220 GB (2008.1/desktop, stage 1, -O3) x8
HP Compaq Fry's SPecial, AMD 2100, 2 GB DDR, 260 GB (2008.0/server, stage 1, -O3)
Ultra Sparc 5, 256MB, 3GB (2006.1/server, stage 1, -O3)
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Tue Jul 12, 2005 12:17 pm    Post subject: Reply with quote

Yes, many seem to recommend mrouted. I have tried this program and have yet to get it to work. When running it in debug mode I see my LAN client wanting to join a group. Then I do not see anything more happening really other than membership querries etc. No data is being forwarded nor received from my ISP.

However, if I try to join the multicat group from my router itself, then I am receiving real data from my ISP. I have been unable to forward anything to my LAN clients, with and without mrouted. Has anyone actually used mrouted?

This is the info my ISP gave me regarding the multicc ast channels. If I use VLC - Video LAN Client - to receive the channel on the router itself it works sort of. It would receive video data but be unable to actually decode it. If I try the same from the LAN client nothing would be received.
Quote:
National Geo - Mcast adress: 239.1.1.101 - Server IP: 195.54.109.36 - Src
Port: 1026 - Dest Port: 32287

BBC World - Mcast adress: 239.1.1.102 - Server IP: 195.54.109.37 - Src
Port: 1026 - Dest Port: 17729

BBC Prime - Mcast adress: 239.1.1.103 - Server IP: 195.54.109.38 - Src
Port: 1026 - Dest Port: 31858

My mrouted.conf contain this:
Code:
phyint eth0 rate_limit 0
phyint eth1 rate_limit 0
Eth1 is my external interface (83.227.154.117) and eth0 my internal (192.168.0.1).
Back to top
View user's profile Send private message
egberts
Guru
Guru


Joined: 04 Nov 2003
Posts: 357
Location: Dimmed Cathode Ray Tube

PostPosted: Wed Jul 13, 2005 5:30 am    Post subject: mrouted is highly dependent on the Internet infrastructure Reply with quote

Sadly to say, mrouted works best if each and EVERY router in the hop is running an equivalent of an mrouted.

I know many brain-dead ISP don't bother with multicast. Sometime you can do a mtrace (traceroute equivalence of a multicast).

The tool is located at [url]sourceforge.net/projects/mtrace/[/url] (GENTOO should have this, but its not in the portage) to determine which multicast hop is broken.

Then, sadly again, lodging a complaint with the midhop backbone provider MAY or MAY NOT result in a suitable resolution.

For me, I always establish a multicast island of which I can join together using GRE tunneling protocol (not the best of both world).

Best wishes.
_________________
Clusters of Fry's Special, AMD 2200, 2 GB DDR, 220 GB (2008.1/desktop, stage 1, -O3) x8
HP Compaq Fry's SPecial, AMD 2100, 2 GB DDR, 260 GB (2008.0/server, stage 1, -O3)
Ultra Sparc 5, 256MB, 3GB (2006.1/server, stage 1, -O3)
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Wed Jul 13, 2005 9:53 am    Post subject: Reply with quote

Well. The multicast from my ISP does work. I do receive multicast querries over IGMP when I monitor with Ethereal. I can join the right multicast group with Video LAN Client on the Router.

The problem is to get mrouted, or something similar, to allow my LAN clients to join the multicast group and receive the traffic. As far as I have seen they cannot even join the group so the ISP starts sending me the video data. =(

Is there a way for me to debug or anything? I have run mrouted in the console with debug output but I am not sure exactly what to look for.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Wed Jul 13, 2005 10:10 am    Post subject: Reply with quote

You do understand that you need to be able to route the multicast packets through your NAT, yes ?

There may be one or more sysctl or kernel options you need to set or tweak.
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Wed Jul 13, 2005 10:17 am    Post subject: Reply with quote

adaptr wrote:
You do understand that you need to be able to route the multicast packets through your NAT, yes ?

There may be one or more sysctl or kernel options you need to set or tweak.
Yes you mean muticast forwarding in the kernel?

But this is also my question from the beginning. How would I do this? I have not been able to use iptables to route anything. My kernel has multicast routing enabled as far as I can see. My NICs has multicast enabled too.

Has anyone actually gotten multicast routing to work and not just some unicast tunneling between two hosts?
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Wed Jul 13, 2005 7:51 pm    Post subject: The problem Reply with quote

The problem as I see it is that the router does not proxy the multicast packets.

When I join a group from my LAN, the router would not join the group with the next router. So therefore I would not get any response. Here is some debug output.

Before joining a group from the LAN:
mrouted.cache
Code:
Multicast Routing Cache Table (0 entries)
 Origin             Mcast-group         CTmr     Age      Ptmr Rx IVif Forwvifs
<(prunesrc:vif[idx]/tmr) prunebitmap
>Source             Lifetime SavPkt         Pkts    Bytes RPFf


mrouted.dump
Code:
vifs_with_neighbors = 0

Virtual Interface Table
Vif  Name  Local-Address                               M  Thr  Rate   Flags
 0   eth0  192.168.0.1     subnet: 192.168.0/24        1   1      0   querier leaf
           group host (time left): 239.255.255.250 192.168.0.10    ( 0:03:42)
                                   224.0.0.4       192.168.0.1     ( 0:03:47)
                                   224.0.0.2       192.168.0.1     ( 0:03:45)
                     IGMP querier: 192.168.0.1        (this system)
                      Nbr bitmaps: 0x0000000000000000
                   pkts/bytes in : 0/0
                   pkts/bytes out: 0/0

 1   eth1  83.227.154.117  subnet: 83.227.154.64/26    1   1      0   leaf
           group host (time left): 224.0.0.2       83.227.154.117  ( 0:03:56)
                                   224.0.0.4       83.227.154.117  ( 0:03:51)
                     IGMP querier: 83.227.154.65      up  0:16:55 last heard  0:00:30 ago
                      Nbr bitmaps: 0x0000000000000000
                   pkts/bytes in : 0/0
                   pkts/bytes out: 0/0


Multicast Routing Table (2 entries)
 Origin-Subnet      From-Gateway    Metric Tmr Fl In-Vif  Out-Vifs
 83.227.154.64/26                      1    45 ..   1    0*
 192.168.0/24                          1    45 ..   0    1*

mrouted debug output
Code:
21:41:39.509 aging forwarding cache entries
21:41:39.509 sending query on vif 0
21:41:39.510 SENT membership query   from 192.168.0.1     to 224.0.0.1
21:41:39.510 update 0 starting at 2 of 2
21:41:39.510 RECV membership query   from 192.168.0.1     to 224.0.0.1
21:41:39.510 ignoring query from 192.168.0.1; querier on vif 0 is still me
21:41:40.509 update 0 starting at 2 of 2
21:41:41.509 update 0 starting at 2 of 2
21:41:42.510 update 0 starting at 2 of 2
21:41:42.534 RECV V2 member report   from 192.168.0.1     to 224.0.0.4
21:41:43.042 RECV V2 member report   from 192.168.0.10    to 239.255.255.250
21:41:43.042 update 0 starting at 2 of 2
21:41:43.318 RECV V2 member report   from 192.168.0.1     to 224.0.0.2
21:41:44.318 aging forwarding cache entries
21:41:44.318 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:41:44.318 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4
21:41:44.318 update 0 starting at 2 of 2
21:41:45.318 update 0 starting at 2 of 2
21:41:46.318 update 0 starting at 2 of 2
21:41:47.318 update 0 starting at 2 of 2
21:41:48.318 update 0 starting at 2 of 2
21:41:49.318 aging forwarding cache entries
21:41:49.318 update 0 starting at 2 of 2
21:41:49.653 RECV membership query   from 83.227.154.65   to 224.0.0.1
21:41:50.930 RECV V2 member report   from 83.227.154.117  to 224.0.0.4
21:41:53.930 aging forwarding cache entries
21:41:53.931 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:41:53.931 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4
21:41:57.219 RECV V2 member report   from 83.227.154.117  to 224.0.0.2


Debug output when a LAN client is trying to join a group:
Code:
21:44:23.966 RECV V2 member report   from 192.168.0.10    to 239.1.1.102
21:44:23.966 group 239.1.1.102 joined on vif 0
21:44:23.966 aging forwarding cache entries
21:44:23.966 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:44:23.966 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4
21:44:23.966 update 0 starting at 2 of 2
21:44:24.542 RECV V2 member report   from 192.168.0.10    to 239.1.1.102
21:44:25.540 update 0 starting at 2 of 2
21:44:25.542 RECV V2 member report   from 192.168.0.10    to 239.1.1.102
21:44:26.540 update 0 starting at 2 of 2
21:44:27.540 update 0 starting at 2 of 2
21:44:28.540 update 0 starting at 2 of 2
21:44:29.540 aging forwarding cache entries
21:44:29.540 update 0 starting at 2 of 2
21:44:30.540 update 0 starting at 2 of 2
21:44:31.540 update 0 starting at 2 of 2
21:44:32.540 update 0 starting at 2 of 2
21:44:33.540 update 0 starting at 2 of 2
21:44:34.540 aging forwarding cache entries
21:44:34.541 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:44:34.541 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4
21:44:34.541 update 0 starting at 2 of 2
21:44:35.540 update 0 starting at 2 of 2
21:44:36.540 update 0 starting at 2 of 2
21:44:37.540 update 0 starting at 2 of 2
21:44:38.545 update 0 starting at 2 of 2
21:44:39.545 aging forwarding cache entries
21:44:39.545 update 0 starting at 2 of 2
21:44:40.545 update 0 starting at 2 of 2
21:44:41.545 update 0 starting at 2 of 2
21:44:42.545 update 0 starting at 2 of 2
21:44:43.545 update 0 starting at 2 of 2
21:44:43.811 RECV leave message      from 192.168.0.10    to 224.0.0.2
21:44:43.811 [vif.c, _accept_leave_message] 0 0

21:44:43.812 SENT membership query   from 192.168.0.1     to 239.1.1.102
21:44:43.812 RECV membership query   from 192.168.0.1     to 239.1.1.102
21:44:43.812 ignoring query from 192.168.0.1; querier on vif 0 is still me
21:44:44.809 aging forwarding cache entries
21:44:44.809 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:44:44.809 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4
21:44:44.809 update 0 starting at 2 of 2
21:44:44.809 SENT membership query   from 192.168.0.1     to 239.1.1.102
21:44:44.810 RECV membership query   from 192.168.0.1     to 239.1.1.102
21:44:44.810 ignoring query from 192.168.0.1; querier on vif 0 is still me
21:44:45.809 update 0 starting at 2 of 2
21:44:46.809 group 239.1.1.102 left on vif 0
21:44:46.809 update 0 starting at 2 of 2
21:44:47.809 update 0 starting at 2 of 2


When joining the group from the router instead:
Code:
21:48:14.386 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:48:14.386 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4
21:48:18.438 RECV V2 member report   from 83.227.154.117  to 239.1.1.102
21:48:18.439 group 239.1.1.102 joined on vif 1
21:48:18.439 add cache entry (83.227.154.117 239.1.1.102) gm:0, parent-vif:1
21:48:18.474 add cache entry (195.54.109.37 239.1.1.102) gm:0, parent-vif:-1
21:48:18.862 RECV V2 member report   from 83.227.154.117  to 239.1.1.102
21:48:19.862 aging forwarding cache entries
21:48:19.862 update 0 starting at 2 of 2
21:48:20.862 update 0 starting at 2 of 2
21:48:21.863 update 0 starting at 2 of 2
21:48:22.863 update 0 starting at 2 of 2
21:48:23.599 RECV V2 member report   from 83.227.154.117  to 239.1.1.102
21:48:23.599 update 0 starting at 2 of 2
21:48:24.599 aging forwarding cache entries
21:48:24.599 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:48:24.599 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4

[...] (video data is received by the media player on the router. Then I click stop.)

21:48:54.657 SENT neighbor probe     from 192.168.0.1     to 224.0.0.4
21:48:54.657 SENT neighbor probe     from 83.227.154.117  to 224.0.0.4
21:48:55.140 RECV leave message      from 83.227.154.117  to 224.0.0.2
21:48:55.183 RECV membership query   from 83.227.154.65   to 239.1.1.102
21:48:55.183 Group-specific membership query for 239.1.1.102 from 83.227.154.65 on vif 1, timer 10
21:48:55.184 timer for grp 239.1.1.102 on vif 1 set to 2
21:48:56.053 RECV membership query   from 83.227.154.65   to 239.1.1.102
21:48:56.053 Group-specific membership query for 239.1.1.102 from 83.227.154.65 on vif 1, timer 10
21:48:57.053 group 239.1.1.102 left on vif 1
Back to top
View user's profile Send private message
agit8or
n00b
n00b


Joined: 24 Jul 2004
Posts: 3
Location: Sweden

PostPosted: Wed Jul 13, 2005 9:12 pm    Post subject: smcroute - multicast routing Reply with quote

Hi,

I managed to route multicast traffic from my ISP through my firewall/gateway using static routes and the smcroute daemon (don't know if this is in portage)

I assume your ISP is Bredbandsbolaget, right? They multicast these three channels in their net. Anyway, this is the way I once got it to work

Code:

# start daemon
bin/smcroute -d

# add routes for national geographic channel
bin/smcroute -a eth2 195.54.109.36 239.1.1.101 eth0

# join national geographic channel
# http://www.bredband.net/jsp/pctv/Channel/4b.asx
bin/smcroute -j eth2 239.1.1.101


Then just click the link on the ISP homepage (windows media player is unfortunately the only supported player as far as I know.) The IP addresses might have changed though so make sure they are correct. I sniffed up the source address of the stream using iptraf on the router.

Regards,
Tobias
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Wed Jul 13, 2005 9:26 pm    Post subject: Re: smcroute - multicast routing Reply with quote

agit8or wrote:
Hi,

I managed to route multicast traffic from my ISP through my firewall/gateway using static routes and the smcroute daemon (don't know if this is in portage)

I assume your ISP is Bredbandsbolaget, right? They multicast these three channels in their net. Anyway, this is the way I once got it to work

...

Regards,
Tobias

Thanks! It works! Truly amazing :) I have no idea why it wouldn't work with mrouted. In any case, it doesn't matter to much either =) I can make my own script to enable/disable too. And yes, I use Bredbandbolaget :)
Back to top
View user's profile Send private message
agit8or
n00b
n00b


Joined: 24 Jul 2004
Posts: 3
Location: Sweden

PostPosted: Wed Jul 13, 2005 9:46 pm    Post subject: Re: smcroute - multicast routing Reply with quote

Gatak wrote:

Thanks! It works! Truly amazing :) I have no idea why it wouldn't work with mrouted. In any case, it doesn't matter to much either =)


I know, been there too! It's such a simple thing to do so I don't see how things would go wrong with mrouted. Anyway, all we need now is a player that works in linux. Let me know if you find one.
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 174

PostPosted: Wed Jul 13, 2005 9:52 pm    Post subject: Re: smcroute - multicast routing Reply with quote

agit8or wrote:
Gatak wrote:

Thanks! It works! Truly amazing :) I have no idea why it wouldn't work with mrouted. In any case, it doesn't matter to much either =)


I know, been there too! It's such a simple thing to do so I don't see how things would go wrong with mrouted. Anyway, all we need now is a player that works in linux. Let me know if you find one.


What I find so difficult to understand is that there is absolutely no documentation, examples, anything on the net that describes people having problem with mrouted and so there are no solutions to find.

Yes I tried at first with VLC (www.videolan.org) and that didn't work. It doesn't have support for NSC files, nor for WMV9 which BBB is broadcasting with. Perhaps mplayer could work, though I haven't seen it to have multicast support.
Back to top
View user's profile Send private message
thepustule
Apprentice
Apprentice


Joined: 22 Feb 2004
Posts: 212
Location: Toronto, Canada

PostPosted: Thu May 04, 2006 4:52 am    Post subject: Reply with quote

I've been trying the same thing here with mrouted.

I have a Linux firewall router with 3 interfaces. One for the internet, one for wired lan, and the other for a "Wireless DMZ" where my access point sits.

I want to be able to multicast TV using VLC from a LAN client and pick it up on a wireless client.

Same trouble - no matter what I do, linux won't forward the packets.

Is there no one out there doing multicast?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum