There's (normally) also a "loopback" interface, so daemons usually just bind to the same port number, irrespective of the interface. This allows them to be accessed locally within the same machine, as well as remotely if/when the ethernet (or usb-eth or ppp or ...) interface(s) come alive. No fuss, simple to do.

Cheers