Home Comments

Ice 3 and the new behaviour with -h 0.0.0.0

mariomario Member
Hi,

I'd like to start a discussion here about a change in Ice 3.0.0, the one described like this in the changelog:
Ice will now listen on all local interfaces if no -h parameter is present in the endpoint configuration and no default host has been set. It will also listen to all interfaces if the -h parameter is set to 0.0.0.0. In such configurations the endpoints published in proxies will not contain the loopback interface (127.0.0.1) unless it is the only local interface present.

I think that this behaviour have one big problem: the impossibility to bind the listening socket to the `special' 0.0.0.0 ip address.

Configuring a listening socket to 0.0.0.0 have the following advantages (always from a Windows point of view):
  • If Media Sense is activated (by default) and you don't have the network cable plugged, all the public ip addresses are deactivated. If the server is started at this moment, only 127.0.0.1 is configured to listen. Then, when the cable is reconnected, the ip addresses are up again but only a restart of the server can make it listen to the public ip addresses.
  • A analogous case is when a computer connects to the Internet with a dial-up connection or similar and the ip address is dynamically assigned. The Ice server can't be started until that dynamic ip is known, never before.

One solution that I suggest is to have the two possibilities. When configuring the endpoint host parameter (-h) with:
  • -h 0.0.0.0: Listen only to the `special' 0.0.0.0 ip address.
  • -h *: Listen to all interfaces (the new behaviour).

What do you think about this? It sounds reasonable? :)

Regards,

Mario

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    The problem with INADDR_ANY is, what interfaces should the server publish in proxies? For example, if you create an object adapter that listens to INADDR_ANY, and you call createProxy() on this object adapter, what endpoints should it contain?
  • mariomario Member
    Hi Marc, thanks for your quick reply.

    Obviously, in this case the responsability is in the application side. Published endpoints should be configured manually, Ice can't make magic for us :)

    But I think that this is a little price to pay, for having the possibility of listen with INADDR_ANY.

    Another concrete and real case about that topic, is when a Windows laptop is started without network connectivity (cable unppluged) and has a statically configured ip address. You can start the Ice server configuring published endpoints with this ip address and public endpoint with 0.0.0.0. When the laptop is connected to the network this Ice server can be remotly contacted instantly without restarting the process.

    Regards,

    Mario
Sign In or Register to comment.