Page 1 of 1

DHCP Address discovery

Posted: 14 May 2020, 10:50
by cived
Hello,

It is more of a feature or a bug. Currently, when specifying the IP address of the discovery server UaExpert finds the server. However, when afterwards trying to connect the error as follows occur:

Code: Select all

[uastack] OpcUa_P_RawSocket_InetAddr: Unexpected error in getaddrinfo: 11
[uastack] OpcUa_P_ParseUrl: OpcUa_P_RawSocket_InetAddr reports error 0x80000000.
Could not connect to server: Bad
It is due to the DHCP server, which responded to initial Discovery with the assigned name, and it is used to connect to, for example:

Code: Select all

Adding Url opc.tcp://arm:8888
It replaced the IP address to arm; but the local PC does not know who is arm as it is gained from the DHCP of embedded device.

The workaround to this problem is to go into Server's properties, and replace "arm" with the actual IP address.
It then connects fine and discovers all the nodes finely.

The question/topic is if that behavior of changing the IP address of the server with the response of the DHCP server is desirable.

Re: DHCP Address discovery

Posted: 19 May 2020, 21:19
by Support Team
Hello,

generally OPC UA technology requires a proper network infrastructure. Besides other things this includes a proper DNS. If your network can not provide hostname resolution you must use IP instead. However, because information in certificates is validated, you must make sure that domain matches IPs.