Skip to content

Configuration Guide

Gareth Sylvester-Bradley edited this page Dec 20, 2018 · 9 revisions

As far as possible, the NMOS specifications make use of automated configuration techniques. Where additional configuration is required this will typically be carried out according to vendor-specific instructions (for example when configuring manual IP addressing). The following examples provide details for configuring aspects of systems which are agnostic to specific implementations.

DNS Server Configuration

Unicast DNS provides a more scalable discovery solution for APIs which make use of DNS-SD, as opposed to multicast DNS. Any standard DNS server will support the ability to advertise DNS-SD services. The following examples show how to configure some popular DNS servers to advertise an IS-04 Registration and Query API. Similar configuration can be applied to other server implementations.

Linux BIND

The following lines should be included in a Linux BIND DNS zone file.

; These lines indicate to clients that this server supports DNS Service Discovery
b._dns-sd._udp	IN	PTR	@
lb._dns-sd._udp	IN	PTR	@

; These lines indicate to clients which service types this server may advertise
_services._dns-sd._udp	PTR	_nmos-registration._tcp
_services._dns-sd._udp	PTR	_nmos-query._tcp

; These lines give the fully qualified DNS names to the IP addresses of the hosts which we'd like to discover
; This example uses a domain of 'dns.nmos.tv'. We recommend using a subdomain of a domain name which you own.
registration1.dns.nmos.tv.	IN	A	192.168.200.5
query1.dns.nmos.tv.	IN	A	192.168.200.6

; There should be one PTR record for each instance of the service you wish to advertise.
; Here we have one Registration API (_nmos-registration._tcp) and one Query API (_nmos-query._tcp)
_nmos-registration._tcp	PTR	reg-api-1._nmos-registration._tcp
_nmos-query._tcp	PTR	qry-api-1._nmos-query._tcp

; Next we have a SRV and a TXT record corresponding to each PTR above, first the Registration API
; The SRV links the PTR name to a resolvable DNS name (see the A records above) and identify the port which the API runs on
; The TXT records indicate additional metadata relevant to the IS-04 spec
reg-api-1._nmos-registration._tcp	SRV	0 0 80 registration1.dns.nmos.tv.
reg-api-1._nmos-registration._tcp	TXT	"api_ver=v1.0,v1.1,v1.2" "api_proto=http" "pri=0"

; Finally, the SRV and TXT for the Query API
qry-api-1._nmos-query._tcp	SRV	0 0 80 query1.dns.nmos.tv.
qry-api-1._nmos-query._tcp	TXT	"api_ver=v1.0,v1.1,v1.2" "api_proto=http" "pri=0"

Dnsmasq

The following lines should be added to the dnsmasq configuration file, e.g. /etc/dnsmasq.conf.

; These lines indicate to clients that this server supports DNS Service Discovery
; This example uses a domain of 'dns.nmos.tv'. We recommend using a subdomain of a domain name which you own.
ptr-record=b._dns-sd._udp.dns.nmos.tv,dns.nmos.tv ; domain enumeration
ptr-record=lb._dns-sd._udp.dns.nmos.tv,dns.nmos.tv ; legacy browse domain

; There should be one PTR record for each instance of the service you wish to advertise.
; Here we have one Registration API (_nmos-registration._tcp) and one Query API (_nmos-query._tcp)
ptr-record=_nmos-registration._tcp.dns.nmos.tv,reg-api-1._nmos-registration._tcp.dns.nmos.tv
ptr-record=_nmos-query._tcp.dns.nmos.tv,qry-api-1._nmos-query._tcp.dns.nmos.tv

; Next we have a SRV and a TXT record corresponding to each PTR above, first the Registration API
; The SRV links the PTR name to a resolvable DNS name (see hosts file below) and identify the port which the API runs on
; (priority and weight are optional and omitted here)
; The TXT records indicate additional metadata relevant to the IS-04 spec
srv-host=reg-api-1._nmos-registration._tcp.dns.nmos.tv,registration1.dns.nmos.tv,80
txt-record=reg-api-1._nmos-registration._tcp.dns.nmos.tv,"api_ver=v1.0,v1.1,v1.2","api_proto=http","pri=0"

; Finally, the SRV and TXT for the Query API
srv-host=qry-api-1._nmos-query._tcp.dns.nmos.tv,query1.dns.nmos.tv,80
txt-record=qry-api-1._nmos-query._tcp.dns.nmos.tv,"api_ver=v1.0,v1.1,v1.2","api_proto=http","pri=0"

The A records may be configured in the dnsmasq additional hosts file (specified by the -H,--addn-hosts=<file> option).

192.168.200.5	registration1.dns.nmos.tv.
192.168.200.6	query1.dns.nmos.tv.

The entries in the hosts file may omit the domain if two further lines are added to the configuration file:

expand-hosts
domain=dns.nmos.tv

Windows DNS

Using Windows DNS Manager, in addition to the Host (A) records, the appropriate PTR, SRV and TXT records can be created as follows.

For example, at the dns.nmos.tv zone, add the following records for the Registration API.

  1. Pointer (PTR)
    • Host IP address: _nmos-registration._tcp (yes, really; the user interface is confusing here, because DNS-SD isn't the most common use-case for a PTR record)
    • Fully qualified domain name (FQDN): (uneditable, but becomes) _nmos-registration._tcp.dns.nmos.tv
    • Host name: reg-api-1._nmos-registration._tcp.dns.nmos.tv
  2. Service Location (SRV)
    • Domain: dns.nmos.tv
    • Service: reg-api-1._nmos-registration
    • Protocol: _tcp
    • Port number: 80
    • Host offering this service: registration1.dns.nmos.tv
  3. Text (TXT)
    • Record name: reg-api-1._nmos-query._tcp
    • Fully qualified domain name (FQDN): reg-api-1._nmos-registration._tcp.dns.nmos.tv
    • Text:
      api_ver=v1.0,v1.1,v1.2
      api_proto=http
      pri=0
      

Then repeat for the Query API.

  1. Pointer (PTR)
    • Host IP address: _nmos-query._tcp
    • Fully qualified domain name (FQDN): (uneditable, but becomes) _nmos-query._tcp.dns.nmos.tv
    • Host name: qry-api-1._nmos-query._tcp.dns.nmos.tv
  2. Service Location (SRV)
    • Domain: dns.nmos.tv
    • Service: qry-api-1._nmos-query
    • Protocol: _tcp
    • Port number: 80
    • Host offering this service: query1.dns.nmos.tv
  3. Text (TXT)
    • Record name: qry-api-1._nmos-query._tcp
    • Fully qualified domain name (FQDN): qry-api-1._nmos-query._tcp.dns.nmos.tv
    • Text:
      api_ver=v1.0,v1.1,v1.2
      api_proto=http
      pri=0
      
Clone this wiki locally