idnits 2.17.1 draft-ietf-dnssd-update-lease-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 123 has weird spacing: '...in name empt...' == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (24 April 2022) is 727 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Obsolete informational reference (is this intentional?): RFC 2845 (Obsoleted by RFC 8945) == Outdated reference: A later version (-25) exists of draft-ietf-dnssd-srp-12 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force S. Cheshire 3 Internet-Draft Apple Inc. 4 Intended status: Standards Track T. Lemon 5 Expires: 26 October 2022 Apple Inc 6 24 April 2022 8 An EDNS0 option to negotiate Leases on DNS Updates 9 draft-ietf-dnssd-update-lease-01 11 Abstract 13 This document proposes a new EDNS0 option that can be used by DNS 14 Update clients and DNS servers to include a lease lifetime in a DNS 15 Update or response, allowing a server to garbage collect stale 16 resource records that have been added by DNS Updates 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at https://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on 26 October 2022. 35 Copyright Notice 37 Copyright (c) 2022 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 42 license-info) in effect on the date of publication of this document. 43 Please review these documents carefully, as they describe your rights 44 and restrictions with respect to this document. Code Components 45 extracted from this document must include Revised BSD License text as 46 described in Section 4.e of the Trust Legal Provisions and are 47 provided without warranty as described in the Revised BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 2. Conventions and Terminology Used in this Document . . . . . . 3 53 3. Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 4. Update Message Format . . . . . . . . . . . . . . . . . . . . 3 55 5. Refresh Messages . . . . . . . . . . . . . . . . . . . . . . 4 56 5.1. Coalescing Refresh Messages . . . . . . . . . . . . . . . 4 57 5.2. Refresh Message Format . . . . . . . . . . . . . . . . . 5 58 5.3. Server Behavior . . . . . . . . . . . . . . . . . . . . . 5 59 6. Garbage Collection . . . . . . . . . . . . . . . . . . . . . 5 60 7. Security Considerations . . . . . . . . . . . . . . . . . . . 5 61 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 62 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 6 63 10. Normative References . . . . . . . . . . . . . . . . . . . . 6 64 11. Informative References . . . . . . . . . . . . . . . . . . . 6 65 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 67 1. Introduction 69 Dynamic DNS Update [RFC2136] allows for a mapping from a persistent 70 hostname to a dynamic IP address. This capability is particularly 71 beneficial to mobile hosts, whose IP address may frequently change 72 with location. However, the mobile nature of such hosts often means 73 that dynamically updated resource records are not properly deleted. 74 Consider, for instance, a mobile user who publishes address records 75 via dynamic update. If this user moves their laptop out of range of 76 the Wi-Fi access point, the address record containing stale 77 information may remain on the server indefinitely. An extension to 78 Dynamic Update is thus required to tell the server to automatically 79 delete resource records if they are not refreshed after a period of 80 time. 82 Note that overloading the resource record TTL [RFC1035] is not 83 appropriate for purposes of garbage collection. Data that is 84 susceptible to frequent change or invalidation, thus requiring a 85 garbage collection mechanism, needs a relatively short resource 86 record TTL to avoid polluting intermediate DNS caches with stale 87 data. Using this TTL, short enough to minimize stale cached data, as 88 a garbage collection lease lifetime would result in an unacceptable 89 amount of network traffic due to refreshes (see Section 5 "Refresh 90 Messages"). 92 2. Conventions and Terminology Used in this Document 94 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 95 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 96 "OPTIONAL" in this document are to be interpreted as described in 97 "Key words for use in RFCs to Indicate Requirement Levels", when, and 98 only when, they appear in all capitals, as shown here [RFC2119] 99 [RFC8174]. 101 3. Mechanisms 103 The EDNS0 Update Lease option is included in a standard DNS Update 104 message [RFC2136] within an EDNS(0) OPT pseudo-RR [RFC6891] with a 105 new OPT and RDATA format proposed here. Encoding the Update Lease 106 Lifetime in an OPT RR requires minimal modification to a name 107 server's front-end, and will cause servers that do not implement this 108 extension to automatically return a descriptive error (NOTIMPL). 110 4. Update Message Format 112 Dynamic DNS Update Leases Requests and Responses are formatted as 113 standard DNS Dynamic Update messages [RFC2136], with the addition of 114 a single OPT RR in the Additional section. Note that if a TSIG 115 resource record is to be added to authenticate the update [RFC2845], 116 the TSIG RR should appear *after* the OPT RR, allowing the message 117 digest in the TSIG to cover the OPT RR. 119 The OPT RR is formatted as follows: 121 Field Name Field Type Description 122 ---------------------------------------------------------------- 123 NAME domain name empty (root domain) 124 TYPE u_int16_t OPT 125 CLASS u_int16_t 0 126 TTL u_int32_t 0 127 RDLEN u_int16_t describes RDATA 128 RDATA byte stream (see below) 130 RDATA Format: 132 Field Name Field Type Description 133 ---------------------------------------------------------------- 134 OPTION-CODE u_int16_t UPDATE-LEASE (2) 135 OPTION-LENGTH u_int16_t 4 or 8 136 LEASE u_int32_t desired lease (request) or 137 granted lease (response), in seconds 138 KEY-LEASE u_int32_t optional desired (or granted) 139 lease for KEY records, in seconds 140 Figure 1 142 Update Requests contain, in the LEASE field of the OPT RDATA, an 143 unsigned 32-bit integer indicating the lease lifetime, in seconds, 144 desired by the client, represented in network (big-endian) byte 145 order. In Update Responses, this field contains the actual lease 146 granted by the server. The lease granted by the server may be less 147 than, greater than, or equal to the value requested by the client. 148 To reduce network and server load, a minimum lease of 30 minutes 149 (1800 seconds) is RECOMMENDED. Leases are expected to be 150 sufficiently long as to make timer discrepancies (due to transmission 151 latency, etc.) between a client and server negligible. Clients that 152 expect the updated records to be relatively static MAY request 153 appropriately longer leases. Servers MAY grant relatively longer or 154 shorter leases to reduce network traffic due to refreshes, or reduce 155 stale data, respectively. 157 There are two variants of the EDNS(0) UPDATE-LEASE option, the basic 158 (4-byte) variant and the extended (8-byte) variant. 160 In the basic (4-byte) variant, the LEASE indicated in the OPT RR 161 applies to all resource records in the Update section. 163 In the extended (8-byte) variant, the Update Lease communicates two 164 lease lifetimes. The LEASE indicated in the OPT RR applies to all 165 resource records in the Update section *except* for KEY records. The 166 KEY-LEASE indicated in the OPT RR applies to KEY records in the 167 Update section. This variant is used specifically for supporting the 168 DNS-SD Service Registration Protocol [I-D.ietf-dnssd-srp]. 170 5. Refresh Messages 172 Resource records not to be deleted by the server MUST be refreshed by 173 the client before the lease elapses. Clients SHOULD refresh resource 174 records after 75% of the original lease has elapsed. If the client 175 uses UDP and does not receive a response from the server, the client 176 SHOULD re-try after 2 seconds. The client SHOULD continue to re-try, 177 doubling the length of time between each re-try, or re-try using TCP. 179 5.1. Coalescing Refresh Messages 181 If the client has sent multiple updates to a single server, the 182 client MAY include refreshes for all valid updates to that server in 183 a single message. This effectively places all records for a client 184 on the same expiration schedule, reducing network traffic due to 185 refreshes. In doing so, the client includes in the refresh message 186 all existing updates to the server, including those not yet close to 187 expiration, so long as at least one resource record in the message 188 has elapsed at least 75% of its original lease. If the client uses 189 UDP, the client MUST NOT coalesce refresh messages if doing so would 190 cause truncation of the message; in this case, multiple messages or 191 TCP should be used. 193 5.2. Refresh Message Format 195 Refresh messages are formatted like Dynamic Update Leases Requests 196 and Responses (see Section 4 "Update Message Format"). The resource 197 records to be refreshed are contained in the Update section. These 198 same resource records are repeated in the Prerequisite section, as an 199 "RRSet exists (value dependent)" prerequisite [RFC2136]. An OPT RR 200 is the last resource record in the Additional section (except for a 201 TSIG record, which, if required, follows the OPT RR). The OPT RR 202 contains the desired new lease on Requests, and the actual granted 203 lease on Responses. The Update Lease indicated in the OPT RR applies 204 to all resource records in the Update section. 206 5.3. Server Behavior 208 Upon receiving a valid Refresh Request, the server MUST send an 209 acknowledgment. This acknowledgment is identical to the Update 210 Response format described in Section 4 "Update Message Format", and 211 contains the new lease of the resource records being refreshed. If 212 no records in the Refresh Request have completed 50% of their leases, 213 the server SHOULD NOT refresh the records; the response should 214 contain the smallest remaining (unrefreshed) lease of all records in 215 the refresh message. The server MUST NOT increment the SOA serial 216 number of a zone as the result of a refresh. 218 6. Garbage Collection 220 If the Update Lease of a resource record elapses without being 221 refreshed, the server MUST NOT return the expired record in answers 222 to queries. The server MAY delete the record from its database. 224 7. Security Considerations 226 When DNS Update is enabled on an authoritative server, the Security 227 Considerations of that specification [RFC2136] should be considered. 229 The addition of a record lifetime to facilitate automated garbage 230 collection does not itself add any significant new security concerns. 232 8. IANA Considerations 234 The EDNS(0) OPTION CODE 2 has already been assigned for this DNS 235 extension. No additional IANA services are required by this 236 document. 238 9. Acknowledgments 240 Thanks to Marc Krochmal and Kiren Sekar to their work in 2006 on the 241 precursor to this document. Thanks also to Roger Pantos and Chris 242 Sharp for their contributions. 244 10. Normative References 246 [RFC1035] Mockapetris, P., "Domain names - implementation and 247 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 248 November 1987, . 250 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 251 Requirement Levels", BCP 14, RFC 2119, 252 DOI 10.17487/RFC2119, March 1997, 253 . 255 [RFC2136] Vixie, P., Ed., Thomson, S., Rekhter, Y., and J. Bound, 256 "Dynamic Updates in the Domain Name System (DNS UPDATE)", 257 RFC 2136, DOI 10.17487/RFC2136, April 1997, 258 . 260 [RFC6891] Damas, J., Graff, M., and P. Vixie, "Extension Mechanisms 261 for DNS (EDNS(0))", STD 75, RFC 6891, 262 DOI 10.17487/RFC6891, April 2013, 263 . 265 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 266 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 267 May 2017, . 269 11. Informative References 271 [RFC2845] Vixie, P., Gudmundsson, O., Eastlake 3rd, D., and B. 272 Wellington, "Secret Key Transaction Authentication for DNS 273 (TSIG)", RFC 2845, DOI 10.17487/RFC2845, May 2000, 274 . 276 [I-D.ietf-dnssd-srp] 277 Lemon, T. and S. Cheshire, "Service Registration Protocol 278 for DNS-Based Service Discovery", Work in Progress, 279 Internet-Draft, draft-ietf-dnssd-srp-12, 24 October 2021, 280 . 283 Authors' Addresses 285 Stuart Cheshire 286 Apple Inc. 287 One Apple Park Way 288 Cupertino, California 95014 289 United States of America 290 Phone: +1 408 974 3207 291 Email: cheshire@apple.com 293 Ted Lemon 294 Apple Inc 295 P.O. Box 958 296 Brattleboro, Vermont 05302 297 United States of America 298 Email: mellon@fugue.com