As per Relevance of the word document, we have this rfc below:











Network Working Group A.
Request for Comments: 2782 Troll
Obsoletes: 2052 P.
Category: Standards Track Internet Software
L.
Microsoft Corp
February 2000


A DNS RR for specifying the location of services (DNS SRV

Status of this

This document specifies an Internet standards track protocol for
Internet community, and requests discussion and suggestions
improvements. Please refer to the current edition of the "
Official Protocol Standards" (STD 1) for the standardization
and status of this protocol. Distribution of this memo is unlimited

Copyright

Copyright (C) The Internet Society (2000). All Rights Reserved



This document describes a DNS RR which specifies the location of
server(s) for a specific protocol and domain

Overview and

Currently, one must either know the exact address of a server
contact it, or broadcast a question

The SRV RR allows administrators to use several servers for a
domain, to move services from host to host with little fuss, and
designate some hosts as primary servers for a service and others
backups

Clients ask for a specific service/protocol for a specific
(the word domain is used here in the strict RFC 1034 sense), and
back the names of any available servers

Note that where this document refers to "address records", it means
RR's, AAAA RR's, or their most modern equivalent







Gulbrandsen, et al. Standards Track [Page 1]

RFC 2782 DNS SRV RR February 2000




The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT" and "MAY
used in this document are to be interpreted as specified in [BCP 14].
Other terms used in this document are defined in the
specification, RFC 1034.

Applicability

In general, it is expected that SRV records will be used by
for applications where the relevant protocol specification
that clients should use the SRV record. Such specification
define the symbolic name to be used in the Service field of the
record as described below. It also MUST include
considerations. Service SRV records SHOULD NOT be used in the
of such specification

Introductory

If a SRV-cognizant LDAP client wants to discover a LDAP server
supports TCP protocol and provides LDAP service for the
example.com., it does a lookup

_ldap._tcp.example.

as described in [ARM]. The example zone file near the end of
memo contains answering RRs for an SRV query

Note: LDAP is chosen as an example for illustrative purposes only
and the LDAP examples used in this document should not be
a definitive statement on the recommended way for LDAP to use
records. As described in the earlier applicability section,
the appropriate LDAP documents for the recommended procedures

The format of the SRV

Here is the format of the SRV RR, whose DNS type code is 33:

_Service._Proto.Name TTL Class SRV Priority Weight Port

(There is an example near the end of this document.)


The symbolic name of the desired service, as defined in
Numbers [STD 2] or locally. An underscore (_) is prepended
the service identifier to avoid collisions with DNS labels
occur in nature




Gulbrandsen, et al. Standards Track [Page 2]

RFC 2782 DNS SRV RR February 2000


Some widely used services, notably POP, don't have a
universal name. If Assigned Numbers names the
indicated, that name is the only name which is legal for
lookups. The Service is case insensitive


The symbolic name of the desired protocol, with an
(_) prepended to prevent collisions with DNS labels that
in nature. _TCP and _UDP are at present the most useful
for this field, though any name defined by Assigned Numbers
locally may be used (as for Service). The Proto is
insensitive


The domain this RR refers to. The SRV RR is unique in that
name one searches for is not this name; the example near the
shows this clearly


Standard DNS meaning [RFC 1035].


Standard DNS meaning [RFC 1035]. SRV records occur in the
Class


The priority of this target host. A client MUST attempt
contact the target host with the lowest-numbered priority it
reach; target hosts with the same priority SHOULD be tried in
order defined by the weight field. The range is 0-65535.
is a 16 bit unsigned integer in network byte order


A server selection mechanism. The weight field specifies
relative weight for entries with the same priority.
weights SHOULD be given a proportionately higher probability
being selected. The range of this number is 0-65535. This is
16 bit unsigned integer in network byte order.
administrators SHOULD use Weight 0 when there isn't any
selection to do, to make the RR easier to read for humans (
noisy). In the presence of records containing weights
than 0, records with weight 0 should have a very small chance
being selected

In the absence of a protocol whose specification calls for
use of other weighting information, a client arranges the
RRs of the same Priority in the order in which target hosts




Gulbrandsen, et al. Standards Track [Page 3]

RFC 2782 DNS SRV RR February 2000


specified by the SRV RRs, will be contacted. The
algorithm SHOULD be used to order the SRV RRs of the
priority

To select a target to be contacted next, arrange all SRV
(that have not been ordered yet) in any order, except that
those with weight 0 are placed at the beginning of the list

Compute the sum of the weights of those RRs, and with each
associate the running sum in the selected order. Then choose
uniform random number between 0 and the sum
(inclusive), and select the RR whose running sum value is
first in the selected order which is greater than or equal
the random number selected. The target host specified in
selected SRV RR is the next one to be contacted by the client
Remove this SRV RR from the set of the unordered SRV RRs
apply the described algorithm to the unordered SRV RRs to
the next target host. Continue the ordering process until
are no unordered SRV RRs. This process is repeated for
Priority


The port on this target host of this service. The range is 0-
65535. This is a 16 bit unsigned integer in network byte order
This is often as specified in Assigned Numbers but need not be


The domain name of the target host. There MUST be one or
address records for this name, the name MUST NOT be an alias (
the sense of RFC 1034 or RFC 2181). Implementors are urged,
not required, to return the address record(s) in the
Data section. Unless and until permitted by future
action, name compression is not to be used for this field

A Target of "." means that the service is decidedly
available at this domain

Domain administrator

Expecting everyone to update their client applications when the
server publishes a SRV RR is futile (even if desirable).
SRV would have to coexist with address record lookups for
protocols, and DNS administrators should try to provide
records to support old clients

- Where the services for a single domain are spread over
hosts, it seems advisable to have a list of address records
the same DNS node as the SRV RR, listing reasonable (if



Gulbrandsen, et al. Standards Track [Page 4]

RFC 2782 DNS SRV RR February 2000


suboptimal) fallback hosts for Telnet, NNTP and other
likely to be used with this name. Note that some programs
try the first address they get back from e.g. gethostbyname(),
and we don't know how widespread this behavior is

- Where one service is provided by several hosts, one can
provide address records for all the hosts (in which case
round-robin mechanism, where available, will share the
equally) or just for one (presumably the fastest).

- If a host is intended to provide a service only when the
server(s) is/are down, it probably shouldn't be listed
address records

- Hosts that are referenced by backup address records must use
port number specified in Assigned Numbers for the service

- Designers of future protocols for which "secondary servers"
not useful (or meaningful) may choose to not use SRV's
for secondary servers. Clients for such protocols may use
ignore SRV RRs with Priority higher than the RR with the
Priority for a domain

Currently there's a practical limit of 512 bytes for DNS replies
Until all resolvers can handle larger responses,
administrators are strongly advised to keep their SRV replies
512 bytes

All round numbers, wrote Dr. Johnson, are false, and these
are very round: A reply packet has a 30-byte overhead plus the
of the service ("_ldap._tcp.example.com" for instance); each SRV
adds 20 bytes plus the name of the target host; each NS RR in the
section is 15 bytes plus the name of the name server host;
finally each A RR in the additional data section is 20 bytes or so
and there are A's for each SRV and NS RR mentioned in the answer
This size estimate is extremely crude, but shouldn't
the actual answer size by much. If an answer may be close to
limit, using a DNS query tool (e.g. "dig") to look at the
answer is a good idea

The "Weight"

Weight, the server selection field, is not quite satisfactory,
the actual load on typical servers changes much too quickly to
kept around in DNS caches. It seems to the authors that
administrators a way to say "this machine is three times as fast
that one" is the best that can practically be done




Gulbrandsen, et al. Standards Track [Page 5]

RFC 2782 DNS SRV RR February 2000


The only way the authors can see of getting a "better" load figure
asking a separate server when the client selects a server
contacts it. For short-lived services an extra step in
connection establishment seems too expensive, and for long-
services, the load figure may well be thrown off a minute after
connection is established when someone else starts or finishes
heavy job

Note: There are currently various experiments at providing
network proximity estimation, available bandwidth estimation,
similar services. Use of the SRV record with such facilities, and
particular the interpretation of the Weight field when
facilities are used, is for further study. Weight is only
for static, not dynamic, server selection. Using SRV weight
dynamic server selection would require assigning unreasonably
TTLs to the SRV RRs, which would limit the usefulness of the
caching mechanism, thus increasing overall network load
decreasing overall reliability. Server selection via SRV is
intended to express static information such as "this server has
faster CPU than that one" or "this server has a much better
connection than that one".

The Port

Currently, the translation from service name to port number
at the client, often using a file such as /etc/services

Moving this information to the DNS makes it less necessary to
these files on every single computer of the net every time a
service is added, and makes it possible to move standard services
of the "root-only" port range on unix

Usage

A SRV-cognizant client SHOULD use this procedure to locate a list
servers and connect to the preferred one

Do a lookup for QNAME=_service._protocol.target, QCLASS=IN
QTYPE=SRV

If the reply is NOERROR, ANCOUNT>0 and there is at least
SRV RR which specifies the requested Service and Protocol
the reply

If there is precisely one SRV RR, and its Target is "."
(the root domain), abort





Gulbrandsen, et al. Standards Track [Page 6]

RFC 2782 DNS SRV RR February 2000


Else, for all such RR's, build a list of (Priority, Weight
Target)

