I have a stack of WCF services installed on a Windows 2008 R2 Standard virtual server. Many of the endpoints are bound to local host see example below:
endpoint address=”net.tcp://localhost:8738/Services/Service”
This works at the moment as only as single local IP (192.168.20.10) is bound to the NIC.
If I add another local IP address (192.168.20.11):
1) does localhost reference mean the service port is published on both IP addresses ?
2) if not how does the OS decide which IP ?
Thank you
Scott
localhostrefers to the loopback addressIPv4: 127.0.0.1orIPv6 ::1.When a service is bound to a loopback address, it’s only available to that host. One use case is for webservice components which are only exposed by the HTTP daemon by proxy. Adding IP addresses to an interface will make no difference to services bound to
localhost.When a service is intended to be made available to the network the binding is usually
*:portnumber. This will listen on all IP addresses, so that adding another IP to the interface will result in the service being available on the new IP address too.