--- 1/draft-ietf-dnssd-push-06.txt 2016-04-04 11:16:10.752871857 -0700 +++ 2/draft-ietf-dnssd-push-07.txt 2016-04-04 11:16:10.816873450 -0700 @@ -1,19 +1,19 @@ Internet Engineering Task Force T. Pusateri Internet-Draft Seeking affiliation Intended status: Standards Track S. Cheshire -Expires: September 22, 2016 Apple Inc. - March 21, 2016 +Expires: October 6, 2016 Apple Inc. + April 4, 2016 DNS Push Notifications - draft-ietf-dnssd-push-06 + draft-ietf-dnssd-push-07 Abstract The Domain Name System (DNS) was designed to return matching records efficiently for queries for data that is relatively static. When those records change frequently, DNS is still efficient at returning the updated results when polled. But there exists no mechanism for a client to be asynchronously notified when these changes occur. This document defines a mechanism for a client to be notified of such changes to DNS records, called DNS Push Notifications. @@ -26,21 +26,21 @@ 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 on September 22, 2016. + This Internet-Draft will expire on October 6, 2016. 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 @@ -48,55 +48,55 @@ 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 3 - 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 5 + 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Transport . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.1. Client-Initiated Termination . . . . . . . . . . . . . . 7 - 4.2. Server-Initiated Termination . . . . . . . . . . . . . . 7 - 5. State Considerations . . . . . . . . . . . . . . . . . . . . 9 - 6. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 10 - 6.1. Discovery . . . . . . . . . . . . . . . . . . . . . . . . 11 - 6.2. DNS Push Notification SUBSCRIBE . . . . . . . . . . . . . 13 - 6.3. DNS Push Notification UNSUBSCRIBE . . . . . . . . . . . . 18 - 6.4. DNS Push Notification Update Messages . . . . . . . . . . 19 - 6.5. DNS RECONFIRM . . . . . . . . . . . . . . . . . . . . . . 22 - 6.6. DNS Push Notification Termination Message . . . . . . . . 24 - 7. Security Considerations . . . . . . . . . . . . . . . . . . . 26 - 7.1. Security Services . . . . . . . . . . . . . . . . . . . . 26 - 7.2. TLS Name Authentication . . . . . . . . . . . . . . . . . 27 - 7.3. TLS Compression . . . . . . . . . . . . . . . . . . . . . 27 - 7.4. TLS Session Resumption . . . . . . . . . . . . . . . . . 27 - 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 - 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 - 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 28 - 10.1. Normative References . . . . . . . . . . . . . . . . . . 28 - 10.2. Informative References . . . . . . . . . . . . . . . . . 30 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 + 4.2. Server-Initiated Termination . . . . . . . . . . . . . . 9 + 5. State Considerations . . . . . . . . . . . . . . . . . . . . 11 + 6. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 12 + 6.1. Discovery . . . . . . . . . . . . . . . . . . . . . . . . 13 + 6.2. DNS Push Notification SUBSCRIBE . . . . . . . . . . . . . 15 + 6.3. DNS Push Notification UNSUBSCRIBE . . . . . . . . . . . . 20 + 6.4. DNS Push Notification Update Messages . . . . . . . . . . 21 + 6.5. DNS RECONFIRM . . . . . . . . . . . . . . . . . . . . . . 24 + 6.6. DNS Push Notification Termination Message . . . . . . . . 25 + 7. Security Considerations . . . . . . . . . . . . . . . . . . . 28 + 7.1. Security Services . . . . . . . . . . . . . . . . . . . . 28 + 7.2. TLS Name Authentication . . . . . . . . . . . . . . . . . 28 + 7.3. TLS Compression . . . . . . . . . . . . . . . . . . . . . 29 + 7.4. TLS Session Resumption . . . . . . . . . . . . . . . . . 29 + 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 + 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 29 + 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 + 10.1. Normative References . . . . . . . . . . . . . . . . . . 30 + 10.2. Informative References . . . . . . . . . . . . . . . . . 31 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 1. Introduction DNS records may be updated using DNS Update [RFC2136]. Other mechanisms such as a Hybrid Proxy [I-D.ietf-dnssd-hybrid] can also generate changes to a DNS zone. This document specifies a protocol for Unicast DNS clients to subscribe to receive asynchronous notifications of changes to RRSets of interest. It is immediately relevant in the case of DNS Service Discovery [RFC6763] but is not limited to that use case, and provides a general DNS mechanism for DNS record change notifications. Familiarity with the DNS protocol - and DNS packet formats is assumed [RFC1034] [RFC1035] [RFC6195]. + and DNS packet formats is assumed [RFC1034] [RFC1035] [RFC6895]. 1.1. Requirements Language 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 words for use in RFCs to Indicate Requirement Levels" [RFC2119]. 2. Motivation @@ -153,20 +153,26 @@ them to press the "Print" button again when they wake their phone up. A DNS Push Notification client MUST NOT routinely keep a DNS Push Notification subscription active 24 hours a day 7 days a week just to keep a list in memory up to date so that it will be really fast if the user does choose to bring up an on-screen display of that data. DNS Push Notifications are designed to be fast enough that there is no need to pre-load a "warm" list in memory just in case it might be needed later. + Generally, a client SHOULD NOT keep a connection to a server open + indefinitely if it has no active subscriptions on that connection. + After 30 seconds with no active subscriptions the client SHOULD close + the idle connection, and, if needed in the future, open a new + connection. + 3. Overview The existing DNS Update protocol [RFC2136] provides a mechanism for clients to add or delete individual resource records (RRs) or entire resource record sets (RRSets) on the zone's server. This specification adopts a simplified subset of these existing syntax and semantics, and uses them for DNS Push Notification messages going in the opposite direction, from server to client, to communicate changes to a zone. The client subscribes for Push @@ -211,22 +217,21 @@ class "IN", as it is today with existing DNS servers and clients. A DNS Push Notification server MAY choose to implement only DNS class "IN". 4. Transport Implementations of DNS Update [RFC2136] MAY use either User Datagram Protocol (UDP) [RFC0768] or Transmission Control Protocol (TCP) [RFC0793] as the transport protocol, in keeping with the historical precedent that DNS queries must first be sent over UDP [RFC1123]. - This requirement to use UDP has subsequently been relaxed - [RFC5966][I-D.ietf-dnsop-5966bis]. + This requirement to use UDP has subsequently been relaxed [RFC7766]. In keeping with the more recent precedent, DNS Push Notification is defined only for TCP. DNS Push Notification clients MUST use TLS over TCP. Connection setup over TCP ensures return reachability and alleviates concerns of state overload at the server through anonymous subscriptions. All subscribers are guaranteed to be reachable by the server by virtue of the TCP three-way handshake. Because TCP SYN flooding attacks are possible with any protocol over TCP, @@ -245,44 +250,82 @@ Section 7.2 for details. A DNS Push Notification session begins with a client connecting to a DNS Push Notification server. Over that connection the client then issues DNS operation requests, such as SUBSCRIBE. 4.1. Client-Initiated Termination An individual subscription is terminated by sending an UNSUBSCRIBE message for that specific subscription, or all subscriptions can be - cancelled at once by the client closing the connection with a TCP - RST. When a client terminates an individual subscription (via - UNSUBSCRIBE) or all subscriptions on that connection (by closing the - connection) it is signalling to the server that it is longer - interested in receiving those particular updates. It is informing - the server that the server may release any state information it has - been keeping with regards to these particular subscriptions. + cancelled at once by the client closing the connection. When a + client terminates an individual subscription (via UNSUBSCRIBE) or all + subscriptions on that connection (by closing the connection) it is + signalling to the server that it is longer interested in receiving + those particular updates. It is informing the server that the server + may release any state information it has been keeping with regards to + these particular subscriptions. After terminating its last subscription on a connection via - UNSUBSCRIBE, a client MAY close the connection immediately with a TCP - FIN, or it may keep it open if it anticipates performing further - operations on that connection in the future. If a client wishes to - keep an idle connection open, it MUST meet its keepalive obligations + UNSUBSCRIBE, a client MAY close the connection immediately, or it may + keep it open if it anticipates performing further operations on that + connection in the future. If a client wishes to keep an idle + connection open, it MUST continue to meet its keepalive obligations [I-D.ietf-dnsop-edns-tcp-keepalive] or the server is entitled to close the connection (see below). If a client plans to terminate one or more subscriptions on a connection and doesn't intend to keep that connection open, then as an efficiency optimization it MAY instead choose to simply close the - connection with a TCP RST, which implicitly terminates all - subscriptions on that connection. This may occur because the client - computer is being shut down, is going to sleep, the application - requiring the subscriptions has terminated, or simply because the - last active subscription on that connection has been cancelled. + connection, which implicitly terminates all subscriptions on that + connection. This may occur because the client computer is being shut + down, is going to sleep, the application requiring the subscriptions + has terminated, or simply because the last active subscription on + that connection has been cancelled. + + When closing a connection, a client will generally do an abortive + disconnect, sending a TCP RST. This immediately discards all + remaining inbound and outbound data, which is appropriate if the + client no longer has any interest in this data. In the BSD sockets + API, sending a TCP RST is achieved by setting the SO_LINGER option + with a time of 0 seconds and then closing the socket. + + If a client has performed operations on this connection that it would + not want lost (like DNS updates) then the client SHOULD do an orderly + disconnect, sending a TCP FIN. In the BSD sockets API, sending a TCP + FIN is achieved by calling "shutdown(s,SHUT_WR)" and keeping the + socket open until all remaining data has been read from it. + + In the first SUBSCRIBE response on a connection, the server MUST + include an explicit EDNS(0) TCP Keepalive option. If the first + SUBSCRIBE response does not include an explicit EDNS(0) TCP Keepalive + option this is an error and the client MUST immediately close the TCP + connection and not attempt any further DNS Push Notification requests + to that server until one hour has passed. This situation may occur + if a client connects to a server that doesn't implement DNS Push + Notifications at all, and it is important not to burden such servers + with continuous retries. + + Upon receiving an error response from the server, a client SHOULD NOT + close the connection. An error relating to one particular operation + on a connection does not necessarily imply that all other operations + on that connection have also failed, or that future operations will + fail. The client should assume that the server will make its own + decision about whether or not to close the connection, based on the + server's determination of whether the error condition pertains to + this particular operation, or would also apply to any subsequent + operations. If the server does not close the connection then the + client SHOULD continue to use that connection for subsequent + operations. + + Upon receiving a Termination Message from the server (see below), a + client MUST immediately close the connection. 4.2. Server-Initiated Termination If a client makes a connection and then fails to send any DNS message that uses EDNS(0) TCP Keepalive [I-D.ietf-dnsop-edns-tcp-keepalive] (either SUBSCRIBE, where Keepalive is implicit, or some other DNS message, with an explicit an EDNS(0) TCP Keepalive option) then after 30 seconds of inactivity the server SHOULD close the connection. If no data has been sent on the connection the server MAY abort the connection with a TCP RST. If data has been sent on the connection @@ -290,34 +333,37 @@ so that the data is reliably delivered. In the response to the first successful SUBSCRIBE, the included EDNS(0) TCP Keepalive option specifies the idle timeout so that the client knows the frequency of traffic it must generate to keep the connection alive. If the idle timeout for that connection changes, then the server communicates this by placing an updated EDNS(0) TCP Keepalive option in a subsequent message to the client. At both servers and clients, the generation or reception of any - request, response, update, or keepalive message resets the keepalive - timer for that connection. + complete request, response, update, or keepalive message resets the + keepalive timer for that connection. In the absence of any requests, responses, or update messages on a connection, a client MUST generate keepalive traffic before the idle timeout expires, or the server is entitled to close the connection. If a client disconnects from the network abruptly, without closing its connection, the server learns of this after failing to receive further traffic from that client. If no requests, responses, update messages or keepalive traffic occurs on a connection for 1.5 times the idle timeout, then this indicates that the client is probably no longer on the network, and the server SHOULD abort the connection - with a TCP RST. + with a TCP RST. The time before the server closes the connection is + intentionally 50% longer than the time before the client is required + to generate keepalive traffic, to allow for differences in clock rate + and network propagation delays. [We need to discuss the nature of "the required keepalives". Are they TCP-layer keepalives? DNS-layer keepalives? There is currently no DNS-layer keepalive or 'no-op' operation defined. What would that operation be? A DNS QUERY containing zero questions? A DNS SUBSCRIBE containing zero questions? An "empty" DNS message over the TCP connection (just a pair of zero bytes, signifying a zero-length message)? One benefit of TCP-layer keepalives is that they transmit fewer bytes, and involve less software overhead for processing those bytes. Another benefit is that it is more feasible to implement @@ -329,23 +375,29 @@ layer keepalives, and an API for a server to request the networking stack to inform it when TCP-layer keepalives are not received by the required deadline. TCP-layer keepalives also only verify liveness of the remote networking stack, whereas DNS-layer keepalives provide higher assurance of liveness of the remote server application software -- though this a limited benefit, since there is no reason to expect that DNS Push Notification server software will routinely become wedged and unresponsive.] After sending an error response to a client, the server MAY close the - connection with a TCP FIN. + connection with a TCP FIN, or may allow the connection to remain + open. For error conditions that only affect the single operation in + question, the server SHOULD return an error response to the client + and leave the connection open for further operations. For error + conditions that are likely to make all operations unsuccessful in the + immediate future, the server SHOULD return an error response to the + client and then close the connection with a TCP FIN. - If the server is overloaded and needs to shed load, it MAY send a + If the server is overloaded and needs to shed load, it SHOULD send a Termination Message to the client and close the connection with a TCP FIN. Apart from the cases described above, a server MUST NOT close a connection with a DNS Push Notification client, except in extraordinary error conditions. Closing the connection is the client's responsibility, to be done at the client's discretion, when it so chooses. A DNS Push Notification server only closes a DNS Push Notification connection under exceptional circumstances, such as when the server application software or underlying operating system is @@ -434,48 +486,58 @@ However, server implementers and operators should be aware that this connection sharing may not be possible in all cases. A single client device may be home to multiple independent client software instances that don't know about each other, so a DNS Push Notification server MUST be prepared to accept multiple connections from the same client IP address. This is undesirable from an efficiency standpoint, but may be unavoidable in some situations, so a DNS Push Notification server MUST be prepared to accept multiple connections from the same client IP address. + Clients SHOULD silently ignore unrecognized messages (both requests + and responses) over the TLS/TCP connection. For example, UNSUBSCRIBE + and RECONFIRM currently generate no response, but if future versions + of this specification change that, existing clients SHOULD silently + ignore these unexpected responses. This allows for backwards + compatibility with future enhancements. + 6.1. Discovery The first step in DNS Push Notification subscription is to discover an appropriate DNS server that supports DNS Push Notifications for the desired zone. The client MUST also determine which TCP port on the server is listening for connections, which need not be (and often - is not) the typical TCP port 53 used for conventional DNS. + is not) the typical TCP port 53 used for conventional DNS, or TCP + port 853 used for DNS over TLS [I-D.ietf-dprive-dns-over-tls]. 1. The client begins the discovery by sending a DNS query to the local resolver with record type SOA [RFC1035] for the name of the record it wishes to subscribe. 2. If the SOA record exists, it MUST be returned in the Answer - Section of the reply. If not, the local resolver SHOULD include - the SOA record for the zone of the requested name in the + Section of the response. If not, the local resolver SHOULD + include the SOA record for the zone of the requested name in the Authority Section. 3. If no SOA record is returned, the client then strips off the leading label from the requested name. If the resulting name has at least one label in it, the client sends a new SOA query and processing continues at step 2 above. If the resulting name is empty (the root label) then this is a network configuration error and the client gives up. The client MAY retry the operation at a later time. - 4. Once the SOA is known, the client sends a DNS query with type SRV - [RFC2782] for the record name "_dns-push-tls._tcp.", where - is the owner name of the discovered SOA record. + 4. Once the SOA is known (either by virtue of being seen in the + Answer Section, or in the Authority Section), the client sends a + DNS query with type SRV [RFC2782] for the record name + "_dns-push-tls._tcp.", where is the owner name of + the discovered SOA record. 5. If the zone in question does not offer DNS Push Notifications then SRV record MUST NOT exist and the SRV query will return a negative answer. 6. If the zone in question is set up to offer DNS Push Notifications then this SRV record MUST exist. The SRV "target" contains the name of the server providing DNS Push Notifications for the zone. The port number on which to contact the server is in the SRV record "port" field. The address(es) of the target host MAY be @@ -504,26 +566,55 @@ A DNS Push Notification client indicates its desire to receive DNS Push Notifications for a given domain name by sending a SUBSCRIBE request over the established TCP connection to the server. A SUBSCRIBE request is formatted identically to a conventional DNS QUERY request [RFC1035], except that the opcode is SUBSCRIBE (6) instead of QUERY (0). If neither QTYPE nor QCLASS are ANY (255) then this is a specific subscription to changes for the given name, type and class. If one or both of QTYPE or QCLASS are ANY (255) then this subscription matches any type and/or any class, as appropriate. + NOTE: A little-known quirk of DNS is that in DNS QUERY requests, + QTYPE and QCLASS 255 mean "ANY" not "ALL". They indicate that the + server should respond with ANY matching records of its choosing, not + necessarily ALL matching records. This can lead to some surprising + and unexpected results, were a query returns some valid answers but + not all of them, and makes QTYPE=ANY queries less useful than people + sometimes imagine. + + When used in conjunction with DNS SUBSCRIBE, QTYPE and QCLASS 255 + should be interpreted to mean "ALL", not "ANY". After accepting a + subscription where one or both of QTYPE or QCLASS are 255, the server + MUST send Push Notification Updates for ALL record changes that match + the subscription, not just some of them. + In a SUBSCRIBE request the DNS Header QR bit MUST be zero. If the QR bit is not zero the message is not a SUBSCRIBE request. - The AA, TC, RD, RA, Z, AD, and CD bits, the ID field, and the RCODE - field, MUST be zero on transmission, and MUST be silently ignored on - reception. + The AA, TC, RD, RA, Z, AD, and CD bits, and the RCODE field, MUST be + zero on transmission, and MUST be silently ignored on reception. + + The ID field may be set to any value of the client's choosing, and + the server MUST echo this value back in the response message. The + client is not required to select unique ID values; it is permissible + to use the same value (e.g., zero) for all operations. Since the + name, qtype, and qclass are sufficient to uniquely identify a + SUBSCRIBE operation on a connection, the name, qtype, and qclass in a + SUBSCRIBE response are sufficient to correlate a response with its + corresponding request. However, for convenience, the client may put + any value it chooses in the ID field of the SUBSCRIBE request, and + the server MUST echo that value back unchanged in the SUBSCRIBE + response. Note that the ID field of Push Notification Update + Messages is always zero, since a Push Notification Update Message + could potentially match more than one subscription, or could relate + to a subscription that the client has just cancelled with an + UNSUBSCRIBE message. Like a DNS QUERY request, a SUBSCRIBE request MUST contain exactly one question. Since SUBSCRIBE requests are sent over TCP, multiple SUBSCRIBE requests can be concatenated in a single TCP stream and packed efficiently into TCP segments, so the ability to pack multiple SUBSCRIBE operations into a single DNS message within that TCP stream would add extra complexity for little benefit. ANCOUNT MUST be zero, and the Answer Section MUST be empty. Any records in the Answer Section MUST be silently ignored. @@ -564,36 +655,40 @@ Since all SUBSCRIBE operations are implicitly long-lived operations, the server MUST interpret a SUBSCRIBE request as if it contained an EDNS(0) TCP Keepalive option [I-D.ietf-dnsop-edns-tcp-keepalive]. A client MUST NOT include an actual EDNS(0) TCP Keepalive option in the request, since it is automatic, and implied by the semantics of SUBSCRIBE. If a server receives a SUBSCRIBE request that does contain an actual EDNS(0) TCP Keepalive option this is an error and the server MUST immediately close the TCP connection. A SUBSCRIBE operation MAY include an explicit EDNS(0) [RFC6891] OPT - record where necessary to carry additional information. + record where necessary to carry additional EDNS(0) information other + than a TCP Keepalive option. The presence of a SUBSCRIBE operation on a connection indicates to the server that the client fully implements EDNS(0) [RFC6891], and can correctly understand any response that conforms to that specification. After receiving a SUBSCRIBE request, the server MAY include OPT record in any of its responses, as needed. Each SUBSCRIBE request generates exactly one SUBSCRIBE response from the server. In a SUBSCRIBE response the DNS Header QR bit MUST be one. If the QR bit is not one the message is not a SUBSCRIBE response. - The AA, TC, RD, RA, Z, AD, and CD bits, and the ID field, MUST be - zero on transmission, and MUST be silently ignored on reception. + The AA, TC, RD, RA, Z, AD, and CD bits, MUST be zero on transmission, + and MUST be silently ignored on reception. + + The ID field MUST echo the value given in the ID field of the + SUBSCRIBE request. The Question Section MUST echo back the values provided by the client in the SUBSCRIBE request that generated this SUBSCRIBE response. ANCOUNT MUST be zero, and the Answer Section MUST be empty. Any records in the Answer Section MUST be silently ignored. If the subscription was accepted and there are positive answers for the requested name, type and class, then these positive answers MUST be communicated to the client in an immediately following Push Notification Update, not in the Answer Section of the SUBSCRIBE @@ -654,21 +749,21 @@ with continuous retries. The server MAY include EDNS(0) TCP Keepalive options in subsequent messages, if the idle timeout changes. If the client receives subsequent messages that do not contain an explicit EDNS(0) TCP Keepalive option then the idle timeout for that connection remains unchanged at that time. In an error response, with nonzero RCODE, the server MUST contain an EDNS(0) TCP Keepalive option specifying the delay before the client - tries again: + submits further requests to this server: For RCODE = 1 (FORMERR) the delay may be any value selected by the implementer. A value of one minute is RECOMMENDED, to avoid high load from defective clients. For RCODE = 2 (SERVFAIL), which occurs due to resource exhaustion, the delay should be chosen according to the level of server overload and the anticipated duration of that overload. By default, a value of one minute is RECOMMENDED. @@ -702,23 +797,29 @@ "_dns-push-tls._tcp." SRV record, but the server itself is not currently configured to support DNS Push Notifications for that zone. Since it is possible that the misconfiguration may be repaired at any time, the retry delay should not be set too high. By default, a value of 5 minutes is RECOMMENDED. For other RCODE values, the retry delay should be set by the server as appropriate for that error condition. By default, a value of 5 minutes is RECOMMENDED. + For RCODE = 9 (NOTAUTH), the time delay applies to requests for other + names falling within the same zone. Requests for names falling + within other zones are not subject to the delay. For all other + RCODEs the time delay applies to all subsequent requests to this + server. + After sending an error response the server MAY close the TCP - connection with a FIN, or MAY allow it to remain open. Clients MUST - correctly handle both cases. + connection with a FIN, or MAY allow it to remain open, depending on + the nature of the error. Clients MUST correctly handle both cases. 6.3. DNS Push Notification UNSUBSCRIBE To cancel an individual subscription without closing the entire connection, the client sends an UNSUBSCRIBE message over the established TCP connection to the server. The UNSUBSCRIBE message is formatted identically to the SUBSCRIBE message which created the subscription, with the exact same name, type and class, except that the opcode is UNSUBSCRIBE (7) instead of SUBSCRIBE (6). @@ -939,21 +1040,27 @@ 6.6. DNS Push Notification Termination Message If a server is low on resources it MAY simply terminate a client connection with a TCP RST. However, the likely behaviour of the client may be simply to reconnect immediately, putting more burden on the server. Therefore, a server SHOULD instead choose to shed client load by (a) sending a DNS Push Notification Termination Message and then (b) immediately closing the client connection with a TCP FIN instead of RST, thereby facilitating reliable delivery of the - Termination Message. + Termination Message. Upon successful reception of the Termination + Message the client is expected to close the connection. The server + SHOULD set a timer and, if the client has not closed the connection + within a reasonable time, the server SHOULD then terminate the TCP + connection with a TCP RST. The RECOMMENDED time the server should + wait before terminating the TCP connection with a TCP RST is ten + seconds. The format of a Termination Message is similar to a Push Notification Update. The following figure shows the existing DNS Update header format: 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ID | @@ -1031,22 +1138,22 @@ the EDNS(0) TCP Keepalive option's idle timeout MAY be zero, indicating that the client SHOULD attempt to re-establish its subscriptions immediately. In the case where a server is terminating a large number of connections at once (e.g., if the system is restarting) and the server doesn't want to be inundated with a flood of simultaneous retries, it SHOULD send different EDNS(0) TCP Keepalive values to each client. These adjustments MAY be selected randomly, pseudorandomly, or deterministically (e.g., incrementing the time - value by one for each successive client, yielding a post-restart - reconnection rate of ten clients per second). + value by one tenth of a second for each successive client, yielding a + post-restart reconnection rate of ten clients per second). 7. Security Considerations TLS support is REQUIRED in DNS Push Notifications. There is no provision for opportunistic encryption using a mechanism like "STARTTLS". DNSSEC is RECOMMENDED for DNS Push Notifications. TLS alone does not provide complete security. TLS certificate verification can provide reasonable assurance that the client is really talking to the server @@ -1123,42 +1230,36 @@ This document defines three DNS OpCodes: SUBSCRIBE with (tentative) value 6, UNSUBSCRIBE with (tentative) value 7, and RECONFIRM with (tentative) value 8. 9. Acknowledgements The authors would like to thank Kiren Sekar and Marc Krochmal for previous work completed in this field. This draft has been improved due to comments from Ran Atkinson, Tim - Chown, Mark Delany, Ralph Droms, Bernie Holz, Jan Komissar, Manju - Shankar Rao, Markus Stenberg, and Dave Thaler. + Chown, Mark Delany, Ralph Droms, Bernie Volz, Jan Komissar, Manju + Shankar Rao, Markus Stenberg, Dave Thaler, and Soraia Zlatkovic. 10. References 10.1. Normative References - [I-D.ietf-dnsop-5966bis] - Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and - D. Wessels, "DNS Transport over TCP - Implementation - Requirements", draft-ietf-dnsop-5966bis-06 (work in - progress), January 2016. - [I-D.ietf-dnsop-edns-tcp-keepalive] Wouters, P., Abley, J., Dickinson, S., and R. Bellis, "The edns-tcp-keepalive EDNS0 Option", draft-ietf-dnsop-edns- tcp-keepalive-06 (work in progress), February 2016. [I-D.ietf-tls-tls13] Rescorla, E., "The Transport Layer Security (TLS) Protocol - Version 1.3", draft-ietf-tls-tls13-11 (work in progress), - December 2015. + Version 1.3", draft-ietf-tls-tls13-12 (work in progress), + March 2016. [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, DOI 10.17487/RFC0768, August 1980, . [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, DOI 10.17487/RFC0793, September 1981, . [RFC1034] Mockapetris, P., "Domain names - concepts and facilities", @@ -1182,76 +1283,83 @@ [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, . [RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, DOI 10.17487/RFC2782, February 2000, . - [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", RFC - 4953, DOI 10.17487/RFC4953, July 2007, - . - [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/ RFC5246, August 2008, . - [RFC5966] Bellis, R., "DNS Transport over TCP - Implementation - Requirements", RFC 5966, DOI 10.17487/RFC5966, August - 2010, . - [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) Extensions: Extension Definitions", RFC 6066, DOI 10.17487/RFC6066, January 2011, . - [RFC6195] Eastlake 3rd, D., "Domain Name System (DNS) IANA - Considerations", RFC 6195, DOI 10.17487/RFC6195, March - 2011, . - [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms for DNS (EDNS(0))", STD 75, RFC 6891, DOI 10.17487/ RFC6891, April 2013, . + [RFC6895] Eastlake 3rd, D., "Domain Name System (DNS) IANA + Considerations", BCP 42, RFC 6895, DOI 10.17487/RFC6895, + April 2013, . + [RFC7673] Finch, T., Miller, M., and P. Saint-Andre, "Using DNS- Based Authentication of Named Entities (DANE) TLSA Records with SRV Records", RFC 7673, DOI 10.17487/RFC7673, October 2015, . + [RFC7766] Dickinson, J., Dickinson, S., Bellis, R., Mankin, A., and + D. Wessels, "DNS Transport over TCP - Implementation + Requirements", RFC 7766, DOI 10.17487/RFC7766, March 2016, + . + 10.2. Informative References [I-D.ietf-dnssd-hybrid] Cheshire, S., "Hybrid Unicast/Multicast DNS-Based Service Discovery", draft-ietf-dnssd-hybrid-03 (work in progress), November 2015. + [I-D.ietf-dprive-dns-over-tls] + Zi, Z., Zhu, L., Heidemann, J., Mankin, A., Wessels, D., + and P. Hoffman, "Specification for DNS over TLS", draft- + ietf-dprive-dns-over-tls-09 (work in progress), March + 2016. + [I-D.sekar-dns-llq] Sekar, K., "DNS Long-Lived Queries", draft-sekar-dns- llq-01 (work in progress), August 2006. [IPJ.9-4-TCPSYN] Eddy, W., "Defenses Against TCP SYN Flooding Attacks", The Internet Protocol Journal, Cisco Systems, Volume 9, Number 4, December 2006. [RFC1996] Vixie, P., "A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)", RFC 1996, DOI 10.17487/RFC1996, August 1996, . [RFC4287] Nottingham, M., Ed. and R. Sayre, Ed., "The Atom Syndication Format", RFC 4287, DOI 10.17487/RFC4287, December 2005, . + [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", RFC + 4953, DOI 10.17487/RFC4953, July 2007, + . + [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, "Transport Layer Security (TLS) Session Resumption without Server-Side State", RFC 5077, DOI 10.17487/RFC5077, January 2008, . [RFC6762] Cheshire, S. and M. Krochmal, "Multicast DNS", RFC 6762, DOI 10.17487/RFC6762, February 2013, . [RFC6763] Cheshire, S. and M. Krochmal, "DNS-Based Service