Sort the list by priority (lowest number first

Create a new empty

For each distinct priority
While there are still elements left at this


Select an element as specified above, in
description of Weight in "The format of the
RR" Section, and move it to the tail of the


For each element in the new

query the DNS for address records for the Target
use any such records found in the Additional
section of the earlier SRV response

for each address record found, try to connect to
(protocol, address, service).



Do a lookup for QNAME=target, QCLASS=IN, QTYPE=

for each address record found, try to connect to
(protocol, address, service

Notes

- Port numbers SHOULD NOT be used in place of the symbolic
or protocol names (for the same reason why variant names
be allowed: Applications would have to do two or more lookups).

- If a truncated response comes back from an SRV query, the
described in [RFC 2181] shall apply

- A client MUST parse all of the RR's in the reply

- If the Additional Data section doesn't contain address
for all the SRV RR's and the client may want to connect to
target host(s) involved, the client MUST look up the
record(s). (This happens quite often when the address
has shorter TTL than the SRV or NS RR's.)



Gulbrandsen, et al. Standards Track [Page 7]

RFC 2782 DNS SRV RR February 2000


- Future protocols could be designed to use SRV RR lookups as
means by which clients locate their servers

Fictional

This example uses fictional service "foobar" as an aid
understanding SRV records. If ever service "foobar" is implemented
it is not intended that it will necessarily use SRV records. This
(part of) the zone file for example.com, a still-unused domain

$ORIGIN example.com
@ SOA server.example.com. root.example.com. (
1995032001 3600 3600 604800 86400 )
NS server.example.com
NS ns1.ip-provider.net
NS ns2.ip-provider.net
; foobar - use old-slow-box or new-fast-box if either
; available, make three quarters of the logins go
; new-fast-box
_foobar._tcp SRV 0 1 9 old-slow-box.example.com
SRV 0 3 9 new-fast-box.example.com
; if neither old-slow-box or new-fast-box is up, switch
; using the sysdmin's box and the
SRV 1 0 9 sysadmins-box.example.com
SRV 1 0 9 server.example.com
server A 172.30.79.10
old-slow-box A 172.30.79.11
sysadmins-box A 172.30.79.12
new-fast-box A 172.30.79.13
; NO other services are
*._tcp SRV 0 0 0 .
*._udp SRV 0 0 0 .



















Gulbrandsen, et al. Standards Track [Page 8]

RFC 2782 DNS SRV RR February 2000


In this example, a client of the "foobar" service in
"example.com." domain needs an SRV lookup
"_foobar._tcp.example.com." and possibly A lookups of "new-fast
box.example.com." and/or the other hosts named. The size of the
reply is approximately 365 bytes

30 bytes general
20 bytes for the query string, "_foobar._tcp.example.com."
130 bytes for 4 SRV RR's, 20 bytes each plus the lengths of "new
fast-box", "old-slow-box", "server" and "sysadmins-box" -
"example.com" in the query section is quoted here and doesn'
need to be counted again
75 bytes for 3 NS RRs, 15 bytes each plus the lengths of "server",
"ns1.ip-provider.net." and "ns2" - again, "ip-provider.net."
quoted and only needs to be counted once
120 bytes for the 6 address records (assuming IPv4 only)
by the SRV and NS RR's

IANA

The IANA has assigned RR type value 33 to the SRV RR. No other
services are required by this document

Changes from RFC 2052

This document obsoletes RFC 2052. The major change from
previous, experimental, version of this specification is that now
protocol and service labels are prepended with an underscore,
lower the probability of an accidental clash with a similar name
for unrelated purposes. Aside from that, changes are only
to increase the clarity and completeness of the document.
document especially clarifies the use of the Weight field of the
records

Security

The authors believe this RR to not cause any new security problems
Some problems become more visible, though

- The ability to specify ports on a fine-grained basis
changes how a router can filter packets. It becomes
to block internal clients from accessing specific
services, slightly harder to block internal users from
unauthorized services, and more important for the
operations and DNS operations personnel to cooperate

- There is no way a site can keep its hosts from being
as servers. This could lead to denial of service



Gulbrandsen, et al. Standards Track [Page 9]

RFC 2782 DNS SRV RR February 2000


- With SRV, DNS spoofers can supply false port numbers, as well
host names and addresses. Because this vulnerability
already, with names and addresses, this is not a
vulnerability, merely a slightly extended one, with
practical effect



STD 2: Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
1700, October 1994.

RFC 1034: Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, November 1987.

RFC 1035: Mockapetris, P., "Domain names - Implementation
Specification", STD 13, RFC 1035, November 1987.

RFC 974: Partridge, C., "Mail routing and the domain system",
14, RFC 974, January 1986.

BCP 14: Bradner, S., "Key words for use in RFCs to
Requirement Levels", BCP 14, RFC 2119, March 1997.

RFC 2181: Elz, R. and R. Bush, "Clarifications to the
Specification", RFC 2181, July 1997.

RFC 2219: Hamilton, M. and R. Wright, "Use of DNS Aliases for
Services", BCP 17, RFC 2219, October 1997.

BCP 14: Bradner, S., "Key words for use in RFCs to
Requirement Levels", BCP 14, RFC 2119, March 1997.

ARM: Armijo, M., Esibov, L. and P. Leach, "Discovering
Services with DNS", Work in Progress

KDC-DNS: Hornstein, K. and J. Altman, "Distributing Kerberos KDC
Realm Information with DNS", Work in Progress














Gulbrandsen, et al. Standards Track [Page 10]

RFC 2782 DNS SRV RR February 2000




The algorithm used to select from the weighted SRV RRs of
priority is adapted from one supplied by Dan Bernstein

Authors'

Arnt
Troll
Waldemar Thranes gate 98
N-0175 Oslo,

Fax: +47 22806380
Phone: +47 22806390
EMail: arnt@troll.


Paul
Internet Software
950 Charter
Redwood City, CA 94063

Phone: +1 650 779 7001


Levon
Microsoft
One Microsoft
Redmond, WA 98052

EMail: levone@microsoft.




















Gulbrandsen, et al. Standards Track [Page 11]

RFC 2782 DNS SRV RR February 2000


Full Copyright

Copyright (C) The Internet Society (2000). All Rights Reserved

This document and translations of it may be copied and furnished
others, and derivative works that comment on or otherwise explain
or assist in its implementation may be prepared, copied,
and distributed, in whole or in part, without restriction of
kind, provided that the above copyright notice and this paragraph
included on all such copies and derivative works. However,
document itself may not be modified in any way, such as by
the copyright notice or references to the Internet Society or
Internet organizations, except as needed for the purpose
developing Internet standards in which case the procedures
copyrights defined in the Internet Standards process must
followed, or as required to translate it into languages other
English

The limited permissions granted above are perpetual and will not
revoked by the Internet Society or its successors or assigns

This document and the information contained herein is provided on
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE



Funding for the RFC Editor function is currently provided by
Internet Society



















Gulbrandsen, et al. Standards Track [Page 12]








if you see any problems within the linking, don't worry be happy,
this is version 0.1 of the Relevance System and you gotta expect some crappy subroutines sometimes,
just be content we did not write this in Java, which would have made this "bigger and better" HAHAHHA.




RFC documents can be found at I.E.T.F.



Relevance System Copyright © 2002 Spectrum WorldResearch
other technical nosh by ServerMasters Corporation
collaboration of BobX







Spectrum