Daniel McAssey
Daniel McAssey

Reputation: 436

Receiving multicast on multiple machines with the same IP address

Building a bit of code that does auto configuration of IP addresses, when they start they all have the same IP, this software uses multicast to find the other devices on the network and uses that information to figure it's own IP configuration.

However if they have the same IP they stop receiving multicast packets, but if I force them to have different IPs multicast starts working again. Is multicast tied to IP address or can multiple devices with the same IP receive multicast.

We cannot use APIPA/Link-Local addressing.

Thanks, Dan

Upvotes: 0

Views: 1224

Answers (1)

Johannes Overmann
Johannes Overmann

Reputation: 5161

Multicast does not mean broadcast. Multicast means to send data only to devices which have previously requested this multicast group.

You cannot use multicast to reach any previously unconfigured machines. For this you have to, use broadcast (i.e. 255.255.255.255).

Multicast relies on the IGMP protocol, which in turn relies on a working IP unicast setup, which in turn requires that all devices can be uniquely identified by their IP addresses. IGMP messages contain the unicast IP address of the sending device.

In your setup all the nifty optimization algorithms in all the network components along the path (routers, switches, also the devices themselves) will fail since they cannot identify the targets which request the multicast group. They may fail in any random way. It is completely undefined how multiple devices with the same IP address behave.

In your case some network component decides that there is no need to distribute the multicast packets to the involved ports, as there is no unique receiver connected to the port. (I am just speculating here. Any other answer will be correct, too. Just an example to explain how this could behave the way you see it.)

Upvotes: 2

Related Questions