DHCP Address discovery

Questions regarding the use of the UaExpert.

Moderator: uaexpert

Post Reply
cived
Jr. Member
Jr. Member
Posts: 1
Joined: 14 May 2020, 10:40

DHCP Address discovery

Post 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.

User avatar
Support Team
Hero Member
Hero Member
Posts: 2522
Joined: 18 Mar 2011, 15:09

Re: DHCP Address discovery

Post 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.
Best regards
Unified Automation Support Team

Post Reply