请输入您要查询的百科知识:

 

词条 SRV record
释义

  1. Record format

  2. Provisioning for high service availability

  3. Usage

  4. See also

  5. References

  6. External links

A Service record (SRV record) is a specification of data in the Domain Name System defining the location, i.e. the hostname and port number, of servers for specified services. It is defined in RFC 2782, and its type code is 33. Some Internet protocols such as the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP) often require SRV support by network elements.

Record format

A SRV record has the form:

  • service: the symbolic name of the desired service.
  • proto: the transport protocol of the desired service; this is usually either TCP or UDP.
  • name: the domain name for which this record is valid, ending in a dot.
  • TTL: standard DNS time to live field.
  • class: standard DNS class field (this is always IN).
  • priority: the priority of the target host, lower value means more preferred.
  • weight: A relative weight for records with the same priority, higher value means more preferred.
  • port: the TCP or UDP port on which the service is to be found.
  • target: the canonical hostname of the machine providing the service, ending in a dot.

An example SRV record in textual form that might be found in a zone file might be the following:

This points to a server named sipserver.example.com listening on TCP port 5060 for Session Initiation Protocol (SIP) protocol services. The priority given here is 0, and the weight is 5.

As in MX records, the target in SRV records must point to hostname with an address record (A or AAAA record). Pointing to a hostname with a CNAME record is not a valid configuration.

Provisioning for high service availability

The priority field determines the precedence of use of the record's data. Clients should use the SRV records with the lowest-numbered priority value first, and fall back to records of higher value if the connection fails. If a service has multiple SRV records with the same priority value, clients should load balance them in proportion to the values of their weight fields.

In the following example, both the priority and weight fields are used to provide a combination of load balancing and backup service.

# _service._proto.name. TTL class SRV priority weight port target.
 _sip._tcp.example.com.   86400 IN    SRV 10       60     5060 bigbox.example.com. _sip._tcp.example.com.   86400 IN    SRV 10       20     5060 smallbox1.example.com. _sip._tcp.example.com.   86400 IN    SRV 10       20     5060 smallbox2.example.com. _sip._tcp.example.com.   86400 IN    SRV 20       0      5060 backupbox.example.com.

The first three records share a priority of 10, so the weight field's value will be used by clients to determine which server (host and port combination) to contact. The sum of all three values is 100, so bigbox.example.com will be used 60% of the time. The two hosts, smallbox1 and smallbox2 will be used for 40% of requests total, with half of them sent to smallbox1, and the other half to smallbox2. If bigbox is unavailable, these two remaining machines will share the load equally, since they will each be selected 50% of the time.

If all three servers with priority 10 are unavailable, the record with the next lowest priority value will be chosen, which is backupbox.example.com. This might be a machine in another physical location, presumably not vulnerable to anything that would cause the first three hosts to become unavailable.

The load balancing provided by SRV records is inherently limited, since the information is essentially static. Current load of servers is not taken into account, unless TTL values are low enough (around a minute or lower) that the priority (or weight) values can be quickly updated.

Usage

