Networking Forums

Networking Forums > Computer Networking > Linux Networking > Forwarding multicast packets in Linux, for different subnets.

Reply
Thread Tools Display Modes

Forwarding multicast packets in Linux, for different subnets.

 
 
smshahriar@gmail.com
Guest
Posts: n/a

 
      04-26-2005, 07:28 PM
Here is my setup:


Linux Box with two NICS
PC1 router NIC(eth0)---NIC(eth1) router
PC2
192.168.1.100 192.168.1.1 192.168.1.111 192.168.4.114 192.168.4.1
192.168.4.100


Linux Box:
---------
/proc/sys/net/ipv4/ip_forward


PC1
----
ping 192.168.4.1 - works
ping 224.0.0.1 - only get reply from 192.168.1.1 and 192.168.1.111


PC2
----
ping 192.168.4.1 - works
ping 224.0.0.1 - only get reply from 192.168.4.1 and 192.168.1.114


The Linux box does not seem to forward multicast packets. Can someone
shed any light on this?

Thanks,

 
Reply With Quote
 
 
 
 
prg
Guest
Posts: n/a

 
      04-26-2005, 08:43 PM

smshahr...@gmail.com wrote:
> Here is my setup:
>
>
> Linux Box with two NICS
> PC1 router NIC(eth0)---NIC(eth1) router
> PC2
> 192.168.1.100 192.168.1.1 192.168.1.111 192.168.4.114 192.168.4.1
> 192.168.4.100


No way to match IPs with boxes/nics with this ASCII art

> Linux Box:
> ---------
> /proc/sys/net/ipv4/ip_forward
>
>
> PC1
> ----
> ping 192.168.4.1 - works
> ping 224.0.0.1 - only get reply from 192.168.1.1 and 192.168.1.111
>
>
> PC2
> ----
> ping 192.168.4.1 - works
> ping 224.0.0.1 - only get reply from 192.168.4.1 and 192.168.1.114
>
>
> The Linux box does not seem to forward multicast packets. Can someone
> shed any light on this?


Multicast is not routed like other packets...

Newer distros/kernels enable multicast, afaik...

Drivers for nics enable multicast, afaik...

To "route/forward" multicast packets requires a multicast routing
daemon listening for requests to join a multicast group. No evidence
that you're running such a multicast routing protocol daemon.

Look through this dated/abstract howto for some background:
http://www.tldp.org/HOWTO/Multicast-HOWTO.html

Look for which routing daemon(s) comes with your distro (if any) and
read up on it. Decide which kind of routing you need,
install/configure the daemon, test it, then return with specific
questions -- I can bet my private parts that you will have some

Would help to know just what application(s) you have in mind for
running multicast. Just on the lan? MBone?

and good luck,
prg

 
Reply With Quote
 
smshahriar@gmail.com
Guest
Posts: n/a

 
      04-26-2005, 10:33 PM
Thank you very much prg. Really appreciate you help.

I am running Kernel version 2.4.19 and have enabled multicast
routing and also I have enabled PIMv1 and PIMv2.

I run all applications on LAN.

Do you have any recommended routing dameon? I just need
multicast pings to work

Thanks,

 
Reply With Quote
 
Michael E. Thomadakis
Guest
Posts: n/a

 
      04-27-2005, 12:58 AM
Check out the following:

mrouted: http://jukie.net/~bart/multicast/Lin...MiniHOWTO.html
zebra: http://www.zebra.org/

General encyclopedic resource on Internet:

http://www.cs.columbia.edu/~hgs/internet/

-MT

On Tue, 26 Apr 2005 (E-Mail Removed) wrote:

| Date: 26 Apr 2005 15:33:06 -0700
| From: (E-Mail Removed)
| Newsgroups: comp.os.linux.networking
| Subject: Re: Forwarding multicast packets in Linux, for different subnets.
|
| Thank you very much prg. Really appreciate you help.
|
| I am running Kernel version 2.4.19 and have enabled multicast
| routing and also I have enabled PIMv1 and PIMv2.
|
| I run all applications on LAN.
|
| Do you have any recommended routing dameon? I just need
| multicast pings to work
|
| Thanks,
|
|
 
Reply With Quote
 
Alexander Clouter
Guest
Posts: n/a

 
      04-28-2005, 04:34 PM
On 2005-04-26, (E-Mail Removed) <(E-Mail Removed)> 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,
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multicast between 2 subnets on a multihomed DC? Markus Frank Windows Networking 0 12-14-2005 09:41 AM
Why isn't my Linux box forwarding multicast packets? Wei Linux Networking 1 05-25-2005 08:15 PM
Forwarding of multicast packets between two subnets with two NICS - Does not work smshahriar@gmail.com Linux Networking 1 04-26-2005 10:54 AM
IPv6 linux multicast forwarding patch available Hoerdt Mickael Linux Networking 0 09-27-2004 09:26 PM
Re: Howto enable multicast forwarding on Linux Warren Linux Networking 0 04-01-2004 07:34 PM



1 2 3 4 5 6 7 8 9 10 11