LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-11-2010, 02:12 AM   #1
Shyju N
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Rep: Reputation: 0
Enabling iptables to forward multicast or broadcast messages


Hi,

Can we enable IP tables to forward multicast or broadcast messages?

Our setup is as mentioned below

Machine A (end node, with Linux): 192.168.0.1
Machine B (end node, with Linux): 192.168.0.2
Machine C (IP forwarding, with Linux.
IP tables needs to be configured here.
This machine is connected to A and B on to separate Ethernet interfaces 1 and 2 respectively)

Interface 1: 192.168.0.3
Interface 2: 192.168.0.4

i.e. machine A and B are connected to each other via machine C.

I have a UDP application which will register all three machines to a multicast group (226.1.1.1), and UDP application on Machine A sends out a multicast message and UDP application on Machine B and C will be in a blocked recv() function. Since Machine A is connected to interface 1 of Machine C, the application in Machine C receives the packet, but the same is not forwarded to Machine B.

I have enabled IP Forwarding on Machine C by $ echo "1" > /proc/sys/net/ipv4/ip_forward and there are static routes to Machine A and B from C through interfaces 1 and 2.

Here is the IPTABLES log

$ iptables -A INPUT -m pkttype --pkt-type multicast -j LOG
$ dmesg -c

IN=eth0 OUT= MAC= SRC=192.168.0.1 DST=226.1.1.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2

IN=eth0 OUT= MAC= SRC=192.168.0.1 DST=226.1.1.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=0 DF PROTO=2


Thanks 'n regards
-Shyju N
 
Old 01-11-2010, 09:34 AM   #2
stani
LQ Newbie
 
Registered: Apr 2009
Posts: 11

Rep: Reputation: 0
In the given scenarion you have to route it to only one machine, but I suppose the real situation is not that simple. Which is a bit insane, and I'm afraid not possible straight with iptables only. For explanation why it is not possible: http://www.linuxquestions.org/questi...781/#post47886

But someone here http://forum.soft32.com/linux2/NAT-b...pict39725.html thinks there is a workaround, that is ugly according to me, yet it might work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
not able to recieve my own multicast message even after enabling loopback ik_nitk Programming 4 03-15-2006 06:01 AM
setting multicast broadcast address node047 Linux - Networking 0 04-05-2005 08:02 AM
eth0: UP BROADCAST MULTICAST but *not* RUNNING!... romasport Linux - Newbie 1 06-30-2004 12:48 PM
Up Broadcast Running Multicast code_noc Linux - General 2 10-16-2003 11:52 AM
Up Broadcast Notrailers Running Multicast snocked Linux - Networking 2 02-15-2003 11:27 PM


All times are GMT -5. The time now is 03:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration