idnits 2.17.1 draft-ietf-dnsind-rfc2052bis-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-26) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** The abstract seems to contain references ([RFC1035], [STD2], [RFC2181], [RFC2219]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 7 instances of lines with non-RFC2606-compliant FQDNs in the document. == There are 8 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. ** The document seems to lack a both a reference to RFC 2119 and 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? RFC 2119 keyword, line 120: '...ty of this target host. A client MUST...' RFC 2119 keyword, line 123: '... SHOULD be tried in an order de...' RFC 2119 keyword, line 130: '... one first SHOULD be proportiona...' RFC 2119 keyword, line 139: '...rget, the client SHOULD implement the ...' RFC 2119 keyword, line 161: '...ame of the target host. There MUST be...' (6 more instances...) == The 'Obsoletes: ' line in the draft header should list only the _numbers_ of the RFCs which will be obsoleted by this document (if approved); it should not include the word 'RFC' in the list. -- The abstract seems to indicate that this document obsoletes RFC2181, but the header doesn't have an 'Obsoletes:' line to match this. Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (January 1999) is 9233 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) -- Missing reference section? 'RFC 2219' on line 38 looks like a reference -- Missing reference section? 'STD 2' on line 86 looks like a reference -- Missing reference section? 'RFC 1035' on line 116 looks like a reference -- Missing reference section? 'RFC2181' on line 320 looks like a reference Summary: 8 errors (**), 0 flaws (~~), 4 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Applications Area Arnt Gulbrandsen 3 INTERNET-DRAFT Troll Technologies 4 Paul Vixie 5 Obsoletes: RFC 2052 Internet Software Consortium 6 January 1999 8 A DNS RR for specifying the location of services (DNS SRV) 10 Status of this Memo 12 This document is an Internet-Draft. Internet-Drafts are working 13 documents of the Internet Engineering Task Force (IETF), its areas, 14 and its working groups. Note that other groups may also distribute 15 working documents as Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six months 18 and may be updated, replaced, or obsoleted by other documents at any 19 time. It is inappropriate to use Internet-Drafts as reference 20 material or to cite them other than as "work in progress." 22 To view the entire list of current Internet-Drafts, please check the 23 "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow 24 Directories on ftp.is.co.za (Africa), ftp.nordu.net (Northern 25 Europe), ftp.nis.garr.it (Southern Europe), munnari.oz.au (Pacific 26 Rim), ftp.ietf.org (US East Coast), or ftp.isi.edu (US West Coast). 28 Abstract 30 This document describes a DNS RR which specifies the location of the 31 server(s) for a specific protocol and domain (like a more general 32 form of MX). 34 Overview and rationale 36 Currently, one must either know the exact address of a server to 37 contact it, or broadcast a question. This has led to, for example, 38 ftp.whatever.com aliases [RFC 2219], the SMTP-specific MX RR, and 39 using MAC-level broadcasts to locate servers. 41 The SRV RR allows administrators to use several servers for a single 42 domain, to move services from host to host with little fuss, and to 43 designate some hosts as primary servers for a service and others as 44 backups. 46 Clients ask for a specific service/protocol for a specific domain 47 (the word domain is used here in the strict RFC 1034 sense), and get 48 back the names of any available servers. 50 RFC 2052bis DNS SRV RR January 1999 52 Note that where this document refers to "address records", it means A 53 RR's, AAAA RR's, or their most modern equivalent. 55 Introductory example 57 If a SRV-cognizant web-browser wants to retrieve 59 http://www.example.com/ 61 it does a lookup of 63 _http._tcp.www.example.com 65 and retrieves the document from one of the servers in the reply. The 66 example zone file near the end of this memo contains answering RRs 67 for this query. 69 Definitions 71 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT" and "MAY" 72 used in this document are to be interpreted as specified in BCP 14. 73 Other terms used in this document are defined in the DNS 74 specification, RFC 1034. 76 The format of the SRV RR 78 Here is the format of the SRV RR, whose DNS type code is 33: 80 _Service._Proto.Name TTL Class SRV Priority Weight Port Target 82 (There is an example near the end of this document.) 84 Service 85 The symbolic name of the desired service, as defined in Assigned 86 Numbers [STD 2] or locally. An underscore (_) is prepended to 87 the service identifier to avoid collisions with DNS labels that 88 occur in nature. 90 Some widely used services, notably POP, don't have a single 91 universal name. If Assigned Numbers names the service 92 indicated, that name is the only name which is legal for SRV 93 lookups. Only locally defined services may be named locally. 94 The Service is case insensitive. 96 Proto 97 The symbolic name of the desired protocol, with an underscore 98 (_) prepended to prevent collisions with DNS labels that occur 100 RFC 2052bis DNS SRV RR January 1999 102 in nature. _TCP and _UDP are at present the most useful values 103 for this field, though any name defined by Assigned Numbers or 104 locally may be used (as for Service). The Proto is case 105 insensitive. 107 Name 108 The domain this RR refers to. The SRV RR is unique in that the 109 name one searches for is not this name; the example near the end 110 shows this clearly. 112 TTL 113 Standard DNS meaning [RFC 1035]. 115 Class 116 Standard DNS meaning [RFC 1035]. SRV records occur in the IN 117 Class. 119 Priority 120 As for MX, the priority of this target host. A client MUST 121 attempt to contact the target host with the lowest-numbered 122 priority it can reach; target hosts with the same priority 123 SHOULD be tried in an order defined by the weight field. The 124 range is 0-65535. This is a 16 bit binary integer in network 125 byte order. 127 Weight 128 A load balancing mechanism. When selecting a target host among 129 the those that have the same priority, the chance of trying this 130 one first SHOULD be proportional to its weight, as specified 131 below. Larger weights lead to a higher probability of being 132 selected. The range of this number is 0-65535. This is a 16 133 bit binary integer in network byte order. Domain administrators 134 are urged to use Weight 0 when there isn't any load balancing to 135 do, to make the RR easier to read for humans (less noisy). In 136 the presence records containing weights greater than 0, records 137 with weight 0 have a very small chance of being selected. 139 To choose the target, the client SHOULD implement the effect of 140 this algorithm. This permits administrators to plan weights to 141 achieve the load distribution desired. Each time a target is 142 needed, the client should order the remaining (not previously 143 used) SRV RRs at the current priority in any random fashion, 144 except placing all those with weight 0 at the beginning of the 145 list. Compute the sum of the weights of those RRs, and with 146 each RR associate the running sum in the selected order. Then 147 choose a random number (not necessarily of integral value) 148 between 0 and the sum computed (inclusive), and select the RR 149 whose running sum value is the first in the selected order which 151 RFC 2052bis DNS SRV RR January 1999 153 is greater than or equal to the random number selected. 155 Port 156 The port on this target host of this service. The range is 157 0-65535. This is a 16 bit binary integer in network byte order. 158 This is often as specified in Assigned Numbers but need not be. 160 Target 161 As for MX, the domain name of the target host. There MUST be 162 one or more address records for this name, the name MUST NOT be 163 an alias (in the sense of RFC 1034 or RFC 2181). Implementors 164 are urged, but not required, to return the address record(s) in 165 the Additional Data section. Unless and until permitted by 166 future standards action, name compression is not to be used for 167 this field. 169 A Target of "." means that the service is decidedly not 170 available at this domain. 172 Applicability Statement 174 In general, it is expected that SRV records will be used by clients 175 for applications where the relevant protocol specification indicates 176 that clients should use the SRV record. The examples in this 177 document use familiar protocols as an aid in understanding. It is 178 not intended that those protocols will necessarily use SRV records. 180 Domain administrator advice 182 Expecting everyone to update their client applications when the first 183 internet site adds a SRV RR for some server is futile (even if 184 desirable). Therefore SRV would have to coexist with address record 185 lookups for existing protocols, and DNS administrators should try to 186 provide address records to support old clients: 188 - Where the services for a single domain are spread over several 189 hosts, it seems advisable to have a list of address records at 190 the same DNS node as the SRV RR, listing reasonable (if perhaps 191 suboptimal) fallback hosts for Telnet, NNTP and other protocols 192 likely to be used with this name. Note that some programs only 193 try the first address they get back from e.g. gethostbyname(), 194 and we don't know how widespread this behavior is. 196 - Where one service is provided by several hosts, one can either 197 provide address records for all the hosts (in which case the 198 round-robin mechanism, where available, will share the load 199 equally) or just for one (presumably the fastest). 201 RFC 2052bis DNS SRV RR January 1999 203 - If a host is intended to provide a service only when the main 204 server(s) is/are down, it probably shouldn't be listed in 205 address records. 207 - Hosts that are referenced by backup address records must use the 208 port number specified in Assigned Numbers for the service. 210 - Designers of future protocols for which "secondary servers" is 211 not useful (or meaningful) may choose to not use SRV's support 212 for secondary servers. Clients for such protocols may use or 213 ignore SRV RRs with Priority higher than the RR with the lowest 214 Priority for a domain. 216 Currently there's a practical limit of 512 bytes for DNS replies. 217 Until all resolvers can handle larger responses, domain 218 administrators are strongly advised to keep their SRV replies below 219 512 bytes. 221 All round numbers, wrote Dr. Johnson, are false, and these numbers 222 are very round: A reply packet has a 30-byte overhead plus the name 223 of the service ("_telnet._tcp.example.com" for instance); each SRV RR 224 adds 20 bytes plus the name of the target host; each NS RR in the NS 225 section is 15 bytes plus the name of the name server host; and 226 finally each A RR in the additional data section is 20 bytes or so, 227 and there are A's for each SRV and NS RR mentioned in the answer. 228 This size estimate is extremely crude, but shouldn't underestimate 229 the actual answer size by much. If an answer may be close to the 230 limit, using a DNS query tool (e.g. "dig") to look at the actual 231 answer is a good idea. 233 The "Weight" field 235 Weight, the load balancing field, is not quite satisfactory, but the 236 actual load on typical servers changes much too quickly to be kept 237 around in DNS caches. It seems to the authors that offering 238 administrators a way to say "this machine is three times as fast as 239 that one" is the best that can practically be done. 241 The only way the authors can see of getting a "better" load figure is 242 asking a separate server when the client selects a server and 243 contacts it. For short-lived services like SMTP an extra step in the 244 connection establishment seems too expensive, and for long-lived 245 services like telnet, the load figure may well be thrown off a minute 246 after the connection is established when someone else starts or 247 finishes a heavy job. 249 RFC 2052bis DNS SRV RR January 1999 251 The Port number 253 Currently, the translation from service name to port number happens 254 at the client, often using a file such as /etc/services. 256 Moving this information to the DNS makes it less necessary to update 257 these files on every single computer of the net every time a new 258 service is added, and makes it possible to move standard services out 259 of the "root-only" port range on unix. 261 Usage rules 263 A SRV-cognizant client SHOULD use this procedure to locate a list of 264 servers and connect to the preferred one: 266 Do a lookup for QNAME=_service._protocol.target, QCLASS=IN, 267 QTYPE=SRV. 269 If the reply is NOERROR, ANCOUNT>0 and there is at least one SRV 270 RR which specifies the requested Service and Protocol in the 271 reply: 273 If there is precisely one SRV RR, and its Target is "." 274 (the root domain), abort. 276 Else, for all such RR's, build a list of (Priority, Weight, 277 Target) tuples 279 Sort the list by priority (lowest number first) 281 Create a new empty list 283 For each distinct priority level 284 While there are still elements left at this priority 285 level 286 Select an element randomly, with probability 287 Weight, as specified above, and move it to the 288 tail of the new list 290 For each element in the new list 292 query the DNS for address records for the Target or 293 use any such records found in the Additional Data 294 section of the earlier SRV response. 296 for each address record found, try to connect to the 297 (protocol, address, service). 299 RFC 2052bis DNS SRV RR January 1999 301 else if the service desired is SMTP (and SMTP has been defined 302 elsewhere to expect SRV lookups) 304 skip to RFC 974 (MX). 306 else 308 Do a lookup for QNAME=target, QCLASS=IN, QTYPE=A 310 for each address record found, try to connect to the 311 (protocol, address, service) 313 Notes: 315 - Port numbers SHOULD NOT be used in place of the symbolic service 316 or protocol names (for the same reason why variant names cannot 317 be allowed: Applications would have to do two or more lookups). 319 - If a truncated response comes back from an SRV query, the rules 320 described in [RFC2181] shall apply. 322 - A client MAY use means other than Weight to choose among target 323 hosts with equal Priority. 325 - A client MUST parse all of the RR's in the reply. 327 - If the Additional Data section doesn't contain address records 328 for all the SRV RR's and the client may want to connect to the 329 target host(s) involved, the client MUST look up the address 330 record(s). (This happens quite often when the address record 331 has shorter TTL than the SRV or NS RR's.) 333 - Future protocols could be designed to use SRV RR lookups as the 334 means by which clients locate their servers. 336 Fictional example 338 This is (part of) the zone file for example.com, a still-unused 339 domain: 341 $ORIGIN example.com. 342 @ SOA server.example.com. root.example.com. ( 343 1995032001 3600 3600 604800 86400 ) 344 NS server.example.com. 345 NS ns1.ip-provider.net. 346 NS ns2.ip-provider.net. 348 RFC 2052bis DNS SRV RR January 1999 350 _ftp._tcp SRV 0 0 21 server.example.com. 351 _finger._tcp SRV 0 0 79 server.example.com. 352 ; telnet - use old-slow-box or new-fast-box if either is 353 ; available, make three quarters of the logins go to 354 ; new-fast-box. 355 _telnet._tcp SRV 0 1 23 old-slow-box.example.com. 356 SRV 0 3 23 new-fast-box.example.com. 357 ; if neither old-slow-box or new-fast-box is up, switch to 358 ; using the sysdmin's box and the server 359 SRV 1 0 23 sysadmins-box.example.com. 360 SRV 1 0 23 server.example.com. 361 ; HTTP - server is the main server, new-fast-box is the backup 362 ; (On new-fast-box, the HTTP daemon runs on port 8000) 363 _http._tcp SRV 0 0 80 server.example.com. 364 SRV 10 0 8000 new-fast-box.example.com. 365 ; since we want to support both http://example.com/ and 366 ; http://www.example.com/ we need the next two RRs as well 367 _http._tcp.www SRV 0 0 80 server.example.com. 368 SRV 10 0 8000 new-fast-box.example.com. 369 ; SMTP - mail goes to the server, and to the IP provider if 370 ; the net is down 371 _smtp._tcp SRV 0 0 25 server.example.com. 372 SRV 1 0 25 mailhost.ip-provider.net. 373 @ MX 0 server.example.com. 374 MX 1 mailhost.ip-provider.net. 375 ; NNTP - use the IP provider's NNTP server 376 _nntp._tcp SRV 0 0 119 nntphost.ip-provider.net. 377 ; IDB is an locally defined protocol 378 _idb._tcp SRV 0 0 2025 new-fast-box.example.com. 379 ; addresses 380 server A 172.30.79.10 381 old-slow-box A 172.30.79.11 382 sysadmins-box A 172.30.79.12 383 new-fast-box A 172.30.79.13 384 ; backup address records - new-fast-box and old-slow-box are 385 ; included, naturally, and server is too, but might go 386 ; if the load got too bad 387 @ A 172.30.79.10 388 A 172.30.79.11 389 A 172.30.79.13 390 ; backup address record for www.example.com 391 www A 172.30.79.10 392 ; NO other services are supported 393 *._tcp SRV 0 0 0 . 394 *._udp SRV 0 0 0 . 396 In this example, a telnet connection to "example.com." needs an SRV 397 lookup of "_telnet._tcp.example.com." and possibly A lookups of "new- 399 RFC 2052bis DNS SRV RR January 1999 401 fast-box.example.com." and/or the other hosts named. The size of the 402 SRV reply is approximately 365 bytes: 404 30 bytes general overhead 405 20 bytes for the query string, "_telnet._tcp.example.com." 406 130 bytes for 4 SRV RR's, 20 bytes each plus the lengths of "new- 407 fast-box", "old-slow-box", "server" and "sysadmins-box" - 408 "example.com" in the query section is quoted here and doesn't 409 need to be counted again. 410 75 bytes for 3 NS RRs, 15 bytes each plus the lengths of "server", 411 "ns1.ip-provider.net." and "ns2" - again, "ip-provider.net." is 412 quoted and only needs to be counted once. 413 120 bytes for the 6 address records (assuming IPv4 only) mentioned 414 by the SRV and NS RR's. 416 IANA Considerations 418 The IANA has assigned RR type value 33 to the SRV RR. No other IANA 419 services are required by this document. 421 Changes from RFC 2052 423 This document obsoletes RFC 2052. The major change from that 424 previous, experimental, version of this specification is that now the 425 protocol and service labels are prepended with an underscore, to 426 lower the probability of an accidental clash with a similar name used 427 for unrelated purposes. Aside from that, changes are only intended 428 to increase the clarity and completeness of the document. 430 Security Considerations 432 The authors believes this RR to not cause any new security problems. 433 Some problems become more visible, though. 435 - The ability to specify ports on a fine-grained basis obviously 436 changes how a router can filter packets. It becomes impossible 437 to block internal clients from accessing specific external 438 services, slightly harder to block internal users from running 439 unauthorized services, and more important for the router 440 operations and DNS operations personnel to cooperate. 442 - There is no way a site can keep its hosts from being referenced 443 as servers (as, indeed, some sites become unwilling secondary 444 MXes today). This could lead to denial of service. 446 - With SRV, DNS spoofers can supply false port numbers, as well as 448 RFC 2052bis DNS SRV RR January 1999 450 host names and addresses. Because this vunerability exists 451 already, with names and addresses, this is not a new 452 vunerability, merely a slightly extended one, with little 453 practical effect. 455 References 457 STD 2: Reynolds, J., Postel, J., "Assigned Numbers", STD 2, RFC 1700, 458 October 1994 (as currently updated by the IANA). 460 RFC 1034: Mockapetris, P., "Domain names - concepts and facilities", 461 STD 13, RFC 1034, November 1987. 463 RFC 1035: Mockapetris, P., "Domain names - Implementation and 464 Specification", STD 13, RFC 1035, November 1987. 466 RFC 974: Partridge, C., "Mail routing and the domain system", RFC 467 974, January 1986. 469 BCP 14: Bradner, S., "Key words for use in RFCs to Indicate 470 Requirement Levels", BCP 14, RFC 2119, March 1997. 472 RFC 2181: Elz, R., Bush, R., "Clarifications to the DNS 473 Specification", RFC 2181, July 1997 475 RFC 2219: Hamilton, M., Wright, R., "Use of DNS Aliases for Network 476 Services", BCP 17, RFC 2219, October 1997 478 Acknowledgements 480 The algorithm used to select from the weighted SRV RRs of equal 481 priority is adapted from one supplied by Dan Bernstein. 483 Authors' Addresses 485 Arnt Gulbrandsen Paul Vixie 486 Troll Tech Internet Software Consortium 487 Postboks 6133 Etterstad 950 Charter Street 488 N-0602 Oslo, Norway Redwood City, CA 94063 489 +47 22646966 +1 650 779 7001 490