tech-net archive

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

Re: IP Multicast



    Date:        Fri, 19 Sep 2008 17:51:06 -0400
    From:        "Neel Sheyal" <neelsheyal%gmail.com@localhost>
    Message-ID:  
<6314c1430809191451k2b247e1cp2276c32eed42eaab%mail.gmail.com@localhost>

  | But is Solaris the multicast is implemented as follows:
  | "If the addressspecified is INADDR_ANY, it uses the unicast  routing
  | table to select the outgoing  interface  (which  is  the default
  | behavior)."

Sorry, I cannot even parse that - I have no idea what it is saying
(though there is probably more context that would help).   For example
which address specified?

For sure, if you bind the socket you're sending through to a local address
then you have chosen the outgoing interface (the one that has been assigned
the address) - unlike unicast, multicast has no other choice, it must send
through that interface to work.

But if the socket is bound to INADDR_ANY (which is approximately equal to 
saying not bound, though the port number might be, and probably is, set)
then the system should first pick the interface, and set the source address
to that of that interface.   How it could possibly use the unicast routing
table to assist with that I have no idea (after all if it is a "unicast"
routing table, it cannot, by definition, be using the trick described by
Greg Troxel as that was a multicast group id in the routing table.)
That is, unless it means that it looks up INNADDR_ANY in the routing table,
which might be an obscure way of saying it uses the unicast default route,
which of course also assumes that you have one of those.

  | Any idea about how the OS can figure out from the unicast routing
  | table (RT) if the RT does not contain information about the multicast
  | group?

Multicast group info in the routing table would really be a pretty silly
idea (other than used in a hack way as Greg described - that is implementing
the API "set this interface as the default transmit interface for multicast"
without having to add any new mechanism, just using the regular routing socket
or ioctls.)   Members of the multicast group might be everywhere.  Your
initial message described exactly one receiver, but imagine there was another
and the other was on the other interface compared with the first one.
Hosts only ever send multicast packets once, which interface would you pick
then?

You really do need both proper multicast routing (as hard as that might be
across a private/public address space boundary, though it is possible to NAT
multicast packets if you're very very careful and have only a single NAT,
redundancy will kill you with multicast and NAT), and your applications
really do need an interface selection method, and not to just rely upon some
notion of default - other than for hosts with only a single interface
multicast just doesn't work that way.

kre



Home | Main Index | Thread Index | Old Index