Multicast Group Members on Different Port Numbers – Is It Possible?

multicastudp

Let's say I have a multicast group 239.0.0.1.

If A and B are members of this group and listening on port 6000, I can send data to (239.0.0.1, 6000) and both A and B will receive.
Now, if A is listening on port 6000 and B on port 7000, how to send data to both the members in a single transmission ?

If the above scenario is not possible, then does it mean that a multicast group is not just identified by its multicast group address but by the 2-tuple multicast group address and port number ? I could not find such definition for a multicast group anywhere.

Best Answer

Subscribing to a multicast group and listening on a multicast address and port are two different things. If you are subscribed to a multicast group all traffic with that destination address should be sent to your host. It is another step to listen on a specific port and process that traffic.

In your example, traffic with destination 239.0.0.1:6000 would be sent to both hosts but since only host A has an application that is listening, only host A will do anything with that traffic.

It is not possible to send to all port numbers or send to the * port. No such concept exists in TCP/UDP. If you were using a different protocol, maybe there is something like that.

Related Topic