Internet Engineering Task Force S. Cheshire Internet-Draft Apple Inc. Intended status: Standards TrackFebruary 4,October 31, 2016 Expires:August 7, 2016May 4, 2017 Hybrid Unicast/Multicast DNS-Based Service Discoverydraft-ietf-dnssd-hybrid-03draft-ietf-dnssd-hybrid-04 Abstract Performing DNS-Based Service Discovery using purely link-local Multicast DNS enables discovery of services that are on the local link, but not (without some kind of proxy or similar special support) discovery of services that are outside the local link. Using a very large local link with thousands of hosts facilitates service discovery, but at the cost of large amounts of multicast traffic. Performing DNS-Based Service Discovery using purely Unicast DNS is more efficient and doesn't require excessively large multicast domains, but requires that the relevant data be available in the Unicast DNS namespace. This can be achieved by manual DNS configuration (as has been done for many years at IETF meetings to advertise the IETF Terminal Room printer) but this is labor intensive, error prone, and requires a reasonable degree of DNS expertise. The Unicast DNS namespace can be populated with the required data automatically by the devices themselves, but that requires configuration of DNS Update keys on the devices offering the services, which has proven onerous and impractical for simple devices like printers and network cameras. Hence, to facilitate efficient and reliable DNS-Based Service Discovery, a compromise is needed that combines the ease-of-use of Multicast DNS with the efficiency and scalability of Unicast DNS. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onAugust 7, 2016.May 4, 2017. Copyright Notice Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Conventions and Terminology Used in this Document . . . . . . 5 3. Compatibility Considerations . . . . . . . . . . . . . . . . .56 4. Hybrid Proxy Operation . . . . . . . . . . . . . . . . . . . . 6 4.1. Delegated Subdomain for Service Discovery Records . . . . 7 4.2. Domain Enumeration . . . . . . . . . . . . . . . . . . . . 8 4.2.1. Domain Enumeration via Unicast Queries . . . . . . . . 8 4.2.2. Domain Enumeration via Multicast Queries . . . . . . . 9 4.3. Delegated Subdomain for LDH Host Names . . . . . . . . . . 10 4.4. Delegated Subdomain for Reverse Mapping . . . . . . . . . 12 4.5. Data Translation . . . . . . . . . . . . . . . . . . . . . 13 4.5.1. DNS TTL limiting . . . . . . . . . . . . . . . . . . . 13 4.5.2. Suppressing Unusable Records . . . . . . . . . . . . . 14 4.5.3. Text Encoding Translation . . . . . . . . . . . . . . 14 4.5.4. Application-Specific Data Translation . . . . . . . . 15 4.6. Answer Aggregation . . . . . . . . . . . . . . . . . . . . 164.6.1. Discovery of LLQ and/or PUSH Notification Service . . 195. DNS SOA (Start of Authority) Record . . . . . . . . . . . . .2019 6.Implementation StatusDNSSEC Issues . . . . . . . . . . . . . . . . . . . . . . . . 20 6.1. On-line signing only . . . . . . . . . . . . . . . . . . . 20 6.2. NSEC and NSEC3 Records . . . . . . . . . . . . . . . . . . 20 7. Implementation Status . . . . . . . . . . . . . . . . . . . . 21 7.1. Already Implemented and Deployed . . . . . . . . . . . . .20 6.2.21 7.2. Already Implemented . . . . . . . . . . . . . . . . . . . 216.3.7.3. Partially Implemented . . . . . . . . . . . . . . . . . . 216.4.7.4. Not Yet Implemented . . . . . . . . . . . . . . . . . . .21 7.22 8. IPv6 Considerations . . . . . . . . . . . . . . . . . . . . . 228.9. Security Considerations . . . . . . . . . . . . . . . . . . .22 8.1.23 9.1. Authenticity . . . . . . . . . . . . . . . . . . . . . . .22 8.2.23 9.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . . .22 8.3.23 9.3. Denial of Service . . . . . . . . . . . . . . . . . . . . 239.10. Intelectual Property Rights . . . . . . . . . . . . . . . . .23 10.24 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . .23 11.24 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .23 12.24 13. References . . . . . . . . . . . . . . . . . . . . . . . . . .23 12.1.24 13.1. Normative References . . . . . . . . . . . . . . . . . . .23 12.2.24 13.2. Informative References . . . . . . . . . . . . . . . . . .2425 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . .2526 1. Introduction Multicast DNS [RFC6762] and its companion technology DNS-based Service Discovery [RFC6763] were created to provide IP networking with the ease-of-use and autoconfiguration for which AppleTalk was well known [RFC6760] [ZC]. For a small network consisting of just a single link (or several physical links bridged together to appear as a single logical link to IP) Multicast DNS [RFC6762] is sufficient for client devices to look up the dot-local host names of peers on the same home network, and perform DNS-Based Service Discovery (DNS-SD) [RFC6763] of services offered on that home network. For a larger network consisting of multiple links that are interconnected using IP-layer routing instead of link-layer bridging, link-local Multicast DNS alone is insufficient because link-local Multicast DNS packets, by design, do not cross between links. (This was a deliberate design choice for Multicast DNS, since even on a single link multicast traffic is expensive -- especially on Wi-Fi links -- and multiplying the amount of multicast traffic by flooding it across multiple links would make that problem even worse.) In this environment, Unicast DNS would be preferable to Multicast DNS. (Unicast DNS can be used either with a traditionally assigned globally unique domain name, or with a private local unicast domain name such as ".home" [HOME].) To use Unicast DNS, the names of hosts and services need to be made available in the Unicast DNS namespace. In the DNS-SD specification [RFC6763] Section 10 ("Populating the DNS with Information") discusses various possible ways that a service's PTR, SRV, TXT and address records can make their way into the Unicast DNS namespace, including manual zone file configuration [RFC1034] [RFC1035], DNS Update [RFC2136] [RFC3007] and proxies of various kinds. This document specifies a type of proxy called a Hybrid Proxy that uses Multicast DNS [RFC6762] to discover Multicast DNS records on its local link, and makes corresponding DNS records visible in the Unicast DNS namespace.2. Conventions and Terminology Used in this Document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in "Key wordsIn simple terms, a descriptive DNS name is chosen foruseeach physical link inRFCsan organization. Using a DNS NS record, responsibility for that DNS name is delegated toIndicate Requirement Levels" [RFC2119]. Thea Hybrid Proxybuilds on Multicast DNS, which works between hosts on the same link. A set of hosts is consideredphysically attached tobe "on the same link" if: o when any host A fromthatset sendslink. Now, when apacket to any other host B in that set, using unicast, multicast, or broadcast,remote client issues a unicast query for a name falling within theentire link-layer packet payload arrives unmodified, and odelegated subdomain, the normal DNS delegation mechanism results in the unicast query arriving at the Hybrid Proxy, since it has been declared authoritative for those names. Now, instead of consulting abroadcast sent overtextual zone file on disk to discover the answer to the query, as a traditional DNS server would, a Hybrid Proxy consults its local link, using Multicast DNS, to find the answer to the question. Note that the Hybrid Proxy uses a "pull" model. The local linkby any host from that set of hosts can be received by every other host inis not queried using Multicast DNS until a remote client has requested thatset The link-layer *header* may be modified, such asdata. In the idle state, inToken Ring Source Routing [802.5], but notthelink-layer *payload*. In particular, if any device forwarding a packet modifies any partabsence of client requests, theIP header or IP payload then the packet isHybrid Proxy sends nolonger considered to bepackets and imposes no burden on thesame link. This meansnetwork. It operates purely "on demand". An alternative proposal has been a proxy thatthe packet may pass through devices such as repeaters, bridges, hubs or switches and still be consideredperforms DNS updates tobea remote DNS server on behalf of thesame link forMulticast DNS devices on thepurposelocal network. The difficulty of thisdocument, but not through a device such as an IP routeris thatdecrements the IP TTL or otherwise modifiestheIP header. 3. Compatibility Considerations No changesproxy would have toexisting devices are requiredbe issuing all possible Multicast DNS queries all the time, towork with a Hybrid Proxy. Existing devices that advertise servicesdiscover all the answers it needed to push up to the remote DNS server usingMulticastDNSwork with Hybrid Proxy. ExistingUpdate. It would thus generate very high load on the network continuously, even when there were no clientsthat support DNS-Based Service Discovery over Unicast DNS (Mac OS X 10.4 and later, including iPhone, iPad, and Bonjour for Windows) workwithHybrid Proxy. 4.any interest in that data. Hence, having a model where the query comes to the Hybrid ProxyOperation In a typical configuration,is much more efficient than a model where the Hybrid Proxyis configuredpushes the answers out tobe authoritative [RFC1034] [RFC1035] for foursome other remote DNSsubdomains, and authority for these subdomains is delegated to it via NS records:server. A client can send queries to the Hybrid Proxy in the form of traditional DNSsubdomain for service discovery records. This subdomain name may contain rich text, including spacesqueries, or by making a DNS Push Notification subscription [I-D.ietf-dnssd-push]. 2. Conventions andother punctuation. This is because this subdomain name is used onlyTerminology Used ingraphical user interfaces, where rich text is appropriate. A DNS subdomain for host name records. This subdomain name SHOULD be limited to letters, digitsthis Document The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", andhyphens,"OPTIONAL" in this document are tofacilitate convenient use of host namesbe interpreted as described incommand- line interfaces. A DNS subdomain"Key words forIPv6 Reverse Mapping records. This subdomain name will be a name that endsuse in"ip6.arpa."RFCs to Indicate Requirement Levels" [RFC2119]. The Hybrid Proxy builds on Multicast DNS, which works between hosts on the same link. ADNS subdomain for IPv4 Reverse Mapping records. This subdomain name willset of hosts is considered to bea name"on the same link" if: o when any host A from thatendsset sends a packet to any other host B in"in-addr.arpa." In an enterprise networkthat set, using unicast, multicast, or broadcast, thenamingentire link-layer packet payload arrives unmodified, anddelegation of these subdomains is typically performedo a broadcast sent over that link byconscious actionany host from that set ofthe network administrator. In a home network naming and delegation would typicallyhosts can beperformed using some automatic configuration mechanism such as HNCP [I-D.ietf-homenet-hncp]. These three varieties of delegated subdomains (service discovery,received by every other hostnames, and reverse mapping) are described below. 4.1. Delegated Subdomain for Service Discovery Records In its simplest form, each physical linkinan organization is assigned a unique Unicast DNS domain name,that set The link-layer *header* may be modified, such as"Building 1.example.com" or "2nd Floor.Building 3.example.com". Grouping multiple links underin Token Ring Source Routing [802.5], but not the link-layer *payload*. In particular, if any device forwarding asingle Unicast DNS domain namepacket modifies any part of the IP header or IP payload then the packet is no longer considered to bespecified in a future companion document, but foron thepurposes of this document, assumesame link. This means thateach link has its own unique Unicast DNS domain name. In a graphical user interface these names are not displayed as strings with dots as shown above, but something more akin to a typical file browser graphical user interface (which is harder to illustrate in a text-only document) showing folders, subfolders and files in a file system. +---------------+--------------+-------------+-------------------+ | *example.com* | Building 1 | 1st Floor | Alice's printer | | | Building 2 | *2nd Floor* | Bob's printer | | | *Building 3* | 3rd Floor | Charlie's printer | | | Building 4 | 4th Floor | | | | Building 5 | | | | | Building 6 | | | +---------------+--------------+-------------+-------------------+ Figure 1: Illustrative GUI Each named link in an organization has a Hybrid Proxy which serves it. This Hybrid Proxy function could be performed by a router on that link, or, with appropriate VLAN configuration, a single Hybrid Proxy could have a logical presence on, and serve as the Hybrid Proxy for, many links. In the parent domain, NS records are used to delegate ownership of each defined link name (e.g., "Building 1.example.com") to the Hybrid Proxy that serves the named link. In other words, the Hybrid Proxy is the authoritative name server for that subdomain. When a DNS-SD client issues a Unicast DNS query to discover services in a particular Unicast DNS subdomain (e.g., "_printer._tcp.Building 1.example.com. PTR ?") the normal DNS delegation mechanism results in that query being forwarded until it reaches the delegated authoritative name server for that subdomain, namely the Hybrid Proxy on the link in question. Like a conventional Unicast DNS server, a Hybrid Proxy implements the usual Unicast DNS protocol [RFC1034] [RFC1035] over UDP and TCP. However, unlike a conventional Unicast DNS server that generates answers from the data in its manually-configured zone file, a Hybrid Proxy generates answers using Multicast DNS. A Hybrid Proxy does this by consulting its Multicast DNS cache and/or issuing Multicast DNS queries for the corresponding Multicast DNS name, type and class, (e.g., in this case, "_printer._tcp.local. PTR ?"). Then, from the received Multicast DNS data, the Hybrid Proxy synthesizes the appropriate Unicast DNS response. Naturally, the existing Multicast DNS caching mechanism is used to avoid issuing unnecessary Multicast DNS queries on the wire. The Hybrid Proxy is acting as a client of the underlying Multicast DNS subsystem, and benefits from the same caching and efficiency measures as any other client using that subsystem. 4.2. Domain Enumeration An DNS-SD client performs Domain Enumeration [RFC6763] via certain PTR queries. It issues unicast Domain Enumeration queries using its "home" domain (typically learned via DHCP) and using its IPv6 prefix and IPv4 subnet address. These are described below in Section 4.2.1. It also issues multicast Domain Enumeration queries in the "local" domain [RFC6762]. These are described below in Section 4.2.2. The results of all Domain Enumeration queries are combined for Service Discovery purposes. 4.2.1. Domain Enumeration via Unicast Queries The administrator creates Domain Enumeration PTR records [RFC6763] to inform clients of available service discovery domains, e.g.,: b._dns-sd._udp.example.com. PTR Building 1.example.com. PTR Building 2.example.com. PTR Building 3.example.com. PTR Building 4.example.com. db._dns-sd._udp.example.com. PTR Building 1.example.com. lb._dns-sd._udp.example.com. PTR Building 1.example.com. The "b" ("browse") records tell the client device the list of browsing domains to display for the user to select from and the "db" ("default browse") record tells the client device which domain in that list should be selected by default. The "lb" ("legacy browse") record tells the client device which domain to automatically browse on behalf of applications that don't implement UI for multi-domain browsing (which is most of them, as of 2015). The "lb" domain is oftenthesamepacket may pass through devices such asthe "db" domain, or sometimes the "db" domain plus onerepeaters, bridges, hubs ormore others that shouldswitches and still beincluded in the list of automatic browsing domains for legacy clients. DNS responses are limitedconsidered toa maximum size of 65535 bytes. This limits the maximum number of domains that canbereturned for a Domain Enumeration query, as follows: A DNS response header is 12 bytes. That's typically followed by a single qname (up to 256 bytes) plus qtype (2 bytes) and qclass (2 bytes), leaving 65275 for the Answer Section. An Answer Section Resource Record consists of: o Owner name, encoded as a two-byte compression pointer o Two-byte rrtype (type PTR) o Two-byte rrclass (class IN) o Four-byte ttl o Two-byte rdlength o rdata (domain name, up to 256 bytes) This means that each Resource Record in the Answer Section can take up to 268 bytes total, which means that the Answer Section can contain, inon theworst case, no more than 243 domains. In a more typical scenario, wheresame link for thedomain names arepurpose of this document, but notall maximum-sized names, and there is some similarity between names so that reasonable name compression is possible, each Answer Section Resource Record may average 140 bytes, which meansthrough a device such as an IP router that decrements theAnswer Section can contain upIP TTL or otherwise modifies the IP header. 3. Compatibility Considerations No changes to466 domains. 4.2.2. Domain Enumeration via Multicast Queries Sinceexisting devices are required to work with a HybridProxy exists on many, if not all, the links in an enterprise, it offers an additional way to provide Domain Enumeration dataProxy. Existing devices that advertise services using Multicast DNS work with Hybrid Proxy. Existing clients that support DNS-Based Service Discovery over Unicast DNS (Mac OS X 10.4 and later, including iPhone, iPad, and Bonjour forclients. AWindows) work with Hybrid Proxy. 4. Hybrid Proxycan beOperation In a typical configuration, a Hybrid Proxy is configured togenerate Multicast DNS responsesbe authoritative [RFC1034] [RFC1035] forthe following Multicastfour DNSDomain Enumeration queries issues by clients: b._dns-sd._udp.local. PTR ? db._dns-sd._udp.local. PTR ? lb._dns-sd._udp.local. PTR ? This provides the abilitysubdomains, and authority forHybrid Proxies to provide configuration data on a per-link granularitythese subdomains is delegated toDNS-SD clients. In some enterprisesit via NS records: A DNS subdomain for service discovery records. This subdomain name maybe preferable to providecontain rich text, including spaces and other punctuation. This is because thisper-link configuration datasubdomain name is used only inthe form of Hybrid Proxy configuration, rather than populating the Unicastgraphical user interfaces, where rich text is appropriate. A DNSservers with the same data (in the "ip6.arpa" or "in-addr.arpa" domains). 4.3. Delegated Subdomain for LDH Host Names The traditional rulessubdomain for hostnames are more restrictive than those for DNS-SD service instance namesname records. This subdomain name SHOULD be limited to letters, digits anddomains. Users typically interact with DNS-SD by viewing a listhyphens, to facilitate convenient use ofdiscovered service instancehost nameson the display and selecting one of them by pointing, touching, or clicking. Similarly,insoftware that providescommand- line interfaces. A DNS subdomain for IPv6 Reverse Mapping records. This subdomain name will be amulti-domain DNS-SD user interface, users viewname that ends in "ip6.arpa." A DNS subdomain for IPv4 Reverse Mapping records. This subdomain name will be alist of offered domains onname that ends in "in-addr.arpa." In an enterprise network thedisplaynaming andselect onedelegation ofthemthese subdomains is typically performed bypointing, touching, or clicking. To use a service, users don't have to remember domain or instance names, or type them; users just have to be able to recognize what they see on the display and click onconscious action of thething they want.network administrator. Incontrast, host names are often remembereda home network naming andtyped. Also, host names have historically been used in command-line interfaces where spaces candelegation would typically beinconvenient. For this reason,performed using some automatic configuration mechanism such as HNCP [I-D.ietf-homenet-hncp]. These three varieties of delegated subdomains (service discovery, hostnames have traditionally been restricted to letters, digitsnames, andhyphens, with no spaces or other punctuation. While we still want to allow rich textreverse mapping) are described below. 4.1. Delegated Subdomain forDNS-SD service instance names and domains, itService Discovery Records In its simplest form, each physical link in an organization isadvisable, for maximum compatibility with existing usage, to restrict host names to the traditional letter- digit-hyphen rules. This means that whileassigned aservice name "My Printer._ipp._tcp.Buildingunique Unicast DNS domain name, such as "Building 1.example.com" or "2nd Floor.Building 3.example.com". Grouping multiple links under a single Unicast DNS domain name isacceptable and desirable (it is displayedto be specified in a future companion document, but for the purposes of this document, assume that each link has its own unique Unicast DNS domain name. In a graphical user interface these names are not displayed asan instance called "My Printer" in the domain "Building 1" at "example.com"),strings with dots as shown above, but something more akin to ahost name "My-Printer.Building 1.example.com"typical file browser graphical user interface (which isless desirable (because of the spaceharder to illustrate in"Building 1"). To accomodate this differencea text-only document) showing folders, subfolders and files in a file system. +---------------+--------------+-------------+-------------------+ | *example.com* | Building 1 | 1st Floor | Alice's printer | | | Building 2 | *2nd Floor* | Bob's printer | | | *Building 3* | 3rd Floor | Charlie's printer | | | Building 4 | 4th Floor | | | | Building 5 | | | | | Building 6 | | | +---------------+--------------+-------------+-------------------+ Figure 1: Illustrative GUI Each named link inallowable characters,an organization has a Hybrid ProxySOULD support having separate subdomains delegated to it, one whose name is allowed to contain arbitrary Net-Unicode text [RFC5198], and a second more constrained subdomain whose name is restricted to contain only letters, digits, and hyphens, towhich serves it. This Hybrid Proxy function could beused for host name records (names of 'A' and 'AAAA' address records). For example,performed by a router on that link, or, with appropriate VLAN configuration, a single Hybrid Proxy could have a logical presence on, and serve as thetwo subdomainsHybrid Proxy for, many links. In the parent domain, NS records are used to delegate ownership of each defined link name (e.g., "Building1.example.com" and "bldg1.example.com" delegated1.example.com") toit. Thethe Hybrid Proxywould then translate these two Multicastthat serves the named link. In other words, the Hybrid Proxy is the authoritative name server for that subdomain. When a DNS-SD client issues a Unicast DNSrecords: My Printer._ipp._tcp.local. SRV 0 0 631 prnt.local. prnt.local. A 10.0.1.2 intoquery to discover services in a particular Unicast DNSrecords as follows: My Printer._ipp._tcp.Buildingsubdomain (e.g., "_printer._tcp.Building 1.example.com.SRV 0 0 631 prnt.bldg1.example.com. prnt.bldg1.example.com. A 10.0.1.2 NotePTR ?") the normal DNS delegation mechanism results in that query being forwarded until it reaches theSRV recorddelegated authoritative nameis translated usingserver for that subdomain, namely therich-text domain name ("Building 1.example.com")Hybrid Proxy on the link in question. Like a conventional Unicast DNS server, a Hybrid Proxy implements the usual Unicast DNS protocol [RFC1034] [RFC1035] over UDP and TCP. However, unlike a conventional Unicast DNS server that generates answers from theaddress record name is translateddata in its manually-configured zone file, a Hybrid Proxy generates answers usingthe LDH domain ("bldg1.example.com").Multicast DNS. A Hybrid ProxyMAY support only a single rich text Net-Unicode domain, and use that domaindoes this by consulting its Multicast DNS cache and/or issuing Multicast DNS queries forall records, including 'A'the corresponding Multicast DNS name, type and'AAAA' address records, but implementers choosing this option should be aware that this choice may produce host names that are awkward to useclass, (e.g., incommand-line environments. Whetherthisis an issue depends on whether users incase, "_printer._tcp.local. PTR ?"). Then, from the received Multicast DNS data, thetarget environment are expected to be using command-line interfaces. AHybrid ProxyMUST NOT be restrictedsynthesizes the appropriate Unicast DNS response. Naturally, the existing Multicast DNS caching mechanism is used tosupport only a letter-digit- hyphen subdomain, because that results in an unnecessarily poor user experience. 4.4. Delegated Subdomain for Reverse Mapping Aavoid issuing unnecessary Multicast DNS queries on the wire. The Hybrid Proxycan facilitate easier management of reverse mapping domains, particularly for IPv6 addresses where manual management may be more onerous than itisforacting as a client of the underlying Multicast DNS subsystem, and benefits from the same caching and efficiency measures as any other client using that subsystem. 4.2. Domain Enumeration An DNS-SD client performs Domain Enumeration [RFC6763] via certain PTR queries. It issues unicast Domain Enumeration queries using its "home" domain (typically learned via DHCP) and using its IPv6 prefix and IPv4addresses. To achieve this,subnet address. These are described below in Section 4.2.1. It also issues multicast Domain Enumeration queries in theparent domain, NS records"local" domain [RFC6762]. These areused to delegate ownershipdescribed below in Section 4.2.2. The results ofthe appropriate reverse mapping domainall Domain Enumeration queries are combined for Service Discovery purposes. 4.2.1. Domain Enumeration via Unicast Queries The administrator creates Domain Enumeration PTR records [RFC6763] to inform clients of available service discovery domains, e.g.,: b._dns-sd._udp.example.com. PTR Building 1.example.com. PTR Building 2.example.com. PTR Building 3.example.com. PTR Building 4.example.com. db._dns-sd._udp.example.com. PTR Building 1.example.com. lb._dns-sd._udp.example.com. PTR Building 1.example.com. The "b" ("browse") records tell theHybrid Proxy. In other words, the Hybrid Proxy becomesclient device theauthoritative name serverlist of browsing domains to display for thereverse mapping domain. For example, if a given link is usinguser to select from and theIPv6 prefix 2001:0DB8/32, then"db" ("default browse") record tells the client device which domain"8.b.d.0.1.0.0.2.ip6.arpa" is delegated to the Hybrid Proxy forin thatlink. If a given link is using the IPv4 subnet 10.1/16, thenlist should be selected by default. The "lb" ("legacy browse") record tells the client device which domain"1.10.in-addr.arpa" is delegatedtothe Hybrid Proxy for that link. When a reverse mapping query arrives at the Hybrid Proxy, it issues the identical queryautomatically browse onits local link as a Multicast DNS query. (In the Apple "/usr/include/dns_sd.h" APIs, using ForceMulticast indicatesbehalf of applications that don't implement UI for multi-domain browsing (which is most of them, as of 2015). The "lb" domain is often theDNSServiceQueryRecord() call should perform the query using Multicast DNS.) Whensame as thehost owning that IPv6"db" domain, orIPv4 address responds with a name of the form "something.local",sometimes theHybrid Proxy rewrites that to use its configured LDH host name"db" domaininstead of "local" and returnsplus one or more others that should be included in theresponselist of automatic browsing domains for legacy clients. DNS responses are limited tothe caller. For example,aHybrid Proxy withmaximum size of 65535 bytes. This limits thetwo subdomains "1.10.in-addr.arpa" and "bldg1.example.com" delegated to it would translate this Multicast DNS record: 3.2.1.10.in-addr.arpa. PTR prnt.local. into this Unicast DNS response: 3.2.1.10.in-addr.arpa. PTR prnt.bldg1.example.com. Subsequent queriesmaximum number of domains that can be returned forthe prnt.bldg1.example.com address record, fallinga Domain Enumeration query, asit does within the bldg1.example.com domain, whichfollows: A DNS response header isdelegated to the Hybrid Proxy, will arrive at the Hybrid Proxy, where they are answered12 bytes. That's typically followed byissuing Multicast DNS queriesa single qname (up to 256 bytes) plus qtype (2 bytes) andusingqclass (2 bytes), leaving 65275 for thereceived Multicast DNS answers to synthesize Unicast DNS responses,Answer Section. An Answer Section Resource Record consists of: o Owner name, encoded asdescribed above. 4.5. Data Translation Generating the appropriate Multicast DNS queries involves, at the very least, translating from the configured DNS domain (e.g., "Building 1.example.com") on the Unicast DNS sidea two-byte compression pointer o Two-byte rrtype (type PTR) o Two-byte rrclass (class IN) o Four-byte ttl o Two-byte rdlength o rdata (domain name, up to"local" on the Multicast DNS side. Generating256 bytes) This means that each Resource Record in theappropriate Unicast DNS responses involves translating back from "local"Answer Section can take up to 268 bytes total, which means that theconfigured DNS Unicast domain. Other beneficial translation and filtering operations are described below. 4.5.1. DNS TTL limiting For efficiency, Multicast DNS typically uses moderately high DNS TTL values. For example,Answer Section can contain, in the worst case, no more than 243 domains. In a more typicalTTL on DNS-SD PTR recordsscenario, where the domain names are not all maximum-sized names, and there is75 minutes. What makes these moderately high TTLs acceptablesome similarity between names so that reasonable name compression is possible, each Answer Section Resource Record may average 140 bytes, which means that thecache coherency mechanisms built inAnswer Section can contain up tothe466 domains. 4.2.2. Domain Enumeration via MulticastDNS protocol which protect against stale data persisting for too long. When a service shuts down gracefully, it sends goodbye packets to remove its PTR records immediately from neighbouring caches. IfQueries Since aservice shuts down abruptly without sending goodbye packets,Hybrid Proxy exists on many, if not all, thePassive Observation Of Failures (POOF) mechanism describedlinks inSection 10.5 ofan enterprise, it offers an additional way to provide Domain Enumeration data for clients. A Hybrid Proxy can be configured to generate Multicast DNS responses for the following Multicast DNSspecification [RFC6762] comes into play to purgeDomain Enumeration queries issues by clients: b._dns-sd._udp.local. PTR ? db._dns-sd._udp.local. PTR ? lb._dns-sd._udp.local. PTR ? This provides thecache of stale data. A traditional Unicast DNS clientability for Hybrid Proxies to provide configuration data on aremote link does not getper-link granularity toparticipateDNS-SD clients. In some enterprises it may be preferable to provide this per-link configuration data inthese Multicast DNS cache coherency mechanisms onthelocal link. For traditionalform of Hybrid Proxy configuration, rather than populating the Unicast DNSqueries (those received without any Long-Lived Query [I-D.sekar-dns-llq] or DNS Push Notification [I-D.ietf-dnssd-push] option)servers with theDNS TTLs reported insame data (in theresulting Unicast DNS response SHOULD be capped to be no"ip6.arpa" or "in-addr.arpa" domains). 4.3. Delegated Subdomain for LDH Host Names The traditional rules for host names are more restrictive thanten seconds. Similarly,those fornegative responses, the negative caching TTL indicated in the SOA record [RFC2308] should also be ten seconds (Section 5). This valueDNS-SD service instance names and domains. Users typically interact with DNS-SD by viewing a list often seconds is chosen baseddiscovered service instance names onuser experience considerations. For negative caching, supposethe display and selecting one of them by pointing, touching, or clicking. Similarly, in software that provides a multi-domain DNS-SD useris attempting to access a remote device (e.g.,interface, users view aprinter),list of offered domains on the display andthey are unsuccessful because that device is powered off. Suppose they then placeselect one of them by pointing, touching, or clicking. To use atelephone call and ask for the deviceservice, users don't have to remember domain or instance names, or type them; users just have to bepowered on. We want the device to become available to the user within a reasonable time period. It is reasonble to expect itable totakerecognize what they see on theorder of ten seconds for a simple device with a simple embedded operating system to power on. Once the device is powered ondisplay andhas announced its presenceclick on thenetwork via Multicast DNS, we would like itthing they want. In contrast, host names are often remembered and typed. Also, host names have historically been used in command-line interfaces where spaces can be inconvenient. For this reason, host names have traditionally been restricted totakeletters, digits and hyphens, with nomore than a further ten seconds for stale negative cache entries to expire from Unicast DNS caches, making the device available to the user desiring to access it. Similar reasoning applies to capping positive TTLs at ten seconds. In the event of a device moving location, getting a new DHCP address,spaces or otherrenumbering events,punctuation. While wewould like the updated informationstill want tobe availableallow rich text for DNS-SD service instance names and domains, it is advisable, for maximum compatibility with existing usage, toremote clientsrestrict host names to the traditional letter- digit-hyphen rules. This means that while a service name "My Printer._ipp._tcp.Building 1.example.com" is acceptable and desirable (it is displayed in arelatively timely fashion. However, network administrators should be aware that many recursive (caching) DNS servers by default are configured to imposegraphical user interface as an instance called "My Printer" in the domain "Building 1" at "example.com"), aminimum TTLhost name "My-Printer.Building 1.example.com" is less desirable (because of30 seconds. If stale data appears to be persisting inthenetworkspace in "Building 1"). To accomodate this difference in allowable characters, a Hybrid Proxy SOULD support having separate subdomains delegated tothe extent that it adversely impacts user experience, network administrators are advisedit, one whose name is allowed tocheck the configuration of their recursive DNS servers. For received Unicast DNS queries thatcontainan LLQ or DNS Push Notification option, the Multicast DNS record's TTL SHOULD be returned unmodified, because the Push Notification channel existsarbitrary Net-Unicode text [RFC5198], and a second more constrained subdomain whose name is restricted toinform the remote client ascontain only letters, digits, and hyphens, to be used for host name recordscome(names of 'A' andgo.'AAAA' address records). Forfurther details about Long-Lived Queries,example, a Hybrid Proxy could have the two subdomains "Building 1.example.com" andits newer replacement, DNS Push Notifications, see Section 4.6. 4.5.2. Suppressing Unusable Records A"bldg1.example.com" delegated to it. The Hybrid ProxySHOULD suppresswould then translate these two Multicast DNS records: My Printer._ipp._tcp.local. SRV 0 0 631 prnt.local. prnt.local. A 10.0.1.2 into Unicast DNSanswers forrecords as follows: My Printer._ipp._tcp.Building 1.example.com. SRV 0 0 631 prnt.bldg1.example.com. prnt.bldg1.example.com. A 10.0.1.2 Note thatare not useful outsidethelocal link. For example, DNS ASRV record name is translated using the rich-text domain name ("Building 1.example.com") andAAAA records for IPv6 link-local addresses [RFC4862]the address record name is translated using the LDH domain ("bldg1.example.com"). A Hybrid Proxy MAY support only a single rich text Net-Unicode domain, andIPv4 link-local addresses [RFC3927] should be suppressed. Similarly, for sitesuse thathave multiple private address realms [RFC1918], private addresses from one privatedomain for all records, including 'A' and 'AAAA' addressrealmrecords, but implementers choosing this option shouldnotbecommunicated to clients in a different private address realm. By the same logic, DNS SRV recordsaware thatreference targetthis choice may produce host names thathave no addresses usable by the requester should be suppressed, and likewise, DNS PTR records that point to unusable SRV records should be similarly be suppressed. 4.5.3. Application-Specific Data Translation There may be cases where Application-Specific Data Translation is appropriate. For example, AirPrint printers tendare awkward toadvertise fairly verbose information about their capabilities in their DNS-SD TXT record. TXT record sizesuse inthe range 500-1000 bytes are not uncommon. This information is a legacy from LPR printing, because LPR does not have in-band capability negotiation, so all ofcommand-line environments. Whether thisinformationisconveyed usingan issue depends on whether users in theDNS-SD TXT record instead. IPP printing does have in-band capability negotiation, but for convenience printers tendtarget environment are expected toinclude the same capability information in their IPP DNS-SD TXT records as well. For local mDNS use this extra TXT record information is inefficient, but not fatal. However, when abe using command-line interfaces. A Hybrid Proxyaggregates data from multiple printers onMUST NOT be restricted to support only alink, and sends it via unicast (via UDP or TCP) this amount of unnecessary TXT record information can resultletter-digit- hyphen subdomain, because that results inlarge responses. A DNS reply over TCP carrying information about 70 printers withanaverageunnecessarily poor user experience. 4.4. Delegated Subdomain for Reverse Mapping A Hybrid Proxy can facilitate easier management of700 bytes per printer adds upreverse mapping domains, particularly for IPv6 addresses where manual management may be more onerous than it is for IPv4 addresses. To achieve this, in the parent domain, NS records are used toabout 50 kilobytesdelegate ownership ofdata. Therefore,the appropriate reverse mapping domain to the Hybrid Proxy. In other words, the Hybrid Proxy becomes the authoritative name server for the reverse mapping domain. For example, if a given link is using the IPv6 prefix 2001:0DB8/32, then the domain "8.b.d.0.1.0.0.2.ip6.arpa" is delegated to the Hybrid Proxy for that link. If a given link isaware ofusing thespecifics of an application-layer protocol such as AirPrint (which uses IPP) can elide unnecessary key/ value pairs fromIPv4 subnet 10.1/16, then theDNS-SD TXT record for better network efficiency. Also,domain "1.10.in-addr.arpa" is delegated to theDNS-SD TXT recordHybrid Proxy formany printers contains an "adminurl" key something like "adminurl=http://printername.local/status.html". For this URL to be useful outsidethat link. When a reverse mapping query arrives at thelocal link,Hybrid Proxy, it issues theembedded dot-identical query on its localhostname needs to be translated to an appropriate name with larger scope. Dot-local names are easily translated when they appear in well-defined places, eitherlink as arecord's name, or inMulticast DNS query. (In the Apple "/usr/include/dns_sd.h" APIs, using ForceMulticast indicates that the DNSServiceQueryRecord() call should perform the query using Multicast DNS.) When therdatahost owning that IPv6 or IPv4 address responds with a name ofrecord types like PTR and SRV. Intheprinting case, some application-specific knowledge aboutform "something.local", thesemanticsHybrid Proxy rewrites that to use its configured LDH host name domain instead of "local" and returns the"adminurl" key is needed forresponse to the caller. For example, a Hybrid Proxy with the two subdomains "1.10.in-addr.arpa" and "bldg1.example.com" delegated toknow thatitcontains a name that needs to be translated. Thiswould translate this Multicast DNS record: 3.2.1.10.in-addr.arpa. PTR prnt.local. into this Unicast DNS response: 3.2.1.10.in-addr.arpa. PTR prnt.bldg1.example.com. Subsequent queries for the prnt.bldg1.example.com address record, falling as it does within the bldg1.example.com domain, which issomewhat analogousdelegated to theneed for NAT gatewaysHybrid Proxy, will arrive at the Hybrid Proxy, where they are answered by issuing Multicast DNS queries and using the received Multicast DNS answers tocontain ALGs (Application-Specific Gateways)synthesize Unicast DNS responses, as described above. 4.5. Data Translation Generating the appropriate Multicast DNS queries involves, at the very least, translating from the configured DNS domain (e.g., "Building 1.example.com") on the Unicast DNS side tofacilitate"local" on thecorrectMulticast DNS side. Generating the appropriate Unicast DNS responses involves translating back from "local" to the configured DNS Unicast domain. Other beneficial translationof protocols that embed addresses in unexpected places. Asand filtering operations are described below. 4.5.1. DNS TTL limiting For efficiency, Multicast DNS typically uses moderately high DNS TTL values. For example, the typical TTL on DNS-SD PTR records is 75 minutes. What makes these moderately high TTLs acceptable is thecase with NAT ALGs, protocol designers are advised to avoid communicating names and addresses in nonstandard locations, because those "hidden" names and addresses are at risk of not being translated when necessary, resultingcache coherency mechanisms built inoperational failures. In the printing case, the operational failure of failingtotranslatethe"adminurl" key correctly is that, when accessed fromMulticast DNS protocol which protect against stale data persisting for too long. When adifferent link, printing will still work, but clicking the "Admin" UI button will failservice shuts down gracefully, it sends goodbye packets toopen the printer's administration page. Rather than duplicating the host nameremove its PTR records immediately from neighbouring caches. If a service shuts down abruptly without sending goodbye packets, theservice's SRV recordPassive Observation Of Failures (POOF) mechanism described inits "adminurl" key, thereby havingSection 10.5 of thesame host name appear in two places, a better design might have beenMulticast DNS specification [RFC6762] comes into play toomit the host name from the "adminurl" key, and instead havepurge the cache of stale data. A traditional Unicast DNS clientimplicitly substituteon a remote link does not get to participate in these Multicast DNS cache coherency mechanisms on thetarget host name fromlocal link. For traditional Unicast DNS queries (those received without any Long-Lived Query [I-D.sekar-dns-llq] or DNS Push Notification [I-D.ietf-dnssd-push] option) theservice's SRV recordDNS TTLs reported inplace of a missing host namethe resulting Unicast DNS response SHOULD be capped to be no more than ten seconds. Similarly, for negative responses, the negative caching TTL indicated in the"adminurl" key. That way the desired host name only appears once, and itSOA record [RFC2308] should also be ten seconds (Section 5). This value of ten seconds isinchosen based on user experience considerations. For negative caching, suppose awell-defined place where software like the Hybrid Proxyuser isexpectingattempting tofind it. Noteaccess a remote device (e.g., a printer), and they are unsuccessful because thatthis kind of Application-Specific Data Translationdevice isexpectedpowered off. Suppose they then place a telephone call and ask for the device to bevery rare. It ispowered on. We want theexception, rather thandevice to become available to therule. This is an example ofuser within acommon theme in computing.reasonable time period. It isfrequently the case thatreasonble to expect itis wisetostart with a clean, layered design, with clear boundaries. Then, in certain special cases, those layer boundaries may be violated, where the performance and efficiency benefits outweightake on theineleganceorder ofthe layer violation. These layer violations are optional. They are done primarily for efficiency reasons, and generally should not be requiredten seconds forcorrect operation. A Hybrid Proxy MAY operate solely at the mDNS layer, without any knowledge of semantics at the DNS-SD layer or above. 4.6. Answer Aggregation Ina simpleanalysis, simply gathering multicast answers and forwarding them indevice with aunicast response seems adequate, but it raises the question of how long the Hybrid Proxy should waitsimple embedded operating system tobe sure that itpower on. Once the device is powered on and hasreceived allannounced its presence on the network via MulticastDNS answersDNS, we would like itneedstoformtake no more than acomplete Unicast DNS response. If it waits too little time, then it risks itsfurther ten seconds for stale negative cache entries to expire from Unicast DNSresponse being incomplete. If it waits too long, then it creates a poor user experience atcaches, making theclient end. In fact, there may be no time which is both short enoughdevice available toproduce a good user experience and atthesame time long enoughuser desiring toreliably produce complete results. Similarly, the Hybrid Proxy --access it. Similar reasoning applies to capping positive TTLs at ten seconds. In theauthoritative name server forevent of a device moving location, getting a new DHCP address, or other renumbering events, we would like thesubdomain in question -- needsupdated information todecide what DNS TTLbe available toreport for these records. If the TTL is too long then theremote clients in a relatively timely fashion. However, network administrators should be aware that many recursive (caching)nameDNS serversissuing queries on behalfby default are configured to impose a minimum TTL oftheir clients risk caching30 seconds. If stale datafor too long. Ifappears to be persisting in theTTL is too short thennetwork to theamount ofextent that it adversely impacts user experience, networktraffic will be more than necessary. In fact, there may be noadministrators are advised to check the configuration of their recursive DNS servers. For received Unicast DNS queries that contain an LLQ or DNS Push Notification option, the Multicast DNS record's TTLwhich is both short enough to avoid undesirable stale data and atSHOULD be returned unmodified, because thesame time long enoughPush Notification channel exists tobe efficient oninform thenetwork. Both these dilemmas are solved by use of DNSremote client as records come and go. For further details about Long-LivedQueries (DNS LLQ) [I-D.sekar-dns-llq] orQueries, and its newer replacement, DNS PushNotifications [I-D.ietf-dnssd-push]. (Clients andNotifications, see Section 4.6. 4.5.2. Suppressing Unusable Records A HybridProxies can support bothProxy SHOULD suppress Unicast DNSLLQanswers for records that are not useful outside the local link. For example, DNS A and AAAA records for IPv6 link-local addresses [RFC4862] and IPv4 link-local addresses [RFC3927] should be suppressed. Similarly, for sites that have multiple private address realms [RFC1918], private addresses from one private address realm SHOULD NOT be communicated to clients in a different private address realm. By the same logic, DNSPush,SRV records that reference target host names that have no addresses usable by the requester should be suppressed, andwhen talkinglikewise, DNS PTR records that point to unusable SRV records should be similarly be suppressed. 4.5.3. Text Encoding Translation A Hybrid Proxy does no translation between text encodings. Specifically, a Hybrid Proxythat supports both the client may usedoes no translation between Punycode and UTF-8, eitherprotocol,in the owner name of DNS records, or anywhere in the RDATA of DNS records (such asit chooses, thoughthe RDATA of PTR records, SRV records, NS records, or other record types like TXT, where it isexpected that onlyambiguous whether the RDATA may contain DNSPushnames). All bytes are treated as-is, with no attempt at text encoding translation. A client implementing DNS-based Service Discovery [RFC6763] willcontinue to be supported inuse UTF-8 encoding for its service discovery queries, which thelong run.) When aHybrid Proxyreceives a query containing a DNS LLQ orpasses through without any text encoding translation to the Multicast DNSPush Notification option, it responds immediately usingsubsystem. Responses from the Multicast DNSrecords it already hassubsystem are similarly returned, without any text encoding translation, back to the requesting client. 4.5.4. Application-Specific Data Translation There may be cases where Application-Specific Data Translation is appropriate. For example, AirPrint printers tend to advertise fairly verbose information about their capabilities inits cache (if any).their DNS-SD TXT record. TXT record sizes in the range 500-1000 bytes are not uncommon. Thisprovides a good client user experience by providinginformation is anear-instantaneous response. Simultaneously,legacy from LPR printing, because LPR does not have in-band capability negotiation, so all of this information is conveyed using the DNS-SD TXT record instead. IPP printing does have in-band capability negotiation, but for convenience printers tend to include the same capability information in their IPP DNS-SD TXT records as well. For local mDNS use this extra TXT record information is inefficient, but not fatal. However, when a Hybrid Proxyissues a Multicast DNS queryaggregates data from multiple printers onthe local link to discover if there are any additional Multicast DNS recordsa link, and sends itdid not already know about. Should additional Multicastvia unicast (via UDP or TCP) this amount of unnecessary TXT record information can result in large responses. A DNSresponses be received, these are then deliveredreply over TCP carrying information about 70 printers with an average of 700 bytes per printer adds up tothe client using DNS LLQ or DNS Push Notification update messages. The timelinessabout 50 kilobytes ofsuch update messagesdata. Therefore, a Hybrid Proxy that islimited only byaware of thetimelinessspecifics of an application-layer protocol such as AirPrint (which uses IPP) can elide unnecessary key/ value pairs from thedevice respondingDNS-SD TXT record for better network efficiency. Also, the DNS-SD TXT record for many printers contains an "adminurl" key something like "adminurl=http://printername.local/status.html". For this URL to be useful outside theMulticast DNS query. Iflocal link, theMulticast DNS device responds quickly, thenembedded dot- local hostname needs to be translated to an appropriate name with larger scope. Dot-local names are easily translated when they appear in well-defined places, either as a record's name, or in theupdate message is delivered quickly. Ifrdata of record types like PTR and SRV. In theMulticast DNS device responds slowly, thenprinting case, some application-specific knowledge about theupdate message is delivered slowly. The benefitsemantics ofusing update messagesthe "adminurl" key isthatneeded for the Hybrid Proxycan respond promptly becauseto know that itdoesn't havecontains a name that needs todelay its unicast responsebe translated. This is somewhat analogous toallow fortheexpected worst-case delayneed forreceiving all the Multicast DNS responses. Even if a proxy wereNAT gateways totrycontain ALGs (Application-Specific Gateways) toprovide reliability by assuming an excessively pessimistic worst-case time (thereby giving a very poor user experience) there would still be the risk of a slow Multicast DNS device taking even longer than that (e.g, a devicefacilitate the correct translation of protocols that embed addresses in unexpected places. As isnot even powered on until ten seconds aftertheinitial query is received) resultingcase with NAT ALGs, protocol designers are advised to avoid communicating names and addresses inincomplete responses. Using update message solves this dilemma: even very late responsesnonstandard locations, because those "hidden" names and addresses are at risk of notlost; they are deliveredbeing translated when necessary, resulting insubsequent update messages. There are two factors that determine specifically how responses are generated: The first factoroperational failures. In the printing case, the operational failure of failing to translate the "adminurl" key correctly iswhetherthat, when accessed from a different link, printing will still work, but clicking thequery"Admin" UI button will fail to open the printer's administration page. Rather than duplicating the host name from theclient included an LLQ or DNS Push Notification option (typical with long-lived service browsing PTR queries) or not (typical with one-shot operations likeservice's SRVor addressrecordqueries). Note that queries containingin its "adminurl" key, thereby having theLLQ or PUSH option are received directlysame host name appear in two places, a better design might have been to omit the host name from the "adminurl" key, and instead have the client(see Section 4.6.1). Queries containing no LLQ or PUSH option are generally received viaimplicitly substitute theclient's configured recursive (caching)target host nameserver. The second factorfrom the service's SRV record in place of a missing host name in the "adminurl" key. That way the desired host name only appears once, and it iswhetherin a well-defined place where software like the Hybrid Proxyalready has at least one record in its cacheis expecting to find it. Note thatpositively answersthis kind of Application-Specific Data Translation is expected to be very rare. It is thequestion. o No LLQ or PUSH option; no answer in cache: Issueexception, rather than the rule. This is anmDNS query, exactly asexample of alocal client would issue an mDNS query oncommon theme in computing. It is frequently thelocal link forcase that it is wise to start with a clean, layered design, with clear boundaries. Then, in certain special cases, those layer boundaries may be violated, where thedesired record name, typeperformance andclass, including retransmissions, as appropriate, according toefficiency benefits outweigh the inelegance of the layer violation. These layer violations are optional. They are done primarily for efficiency reasons, and generally should not be required for correct operation. A Hybrid Proxy MAY operate solely at theestablishedmDNSretransmission schedule [RFC6762]. As soon as any Multicast DNS response packet is received that contains one or more positive answers to that question (with orlayer, without any knowledge of semantics at theCache Flush bit [RFC6762] set),DNS-SD layer or above. 4.6. Answer Aggregation In anegative answer (signified via an NSEC record [RFC6762]), the Hybrid Proxy generates a Unicast DNS response packet containing the corresponding (filtered and translated)simple analysis, simply gathering multicast answers andsendsforwarding them in a unicast response seems adequate, but it raises the question of how long the Hybrid Proxy should wait to be sure that it has received all theremote client. If after six seconds noMulticast DNS answershave been received, returnit needs to form anegativecomplete Unicast DNS response. If it waits too little time, then it risks its Unicast DNS responsetobeing incomplete. If it waits too long, then it creates a poor user experience at theremote client. DNS TTLs in responses are cappedclient end. In fact, there may be no time which is both short enough to produce a good user experience and atmost ten seconds. o No LLQ or PUSH option; at least one answerthe same time long enough to reliably produce complete results. Similarly, the Hybrid Proxy -- the authoritative name server for the subdomain incache: Send response right awayquestion -- needs tominimise delay.decide what DNSTTLs in responses are cappedTTL toat most ten seconds. No local mDNSreport for these records. If the TTL is too long then the recursive (caching) name servers issuing queriesare performed. (Reasoning: Given RRSeton behalf of their clients risk caching stale data for too long. If the TTLharmonisation, ifis too short then theproxy has one Multicastamount of network traffic will be more than necessary. In fact, there may be no TTL which is both short enough to avoid undesirable stale data and at the same time long enough to be efficient on the network. Both these dilemmas are solved by use of DNSanswer inLong-Lived Queries (DNS LLQ) [I-D.sekar-dns-llq] or itscache, it can reasonably assume that it has all of them.) o Query containsnewer replacement, DNS Push Notifications [I-D.ietf-dnssd-push]. (Clients and Hybrid Proxies can support both DNS LLQor PUSH option; no answer in cache: As in the case above with no answer in the cache, perform mDNS querying for six seconds,andsend a responseDNS Push, and when talking to a Hybrid Proxy that supports both theremoteclient may use either protocol, assoon as any relevant mDNS responseit chooses, though it isreceived. If after six seconds no relevant mDNS response has been received, return negative responseexpected that only DNS Push will continue to be supported in theremote client. (Reasoning: We don't need to rush to send an empty answer.) Whether or notlong run.) When a Hybrid Proxy receives arelevant mDNS response is received within six seconds, thequeryremains active for as long as the client maintains the LLQ or PUSH state, and if mDNS answers are received later, LLQ or PUSH update messages are sent.containing a DNSTTLs in responses are returned unmodified. o Query containsLLQ orPUSH option; at least one answer in cache: As inDNS Push Notification option, it responds immediately using thecase above with at least one answerMulticast DNS records it already has incache, send response right away to minimise delay. The query remains active for as long as theits cache (if any). This provides a good clientmaintainsuser experience by providing a near-instantaneous response. Simultaneously, theLLQ or PUSH state, andHybrid Proxy issues a Multicast DNS query on the local link to discover if there are any additional Multicast DNS records it did not already know about. Should additionalmDNS answersMulticast DNS responses be received, these arereceived later,then delivered to the client using DNS LLQ orPUSHDNS Push Notification update messages. The timeliness of such update messagesare sent. (Reasoning: We want UI thatisdisplayed very rapidly, yet continueslimited only by the timeliness of the device responding toremain accurate even asthenetwork environment changes.)Multicast DNSTTLs in responses are returned unmodified. Note thatquery. If the"negative responses" referred to above are "no error no answer" negative responses, not NXDOMAIN. ThisMulticast DNS device responds quickly, then the update message isbecausedelivered quickly. If the Multicast DNS device responds slowly, then the update message is delivered slowly. The benefit of using update messages is that the Hybrid Proxycannot knowcan respond promptly because it doesn't have to delay its unicast response to allow for the expected worst-case delay for receiving all the Multicast DNSdomain namesresponses. Even if a proxy were to try to provide reliability by assuming an excessively pessimistic worst-case time (thereby giving a very poor user experience) there would still be the risk of a slow Multicast DNS device taking even longer than thatmay exist on(e.g., alink at any given time, so any name with no answers may have child namesdevice thatdo exist, making itis not even powered on until ten seconds after the initial query is received) resulting in incomplete responses. Using update message solves this dilemma: even very late responses are not lost; they are delivered in subsequent update messages. There are two factors that determine specifically how responses are generated: The first factor is whether the query from the client included an"empty nonterminal" name. 4.6.1. Discovery ofLLQand/or PUSHor DNS Push NotificationService To issueoption (typical with long-lived service browsing PTR queries) or not (typical with one-shot operations like SRV or address record queries). Note that queries containing the LLQ or PUSHqueries, clients need to communicateoption are received directlywithfrom theauthoritative Hybrid Proxy. The procedure by whichclient. Queries containing no LLQ or PUSH option are generally received via theclient locatesclient's configured recursive (caching) name server. The second factor is whether theauthoritativeHybrid Proxyis describedalready has at least one record in its cache that positively answers the question. o No LLQspecification [I-D.sekar-dns-llq] and the DNS Push Notifications specification [I-D.ietf-dnssd-push]. Briefly, the procedure isor PUSH option; no answer in cache: Issue an mDNS query, exactly asfollows: To discover the LLQ service for a given domain name,a local clientfirst performs DNS zone apex discovery, and then, having discovered <apex>, the client then issues a DNSwould issue an mDNS query on the local link for theSRVdesired recordwith the name _dns-llq._udp.<apex> to find the target hostname, type andport for the LLQ service for that zone. By default LLQ service runs on UDP port 5352, but since SRV records are used,class, including retransmissions, as appropriate, according to theLLQ service can be offered onestablished mDNS retransmission schedule [RFC6762]. As soon as anyport. To discover the DNS Push Notification service for a given domain name, a client first performsMulticast DNSzone apex discovery, and then, having discovered <apex>,response packet is received that contains one or more positive answers to that question (with or without the Cache Flush bit [RFC6762] set), or a negative answer (signified via an NSEC record [RFC6762]), theclient then issuesHybrid Proxy generates a Unicast DNSquery for the SRV record withresponse packet containing thename _dns-push-tls._tcp.<apex>corresponding (filtered and translated) answers and sends it tofindthetarget host and port forremote client. If after six seconds no Multicast DNS answers have been received, return a negative response to the remote client. DNSPush Notification service for that zone. By defaultTTLs in responses are capped to at most ten seconds. o No LLQ or PUSH option; at least one answer in cache: Send response right away to minimise delay. DNSPush Notification service runs on TCP port 5352, but since SRV recordsTTLs in responses areused,capped to at most ten seconds. No local mDNS queries are performed. (Reasoning: Given RRSet TTL harmonisation, if the proxy has one Multicast DNSPush Notification serviceanswer in its cache, it canbe offered on any port. A client performs DNS zone apex discovery using the procedure below: 1. The client issues a DNS query forreasonably assume that it has all of them.) o Query contains LLQ or PUSH option; no answer in cache: As in theSOA recordcase above with no answer in thegiven domain name. 2. A conformant recursive (caching) name server will eithercache, perform mDNS querying for six seconds, and send apositive response,response to the remote client as soon as any relevant mDNS response is received. If after six seconds no relevant mDNS response has been received, return negative response to the remote client. (Reasoning: We don't need to rush to send an empty answer.) Whether or not anegativerelevant mDNS responsecontainingis received within six seconds, theSOA record ofquery remains active for as long as thezone apex inclient maintains theAuthority Section. 3. IfLLQ or PUSH state, and if mDNS answers are received later, LLQ or PUSH update messages are sent. DNS TTLs in responses are returned unmodified. o Query contains LLQ or PUSH option; at least one answer in cache: As in thename server sends a negativecase above with at least one answer in cache, send responsethat does not contain the SOA record of the zone apex,right away to minimise delay. The query remains active for as long as the clienttrims the first label offmaintains thegiven domain nameLLQ or PUSH state, andreturns to step 1if additional mDNS answers are received later, LLQ or PUSH update messages are sent. (Reasoning: We want UI that is displayed very rapidly, yet continues totry again. By this method,remain accurate even as theclient iterates until it learnsnetwork environment changes.) DNS TTLs in responses are returned unmodified. Note that thename of"negative responses" referred to above are "no error no answer" negative responses, not NXDOMAIN. This is because thezone apex, or (in pathological failure cases) reachesHybrid Proxy cannot know all theroot and gives up. NormalMulticast DNScaching is used to avoid repetitive queriesdomain names that may exist onthe wire.a link at any given time, so any name with no answers may have child names that do exist, making it an "empty nonterminal" name. 5. DNS SOA (Start of Authority) Record The MNAME field SHOULD contain the host name of the Hybrid Proxy device (i.e., the same domain name as the rdata of the NS record delegating the relevant zone(s) to this Hybrid Proxy device). The RNAME field SHOULD contain the mailbox of the person responsible for administering this Hybrid Proxy device.The SERIAL field SHOULD contain a sequence number that increments each time the Hybrid Proxy returns an SOA record to any client. [Author's note: Or maybe it could justThe SERIAL field MUST bezero?]zero. Since zone transfers are undefined for Hybrid Proxy zones, the REFRESH, RETRY and EXPIRE fields have no useful meaning for Hybrid Proxy zones. These fields SHOULD contain reasonable default values. The RECOMMENDED values are: REFRESH 7200, RETRY 3600, EXPIRE 86400. The MINIMUM field (used to control the lifetime of negative cache entries) SHOULD contain the value 10. The value of ten seconds is chosen based on user experience considerations (see Section 4.5.1).[Author's note: Discussion6. DNSSEC Issues 6.1. On-line signing only Auth server must possess key, to generate signed data from mDNS responses. Therefore off-line signing not applicable to Hybrid Proxy. 6.2. NSEC and NSEC3 Records In DNSSEC, NSEC and NSEC3 records are used to assert the nonexistence ofthese recommendationscertain names, also described as "authenticated denial of existence". Since a Hybrid Proxy only knows what names exist on the local link by issuing queries for them, and since it would be impractical to issue queries for every possible name just to find out which names exist and which do not, a Hybrid Proxy cannot programatically synthesize the traditional NSEC and NSEC3 records which assert the nonexistence of a large range names. Instead, when generating a negative response, a Hybrid Proxy programatically synthesizes a single NSEC record assert the nonexistence of just the specific name queried, and no others. Since the Hybrid Proxy has the zone signing key, it can do this on demand. Since the NSEC record asserts the nonexistence of only a single name, zone walking isrequested.] 6.not a concern, so NSEC3 is not necessary. Note that this applies only to traditional immediate DNS queries, which may return immediate negative answers when no immediate positive answer is available. When used with a DNS Push Notification subscription [I-D.ietf-dnssd-push] there are no negative answers, merely the absence of answers so far, which may change in the future if answers become available. 7. Implementation Status Some aspects of the mechanism specified in this document already exist in deployed software. Some aspects are new. This section outlines which aspects already exist and which are new.6.1.7.1. Already Implemented and Deployed Domain enumeration by the client (the "b._dns-sd._udp" queries) is already implemented and deployed. Unicast queries to the indicated discovery domain is already implemented and deployed. These are implemented and deployed in Mac OS X 10.4 and later (including all versions of Apple iOS, on all iPhone and iPads), in Bonjour for Windows, and in Android 4.1 "Jelly Bean" (API Level 16) and later. Domain enumeration and unicast querying have been used for several years at IETF meetings to make Terminal Room printers discoverable from outside the Terminal room. When you Press Cmd-P on your Mac, or select AirPrint on your iPad or iPhone, and the Terminal room printers appear, that is because your client is sending unicast DNS queries to the IETF DNS servers.6.2.7.2. Already Implemented A minimal portable Hybrid Proxy implementation has been produced by Markus Stenberg and Steven Barth, which runs on OS X and several Linux variants including OpenWrt [ohp]. It was demonstrated at the Berlin IETF in July 2013. Tom Pusateri also has an implementation that runs on any Unix/Linux. It has a RESTful interface for management and an experimental demo CLI and web interface.6.3.7.3. Partially Implemented The current APIs make multiple domains visible to client software, but most client UI today lumps all discovered services into a single flat list. This is largely a chicken-and-egg problem. Application writers were naturally reluctant to spend time writing domain-aware UI code when few customers today would benefit from it. If Hybrid Proxy deployment becomes common, then application writers will have a reason to provide better UI. Existing applications will work with the Hybrid Proxy, but will show all services in a single flat list. Applications with improved UI will group services by domain. The Long-Lived Query mechanism [I-D.sekar-dns-llq] referred to in this specification exists and is deployed, but has not been standardized by the IETF. The IETF is considering standardizing a superior Long-Lived Query mechanism called DNS Push Notifications [I-D.ietf-dnssd-push]. The pragmatic short-term deployment approach is for vendors to produce Hybrid Proxies that implement both the deployed Long-Lived Query mechanism [I-D.sekar-dns-llq] (for today's clients) and the new DNS Push Notifications mechanism [I-D.ietf-dnssd-push] as the preferred long-term direction. The translating/filtering Hybrid Proxy specified in this document. Implementations are under development, and operational experience with these implementations has guided updates to this document.6.4.7.4. Not Yet Implemented Client implementations of the new DNS Push Notifications mechanism [I-D.ietf-dnssd-push] are currently underway. A mechanism to 'stitch' together multiple ".local." zones so that they appear as one. Such a stitching mechanism will be specified in a future companion document.7.This stitching mechanism addresses the issue that if a printer is physically moved from one link to another, then conceptually the old service has disappeared from the DNS namespace, and a new service with a similar name has appeared. This stitching mechanism will allow a service to change its point of attachment without changing the name by which it can be found. 8. IPv6 Considerations An IPv6-only host and an IPv4-only host behave as "ships that pass in the night". Even if they are on the same Ethernet, neither is aware of the other's traffic. For this reason, each physical link may have *two* unrelated ".local." zones, one for IPv6 and one for IPv4. Since for practical purposes, a group of IPv6-only hosts and a group of IPv4-only hosts on the same Ethernet act as if they were on two entirely separate Ethernet segments, it is unsurprising that their use of the ".local." zone should occur exactly as it would if they really were on two entirely separate Ethernet segments. It will be desirable to have a mechanism to 'stitch' together these two unrelated ".local." zones so that they appear as one. Such mechanism will need to be able to differentiate between a dual-stack (v4/v6) host participating in both ".local." zones, and two different hosts, one IPv6-only and the other IPv4-only, which are both trying to use the same name(s). Such a mechanism will be specified in a future companion document.8.9. Security Considerations8.1.9.1. Authenticity A service proves its presence on a link by its ability to answer link-local multicast queries on that link. If greater security is desired, then the Hybrid Proxy mechanism should not be used, and something with stronger security should be used instead, such as authenticated secure DNS Update [RFC2136] [RFC3007].8.2.9.2. Privacy The Domain Name System is, generally speaking, a global public database. Records that exist in the Domain Name System name hierarchy can be queried by name from, in principle, anywhere in the world. If services on a mobile device (like a laptop computer) are made visible via the Hybrid Proxy mechanism, then when those services becomevisibilevisible in a domain such as "My House.example.com" that might indicate to (potentially hostile) observers that the mobile device is in my house. When those services disappear from "My House.example.com" that change could be used by observers to infer when the mobile device (and possibly its owner) may have left the house. The privacy of this information may be protected using techniques like firewalls and split-view DNS, as are customarily used today to protect the privacy of corporate DNS information.8.3.9.3. Denial of Service A remote attacker could use a rapid series of unique Unicast DNS queries to induce a Hybrid Proxy to generate a rapid series of corresponding Multicast DNS queries on one or more of its local links. Multicast traffic is expensive -- especially on Wi-Fi links -- which makes this attack particularly serious. To limit the damage that can be caused by such attacks, a Hybrid Proxy (or the underlying Multicast DNS subsystem which it utilizes) MUST implement Multicast DNS query rate limiting appropriate to the link technology in question. For Wi-Fi links the Multicast DNS subsystem SHOULD NOT issue more than 20 Multicast DNS query packets per second. On other link technologies like Gigabit Ethernet higher limits may be appropriate.9.10. Intelectual Property Rights Apple has submitted an IPR disclosure concerning the technique proposed in this document. Details are available on the IETF IPR disclosure page [IPR2119].10.11. IANA Considerations This document has no IANA Considerations.11.12. Acknowledgments Thanks to Markus Stenberg for helping develop the policy regarding the four styles of unicast response according to what data is immediately available in the cache. Thanks to AndersBrandtBrandt, Tim Chown, Ralph Droms, Ray Hunter, Ted Lemon, Tom Pusateri, Markus Stenberg, Dave Thaler, and Andrew Yourtchenko for their comments. [Partial list; more names to be added.]12.13. References12.1.13.1. Normative References [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", STD 13, RFC 1034, DOI 10.17487/RFC1034, November 1987, <http://www.rfc-editor.org/info/rfc1034>. [RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, November 1987, <http://www.rfc-editor.org/info/rfc1035>. [RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., J. de Groot, G., and E. Lear, "Address Allocation for Private Internets", BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996, <http://www.rfc-editor.org/info/rfc1918>. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>. [RFC2308] Andrews, M., "Negative Caching of DNS Queries (DNS NCACHE)", RFC 2308, DOI 10.17487/RFC2308, March 1998, <http://www.rfc-editor.org/info/rfc2308>. [RFC3927] Cheshire, S., Aboba, B., and E. Guttman, "Dynamic Configuration of IPv4 Link-Local Addresses", RFC 3927, DOI 10.17487/RFC3927, May 2005, <http://www.rfc-editor.org/info/rfc3927>. [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless Address Autoconfiguration", RFC 4862, DOI 10.17487/ RFC4862, September 2007, <http://www.rfc-editor.org/info/rfc4862>. [RFC5198] Klensin, J. and M. Padlipsky, "Unicode Format for Network Interchange", RFC 5198, DOI 10.17487/RFC5198, March 2008, <http://www.rfc-editor.org/info/rfc5198>. [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, December 2012. [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service Discovery", RFC 6763, December 2012. [I-D.ietf-dnssd-push] Pusateri, T. and S. Cheshire, "DNS Push Notifications", draft-ietf-dnssd-push-03 (work in progress), November 2015.12.2.13.2. Informative References [HOME] Cheshire, S., "Special Use Top Level Domain 'home'", draft-cheshire-homenet-dot-home (work in progress), November 2015. [IPR2119] "Apple Inc.'s Statement about IPR related to Hybrid Unicast/Multicast DNS-Based Service Discovery", <https://datatracker.ietf.org/ipr/2119/>. [ohp] "Hybrid Proxy implementation for OpenWrt", <https://github.com/sbyx/ohybridproxy/>. [I-D.sekar-dns-llq] Sekar, K., "DNS Long-Lived Queries", draft-sekar-dns-llq-01 (work in progress), August 2006. [I-D.ietf-homenet-hncp] Stenberg, M., Barth, S., and P. Pfister, "Home Networking Control Protocol", draft-ietf-homenet-hncp-09 (work in progress), August 2015. [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, "Dynamic Updates in the Domain Name System (DNS UPDATE)", RFC 2136, DOI 10.17487/RFC2136, April 1997, <http://www.rfc-editor.org/info/rfc2136>. [RFC3007] Wellington, B., "Secure Domain Name System (DNS) Dynamic Update", RFC 3007, DOI 10.17487/RFC3007, November 2000, <http://www.rfc-editor.org/info/rfc3007>. [RFC6760] Cheshire, S. and M. Krochmal, "Requirements for a Protocol to Replace the AppleTalk Name Binding Protocol (NBP)", RFC 6760, December 2012. [ZC] Cheshire, S. and D. Steinberg, "Zero Configuration Networking: The Definitive Guide", O'Reilly Media, Inc. , ISBN 0-596-10100-7, December 2005. Author's Address Stuart Cheshire Apple Inc. 1 Infinite Loop Cupertino, California 95014 USA Phone: +1 408 974 3207 Email: cheshire@apple.com