Re: multicast: same port, different IP address?
From: Neil Horman
Date: Fri Apr 10 2009 - 06:46:19 EST
On Wed, Apr 08, 2009 at 11:42:58AM -0500, Matt Garman wrote:
> I don't really understand what the concept of a port is in Linux with
> regards to multicast.
Its excatly the same as with unicast IP address. The port lets multiple
applications use the same IP address for differing services. Its just the same
with multicast, except that multiple hosts may be listening.
> Basically, I want to use multicast on an internal network with many
> nodes. I want to use multicast IP addresses to delineate the message
> *type*. E.g., 126.96.36.199 for status monitoring, 188.8.131.52 for control
> messages, 184.108.40.206 for heartbeats, 220.127.116.11 for chatting, etc etc.
Thats fine if you want to do that, but its not required. You can do exactly the
same thing with one multicast ip address and 4 different port numbers.
> Since I'm using the address space to delineate messages, can I just
> hard-code my port (i.e. make it always the same)?
You can, its just not necessecary.
> Put another way: what is the effect of having one host subscribe to
> multiple multicast streams, where each stream has the same port, but a
> different ip address? Is there a performance impact?
Not really, its all pretty well just oganizational.
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html