An OPC UA Client wishing to connect to an OPC UA Server needs the address of the Server. UA Discovery defines the means to find OPC UA Servers, their supported protocols, security policies and other capabilities.
Discovery has to consider different configurations
- Client and Server on the same host
- on the same network or
- on completely different locations in a system (a plant, an enterprise).
Furthermore, Servers may be installed on different types of host devices like a sensor, a control device, or a workstation. A single device may host more than one Server.
Servers may have multiple endpoints if they support multiple addresses, protocols, or multiple levels of security. Clients can discover these endpoints and choose the proper one based on a system-wide policy or based on manual selection.
Note - Discovery is specified in OPC UA Part 12, the Discovery Services are specified in OPC UA Part 4
Required Discovery Capabilities
Clients may be pre-configured by some out-of-band mechanism. Without pre-configuration, Clients have to support the following discovery mechanisms:
- Allow manual entry of a DiscoveryUrl.
- Use FindServers Service to obtain the DiscoveryUrls of Servers on the local or a remote host.
- Use FindServersOnNetwork to obtain the DiscoveryUrls of Servers on the same multicast Subnet.
- Discover a Server's Endpoint using the Server's DiscoveryUrl.
All Servers have to support a discovery endpoint that provides Clients the following usages:
- Locate Servers on the local host (Local Discovery): Clients can detect and choose end points of OPC UA servers located on the local host.
- Locate Servers on a known remote host (Remote Discovery): This is for clients that know the name of the remote target host. Clients can use the host address to discover the Servers on this remote host.
Local Discovery Server
The OPC Foundation delivers a Local Discovery Server (LDS) which provides the necessary infrastructure to publicly expose multiple OPC UA Servers available on a given host system. It listens on the OPC UA port 4840. If only a single OPC UA Servers is installed on a host, an LDS is not needed and the OPC UA Server itself will listen on port 4840. The existence of an LDS is transparent for Clients that use the Discovery Services. They always connect to port 4840 and have to be prepared to find more than one Server on a single host.
Advanced Discovery Capabilities
Subnet discovery is based on the multicast DNS protocol that allows OPC UA Clients to find OPC UA Servers connected to the local subnet. The list of Servers can be filtered by capability acronyms.
- Automatic detection instead of querying each node on the network
- Filtering by capability to lookup the appropriate Servers.
- Requires that the network has multicasting enabled.
- The Local Discovery Server with multicast extension (LDS-ME) available from the OPC Foundation enables subnet discovery.
The Discovery Client Facet includes two alternative Conformance Units (CUs) for this capability:
Global discovery is useful for large systems with multiple servers on multiple subnets. It requirs an enterprise wide DiscoveryServer called a Global Discovery Server. The Global Discovery Server (GDS) is an OPC UA Server which provides the Methods to search for Servers in the enterprise.
All GDS implementations have to provide the standard global discovery information model. It is therefore transparent for Clients that support global discovery which commercial GDS is installed in a plant.
- Enables a Client to find OPC UA Servers within an enterprise.
- Clients can search with a capability filter to lookup the appropriate Servers.
- It will be common that a GDS also supplies global certificate and trust list management for the OPC UA application it manages.
- One or more Global Discovery servers can be used to maintain discovery information of installed OPC UA applications.
- Requires a commercial Global Discovery Server (GDS)
Clients shall support the Conformance Unit Discovery Client Find Servers in GDS that is part of the Discovery Client Facet.