Skip to content
awein edited this page Aug 26, 2012 · 6 revisions

This page describes the DNS Update Request used to register services with a Sleep Proxy Server.

DNS Dynamic update request

The request consists of:

  • host info update records
  • multiple update records per service
  • an OPT record (EDNS0 option)

Update records

The described TTL values have been observed with two MacBook Pro's and may be different by using other devices.

Host info records

The following records are present once per ip (IPv4 + IPv6):

Record type Name Value TTL
PTR ReverseDNS IP Domain name: hostname.local 120
A / AAAA hostname.local Addr: IP 120
TXT hostname._device-info._tcp.local. model=device name 4500

Service records

The following records are present once per service:

Record type Name Value TTL
PTR _services._dns-sd._udp.local _service._protocol.local 4500
PTR _service._protocol.local hostname._service._protocol.local 4500
TXT hostname._service._protocol.local The services TXT-Values (separated by whitespace) 4500
SRV hostname._service._protocol.local priority: 0, weight: 0, port: the services port, target: hostname.local 120

OPT record

The OPT record contains two EDNS0 options:

EDNS option code Name Value Specification
2 DNS Update Lease 7200 http://files.dns-sd.org/draft-sekar-dns-ul.txt
4 EDNS Owner Option HW-Address http://tools.ietf.org/id/draft-cheshire-edns0-owner-option-00.txt

Dynamic update response

The reply code is set to 0 (no error). In addition the response contains an DNS Update Lease EDNS0 option which contains the actually granted lease time.

Resource Record TTL Values

Section 11 (Resource Record TTL Values and Cache Coherency) of draft-cheshire-dnsext-multicastdns tells us:

As a general rule, the recommended TTL value for Multicast DNS resource records with a host name as the resource record's name (e.g. A, AAAA, HINFO, etc.) or contained within the resource record's rdata (e.g. SRV, reverse mapping PTR record, etc.) is 120 seconds.

The recommended TTL value for other Multicast DNS resource records is 75 minutes.

A client with an active outstanding query will issue a query packet when one or more of the resource record(s) in its cache is (are) 80% of the way to expiry. If the TTL on those records is 75 minutes, this ongoing cache maintenance process yields a steady-state query rate of one query every 60 minutes.

Any distributed cache needs a cache coherency protocol. If Multicast DNS resource records follow the recommendation and have a TTL of 75 minutes, that means that stale data could persist in the system for a little over an hour. Making the default TTL significantly lower would reduce the lifetime of stale data, but would produce too much extra traffic on the network. Various techniques are available to minimize the impact of such stale data.

Lease Time

The EDNS0 DNS Update Lease draft section 5 (Update Message Format) tells us:

Update Requests contain, in the LEASE field of the OPT RDATA, a signed 32-bit integer indicating the lease life, in seconds, desired by the client. In Update Responses, this field contains the actual lease granted by the server. Note that the lease granted by the server may be less than, greater than, or equal to the value requested by the client. To reduce network and server load, a minimum lease of 30 minutes (1800 seconds) is RECOMMENDED. Note that leases are expected to be sufficiently long as to make timer discrepancies (due to transmission latency, etc.) between a client and server negligible. Clients that expect the updated records to be relatively static MAY request appropriately longer leases. Servers MAY grant relatively longer or shorter leases to reduce network traffic due to refreshes, or reduce stale data, respectively.

The Update Lease indicated in the OPT-RR applies to all resource records in the Update section.

Clone this wiki locally