-1

I have an OPC UA Server and an OPC Client running on the same computer communicating via TCP/IP. What's the pro and cons using 127.0.0.1 vs IP address of the network card?

Andis59
  • 101
  • 1

1 Answers1

0

This depends on how your application behaves, and whether it needs to communicate with any other services.

If it's only going to stay on that computer and doesn't need other services besides itself, use the loopback interface. Using the NIC IP address Is only useful if you need this server to listen on your LAN for the benefit of other clients or servers.

Additionally, your NIC's IP address can be subject to change, have a cable unplugged, or have a DNS / DHCP server fail. Local loopback isn't prone to any of that.

HOWEVER, OPC has distributed capabilities that would benefit from listening on a local network for immediate expandability.

Spooler
  • 7,046
  • 18
  • 29
  • In this case the communication is only within the computer. But is this should change I can just configure a new IP. – Andis59 Oct 17 '16 at 15:46
  • (who have made such a crazy interface that you can't make a new line) Thank you very much. I can't set this as the answer yet since I don't have enough points... – Andis59 Oct 17 '16 at 15:47