IceDiscovery on localhost

HurlymurphyHurlymurphy Aldo PlatzOrganization: Schindler Elevator Project: TestToolsMember

We use IceDiscovery in our multi-process application. All our processes run on the same machine. This means that the communication only takes place via the loopback address.
We have seen that IceDiscovery sends the multicast messages throughout the local network. This creates unnecessary traffic on the network.
Is it possible to limit IceDiscovery to localhost?

Tagged:

Comments

  • benoitbenoit Rennes, FranceBenoit FoucherOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff

    Hi,

    That's a good question. Which operating system do you use?

    On macOS and Windows, one option is to set IceDiscovery.Interface=127.0.0.1 to limit the multicast traffic to the loopback interface. This doesn't work on Linux however.

    If your operating system supports IPv6, another option is to use a localhost-scoped IPv6 multicast address. For example, you could set IceDiscovery.Address=ff01::1 and Ice.PreferIPv6Address=1 to get IceDiscovery to use such an IPv6 address.

    Finally, another option could be to set the UDP TTL option to 0 to restrict the outgoing UDP traffic to the local host. Assuming you're using the default IceDiscovery IPv4 multicast address and port, you can try setting the property IceDiscovery.Lookup=udp -h 239.255.0.1 -p 4061 --ttl 0 to ensure that IceDiscovery multicast lookup requests don't cross the local host boundary.

    Let us know how it goes!

    Cheers,
    Benoit.

Sign In or Register to comment.