tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: IP Multicast



Neel Sheyal wrote:
Hi,

Hello,


    I have two netbsd hosts both with two NICs.

HOSTA: ex0: 192.168.21.2/24  and ex1: 172.16.18.2/16
HOSTB: ex0: 192.168.22.2/24  and ex1: 172.18.20.2/16

There is an application sending multicast traffic on hostA to
239.198.1.2. There is another application on hostB which is subsribing
to this group.

The application on hostA or hostB does not specific the outgoing
interface for sending traffic or joining. I have also not send the
routing table with the multicast group information.

I might be wrong but peeking into various manpages and specifically ip(4), you can find this :

[...]
For hosts with multiple interfaces, each multicast transmission is sent from the primary network interface. The IP_MULTICAST_IF option overrides the default for subsequent transmissions from a given socket:
[...]

and

[...]
A host must become a member of a multicast group before it can receive datagrams sent to the group. To join a multicast group, use the
IP_ADD_MEMBERSHIP option:
[...]

and

[...]
imr_interface should be INADDR_ANY to choose the default multicast interface, or the IP address of a particular multicast-capable interface if the host is multihomed. Membership is associated with a single interface; programs running on multihomed hosts may need to join the same group on more than one interface. Up to IP_MAX_MEMBERSHIPS (currently 20) memberships may be added on a single socket.
[...]


How does the OS know which interface to send the multicast traffic as in hostA?

How does the OS know which interface to subscribe to for receiving
multicast traffic as in hostB?

The program handling the multicast traffic (i.e. ospfd) need to make the socket join the group on specific interface(s), this is according to my understanding reading ip(4).

I have not tried it.

HTH,
Regards,
Eric.


Thanks,
~~Neel




Home | Main Index | Thread Index | Old Index