2004-04-19 15:37:44

by John Pesce

[permalink] [raw]
Subject: How to make Linux route multicast traffic bi-directionly between multible subnets

I'm using kernel 2.4.20-8.

I have a Linux box multi-homed on three subnets using three NICs in
order to route TCP and UDP traffic between them.

I would like to also like route specific multicast group traffic between
them. I've read the multicast-howto and crawled the popular search
engines but I can not find any documentation to do it.
I have three NICs on subnets A,B and C.
Any multicast traffic arriving from any one of them needs to be
forwarded to the other two so the clients can received it.

The only thing I have been able to do is set a default multicast route
to subnet A. This forwards traffic incoming from B and C to A, but what
about the other ways?

Some pages refer to something called mrouted but it is all dated like
1996. Did multicast routing die off into the realm of hardware routers
??

I see on bootup a kernel message about 0.96 PIM-SM. Can I somehow use
that?

Please help.

I'm not on the mailing list so please CC me personally.

Thank you,
John


2004-04-19 20:07:28

by Jose Luis Domingo Lopez

[permalink] [raw]
Subject: Re: How to make Linux route multicast traffic bi-directionly between multible subnets

On Monday, 19 April 2004, at 11:37:39 -0400,
John Pesce wrote:

> The only thing I have been able to do is set a default multicast route
> to subnet A. This forwards traffic incoming from B and C to A, but what
> about the other ways?
>
With that default route for multicast traffic the only thing you do is
route through some interface the multicast traffic for which there are
no more specific routes.

Multicast routing is in some ways different from unicast routing: with
multicast you must be able to send several copies on the original
incoming packet through one or more outgoing interfaces, namely those
that lead to hosts and networks somewhat "subscribed" to a multicast
group (the destination multicast IP in the IP packet).

As far as I know, there is no userspace tool (not saying that you can't
write one :) to insert multicast routes directly in the kernel routing
table (at least, I was not able to do anything with "ip").

> I see on bootup a kernel message about 0.96 PIM-SM. Can I somehow use
> that?
>
The only way I know to make a Linux box route multicast traffic "as
expected" is to configure a multicast routing daemon like "mrouted". It
should listen on all interfaces declared as multicast, see IGMP packets
coming from hosts interested in some multicast groups (interested in
receiving traffic to some multicast IP addresses) and route incoming
multicast packets accordingly (sending several copies of the same packet
through all needed interfaces).

The message you see in the kernel boot log refers to one of the
protocols used for dynamic multicast routing, namely PIM-SM (Protocol
Independent Multicast, Sparse Mode). This protocol is implemented by
"mrouted", but seems to need some specific support from kernel space to
work properly (other dynamic multicast routing protocols implemented by
"mrouted" don't seem to show this requirment).

So, to summarize, your best bet is to get "mrouted" or something like
that, and have a look at the documentation bundled. You are quite right,
multicast routing documentation for Linux seems to be quite old, rather
short, and maybe out of date.

Greetings.

--
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Sid (Linux 2.6.5)

2004-04-19 20:15:39

by Kevin P. Fleming

[permalink] [raw]
Subject: Re: How to make Linux route multicast traffic bi-directionly between multible subnets

Jose Luis Domingo Lopez wrote:

> So, to summarize, your best bet is to get "mrouted" or something like
> that, and have a look at the documentation bundled. You are quite right,
> multicast routing documentation for Linux seems to be quite old, rather
> short, and maybe out of date.

That it is, but if you use the mrouted source and patches from the
Debian distribution it's fairly easy to get a basic network working. It
took me a few days to get it all set up, but I now have a router that
routes multicast between local devices and two remotes over OpenVPN
tunnels. Setting up mrouted was actually pretty easy, once I figured out
that's what I needed and got the Debian patches so it would compile.

2004-04-19 21:34:11

by John Pesce

[permalink] [raw]
Subject: Re: How to make Linux route multicast traffic bi-directionly between multible subnets


On Mon, 2004-04-19 at 16:15, Kevin P. Fleming wrote:
> Jose Luis Domingo Lopez wrote:
>
> > So, to summarize, your best bet is to get "mrouted" or something like
> > that, and have a look at the documentation bundled. You are quite right,
> > multicast routing documentation for Linux seems to be quite old, rather
> > short, and maybe out of date.
>
> That it is, but if you use the mrouted source and patches from the
> Debian distribution it's fairly easy to get a basic network working. It
> took me a few days to get it all set up, but I now have a router that
> routes multicast between local devices and two remotes over OpenVPN
> tunnels. Setting up mrouted was actually pretty easy, once I figured out
> that's what I needed and got the Debian patches so it would compile.

Currently we are running Redhat 9.0 and Suse 9.0 boxes with plans to
possibly move to Suse 9.1 boxes when the Suse 9.1 comes out with 2.6
kernel support.

I've seen several sites claiming to provide the elusive "mrouted".

Can you point me to a specific location for "the" mrouted demon you are
referring to ;)

Have you played with xorp.org? It claims to be a multicast capable
router?

Thanks.

2004-04-19 22:16:00

by Jose Luis Domingo Lopez

[permalink] [raw]
Subject: Re: How to make Linux route multicast traffic bi-directionly between multible subnets

On Monday, 19 April 2004, at 17:34:01 -0400,
John Pesce wrote:

> Can you point me to a specific location for "the" mrouted demon you are
> referring to ;)
>
Maybe is not the same as I used, but Debian's SID "mrouted" package
work by default, at least it runs ok and boots, and learns some routes.
Take into account that my setup consisted of a real ethernet interface
(eth0) and a couple of dummy interfaces (dummy0, dummy1). No real-world
configuration, but the daemon seems to work fine, and comes already
compiled and runs with no changes over 2.6.x kernels.

Greetings.

--
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Sid (Linux 2.6.5)