## C.1 DNS Server (SRV) Record Syntax

Annex Cdescribes the OPC UA specific requirements which are above and beyond the more general requirements of the mDNS specification.

mDNS uses DNS SRV records to advertise the services (a.k.a. the DiscoveryUrls for the Servers) available on the network.

An SRV record has the form:

_service._proto.name TTL class SRV priority weight port target


service: the symbolic name of the desired service. For OPC UA this field shall be one of service names for OPC UA which are defined in Table 68.

Table 68 – Allowed mDNS Service Names

Service Name Description
_opcua-tcp The DiscoveryUrl supports the OPC UA TCP mapping (see OPC 10000-6).
This name is assigned by IANA.
_opcua-tls The DiscoveryUrl supports the OPC UA WebSockets mapping (see OPC 10000-6).
Note that WebSockets mapping supports multiple encodings. If a Client supports more than one encoding it should attempt to use the alternate encodings if an error occurs during connect.
This name is assigned by IANA.

proto: the transport protocol of the desired service; For OPC UA this field shall be ‘_tcp’.

The other fields have no OPC UA specific requirements.

An example SRV record in textual form that might be found in a [zone file](http://en.wikipedia.org/wiki/Zone_file” \o “Zone file) might be the following:

_opcua-tcp._tcp.example.com. 86400 IN SRV 0 5 4840 uaserver.example.com.


This points to a server named uaserver.example.com listening on TCP port 4840 for OPC UA TCP requests. The priority given here is 0, and the weight is 5 (the priority and weights are not important for OPC UA). The mDNS specification describes the rest of the fields in detail.