Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Multicast routing question: (5 Items)
   
Multicast routing question  
Hi,

I have (what I believe to be) a routing question related to multicasting.

If I run my software on a QNX system that obtains it's IP address via DHCP multicasting works. However, if I run it on a
 QNX system that has a fixed IP address, it does not work.

I suspect this is because the system has no defined gateway. There effectively is no gateway in that configuratation as 
there are two computers on a subnet using fixed IP addresses.

The network configuration is pretty much the default except that I've assigned a static IP address.

What would I need to do to make this work?

Thanks in advance ....
RE: Multicast routing question  
Can you post the output from 

ifconfig
/sbin/route show 

for the two set ups?

	Thanks!
		Robert.

-----Original Message-----
From: Paul Kahn [mailto:community-noreply@qnx.com] 
Sent: Friday, January 16, 2009 1:08 PM
To: technology-networking
Subject: Multicast routing question

Hi,

I have (what I believe to be) a routing question related to
multicasting.

If I run my software on a QNX system that obtains it's IP address via
DHCP multicasting works. However, if I run it on a QNX system that has a
fixed IP address, it does not work.

I suspect this is because the system has no defined gateway. There
effectively is no gateway in that configuratation as there are two
computers on a subnet using fixed IP addresses.

The network configuration is pretty much the default except that I've
assigned a static IP address.

What would I need to do to make this work?

Thanks in advance ....

_______________________________________________
Technology
http://community.qnx.com/sf/go/post20238
Re: RE: Multicast routing question  
Sean/Robert, thanks both for your replies.

Here are the two tables:

1) DHCP (Windows DHCP server)

Internet:
Destination       Gateway            Flags
default           192.168.50.1       UG
localhost.localdo 127.0.0.1          UH
192.168.50.0      link#2             U
192.168.50.1      00:40:10:13:dd:f5  UH

2) Fixed IP Address

Routing tables

Internet:
Destination       Gateway            Flags
10.0.0.0          link#2             U
localhost.localdo 127.0.0.1          UH


I understand I can add a route in the fixed IP configuration. If I have a physical subnet with two computers that use 
fixed IP addresses; what do I set for the gateway? The stack appears to need one to register for mutlicast packets.

Thanks...
Re: RE: Multicast routing question  
On Fri, Jan 16, 2009 at 06:41:37PM -0500, Paul Kahn wrote:
> Sean/Robert, thanks both for your replies.
> 
> Here are the two tables:
> 
> 1) DHCP (Windows DHCP server)
> 
> Internet:
> Destination       Gateway            Flags
> default           192.168.50.1       UG
> localhost.localdo 127.0.0.1          UH
> 192.168.50.0      link#2             U
> 192.168.50.1      00:40:10:13:dd:f5  UH
> 
> 2) Fixed IP Address
> 
> Routing tables
> 
> Internet:
> Destination       Gateway            Flags
> 10.0.0.0          link#2             U
> localhost.localdo 127.0.0.1          UH
> 
> 
> I understand I can add a route in the fixed IP configuration. If I have a physical subnet with two computers that use 
fixed IP addresses; what do I set for the gateway? The stack appears to need one to register for mutlicast packets.
> 

When sending multicast packets the stack has to know
which iface to send it out.  You can use the IP_MULTICAST_IF
socket opt like:

{
	struct in_addr          addr;
	const char		*iface = "10.0.0.1"  /* address of your local iface */

	memset(&addr, 0, sizeof(addr));
	addr.s_addr = inet_addr(argv[1]);
	setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr));
}

Or add a route.  You can add one for the specific address
you're sending to, or a default:

# route add 225.0.0.40 10.0.0.2
or
# route add default 10.0.0.2

Where 10.0.0.2 is another machine on your 10.0.0.x subnet.

-seanb
Re: Multicast routing question  
On Fri, Jan 16, 2009 at 01:08:07PM -0500, Paul Kahn wrote:
> Hi,
> 
> I have (what I believe to be) a routing question related to multicasting.
> 
> If I run my software on a QNX system that obtains it's IP address via DHCP multicasting works. However, if I run it on
 a QNX system that has a fixed IP address, it does not work.
> 
> I suspect this is because the system has no defined gateway. There effectively is no gateway in that configuratation 
as there are two computers on a subnet using fixed IP addresses.
> 
> The network configuration is pretty much the default except that I've assigned a static IP address.
> 
> What would I need to do to make this work?
> 
> Thanks in advance ....

You do need a route to the multicast dst.  When in doubt add a
default route:

# route add default <dst>

-seanb