SRV records are common in conjunction with the following standardized communications protocols:{{clarify |date=September 2018 |reason=It's easily apparent how many protocols listed below are not standardized or involving the IETF at all. }}

  • CalDAV and CardDAV
  • Ceph[1]
  • DANE
  • DNS Service Discovery (DNS-SD)
  • Host Identity Protocol
  • Kerberos[2]
  • LDAP[3]
  • SMTP submission, POP, and IMAP[4]
  • Matrix.org[5]
  • Minecraft[6]
  • IMPS[7]
  • Puppet[8]
  • Session Initiation Protocol
  • STUN
  • Teamspeak 3[9][10]
  • XMPP[11]

In Microsoft Windows 2000 clients query for SRV records to determine the domain controller for a given service. SRV records are also used by Outlook 2007, 2010 and Macintosh 10.6 mail to locate the Exchange Autodiscover service.[12]

In Microsoft Windows networks domain controllers register their network service types for Active Directory in the DNS.

A registry of service names for SRV records & protocols is maintained by the Internet Assigned Numbers Authority (IANA) as defined in RFC 6335.[13]

See also

  • List of DNS record types
  • MX record — a DNS RR type used for locating the SMTP server

References

1. ^{{cite web|url=http://docs.ceph.com/docs/master/rados/configuration/mon-lookup-dns/|title=Looking up Monitors through DNS – Ceph Documentation|accessdate=2017-12-04}}
2. ^{{cite web|url=http://web.mit.edu/Kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-install/Hostnames-for-the-Master-and-Slave-KDCs.html |title=Hostnames for the Master and Slave KDCs |publisher=Web.mit.edu |date= |accessdate=2012-05-23}}
3. ^{{cite web|url=http://www.faqs.org/rfcs/rfc3088.html |title=RFC 3088 – OpenLDAP Root Service An experimental LDAP referral service |publisher=Faqs.org |date= |accessdate=2012-05-23}}
4. ^{{cite IETF |title=Use of SRV Records for Locating Email Submission/Access Services |rfc=6186 |author=Cyrus Daboo |date=March 2011 |publisher=IETF |accessdate=17 April 2013}}
5. ^{{Cite web|url=https://matrix.org/docs/spec/server_server/unstable.html#server-discovery|title=Federation API|website=matrix.org|language=en|access-date=2018-01-05}}
6. ^{{cite web |url=http://minecraft.gamepedia.com/1.3.1 |publisher=Curse Inc |title=Minecraft wiki, 1.3.1}}
7. ^  {{webarchive |url=https://web.archive.org/web/20080822121412/http://baraza.im/userguide_pre.htm |date=August 22, 2008 }}
8. ^{{cite web|url=http://docs.puppetlabs.com/guides/scaling_multiple_masters.html#option-4-dns-srv-records |title= Puppet Docs: Using Multiple Puppet Masters, Option 4: DNS SRV Records |publisher=Puppet Labs|date= |accessdate=2013-12-26}}
9. ^{{cite web|url=http://forum.teamspeak.com/showthread.php/82123-Suggestion-TS-DNS |title=[Suggestion] TS DNS |publisher=Forum.teamspeak.com |date= |accessdate=2013-10-25}}
10. ^{{cite web |url=http://forum.teamspeak.com/threads/75254-TeamSpeak-3-Client-Version-3-0-8-Released |title=TeamSpeak 3 Client Version 3.0.8 Released}}
11. ^{{cite web|url=http://xmpp.org/extensions/xep-0156.html |title=XEP-0156: Discovering Alternative XMPP Connection Methods |publisher=Xmpp.org |date= |accessdate=2012-05-23}}
12. ^{{cite web|url=http://support.microsoft.com/kb/940881 |title=A new feature is available that enables Outlook 2007 to use DNS Service Location (SRV) records to locate the Exchange Autodiscover service |publisher=Support.microsoft.com |date=2010-05-13 |accessdate=2012-05-23}}
13. ^{{cite web|url=http://tools.ietf.org/html/rfc6335|title=RFC 6335 - Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry |publisher=ietf.org |date=2011-08-01 |accessdate=2013-01-28}}

External links

  • RFC 2782 – definition of the SRV resource record
  • [https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml Service Name and Transport Protocol Port Number Registry]
  • draft-andrews-http-srv-01.txt – Use of SRV records in conjunction with HTTP and URIs (Expired Internet-Draft)
  • RFC 6186 – Use of SRV Records for Locating Email Submission/Access Services
  • {{cite web|url=http://tools.ietf.org/html/draft-sanz-whois-srv-00 |title=draft-sanz-whois-srv-00 - Using DNS SRV records to locate whois servers |publisher=Tools.ietf.org |date=2004-04-05 |accessdate=2013-05-20}}

1 : DNS record types

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 0:27:38