Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SRV record
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Type of resource record in the Domain Name System}} {{Use dmy dates|date=July 2020}} 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 {{IETF 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: {{sxhl|2=zone| _service._proto.name. ttl IN SRV priority weight port target. }} * ''service'': the symbolic name of the desired service. * ''proto'': the transport protocol of the desired service; this is usually either [[Transmission Control Protocol|TCP]] or [[User Datagram Protocol|UDP]]. * ''name'': the domain name for which this record is valid, ending in a dot. * ''ttl'': standard DNS [[time to live]] field. * ''IN'': standard DNS class field (this is always ''IN''). * ''SRV'': Type of Record (this is always ''SRV''). * ''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 higher chance of getting picked. * ''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: {{sxhl|2=zone| _sip._tcp.example.com. 86400 IN SRV 0 5 5060 sipserver.example.com. }} This points to a server named <code>sipserver.example.com</code> 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 record]]s, the target in SRV records must point to hostname with an address record ([[A record|A]] or [[AAAA record]]). Pointing to a hostname with a [[CNAME record]] is not a valid configuration.<ref>{{cite IETF |rfc=2782 |date=February 2000 |first1=A.|last1=Gulbrandsen |first2=P.|last2=Vixie |first3=L.|last3=Esibov |title=A DNS RR for specifying the location of services (DNS SRV) |access-date=3 December 2021 |sectionname=The format of the SRV RR |quote=There MUST be one or more address records for this name, the name MUST NOT be an alias (in the sense of RFC 1034 or RFC 2181). }}</ref> == Provisioning for high service availability == The ''priority'' field determines the precedence of the 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 balancing (computing)|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. {{sxhl|2=zone| ; _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 weight values is 100, so <code>bigbox.example.com</code> will be used 60% of the time. The two hosts, <code>smallbox1</code> and <code>smallbox2</code> will be used for 40% of requests total, with half of them sent to <code>smallbox1</code>, and the other half to <code>smallbox2</code>. If <code>bigbox</code> 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 <code>backupbox.example.com</code>. 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. The 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 [[Internet standard|standardized]] [[communications protocol]]s:{{clarify |date=September 2018 |reason=It's easily apparent how many protocols listed below are not standardized or involving the IETF at all. }} * [[APT (software)|APT]]<ref>{{Cite web |date=4 May 2018 |title=DNS SRV record support in apt |url=https://salsa.debian.org/apt-team/apt/-/blob/main/doc/srv-records-support.md |url-status=live |archive-url=https://web.archive.org/web/20191117213903/https://salsa.debian.org/apt-team/apt/blob/master/doc/srv-records-support.md |archive-date=17 November 2019 |access-date=17 November 2019 |publisher=[[Debian]] |language=en}}</ref> * [[CalDAV]] and [[CardDAV]]<ref>{{Cite web |title=RFC6764: Locating Services for Calendaring Extensions to WebDAV (CalDAV) and vCard Extensions to WebDAV (CardDAV)|url=https://www.rfc-editor.org/rfc/rfc6764 |language=en}}</ref> * [[Ceph (software)|Ceph]]<ref>{{Cite web |title=Looking up Monitors through DNS β Ceph Documentation |url=http://docs.ceph.com/docs/master/rados/configuration/mon-lookup-dns/ |url-status=live |archive-url=https://web.archive.org/web/20171205042013/https://docs.ceph.com/docs/master/rados/configuration/mon-lookup-dns/ |archive-date=5 December 2017 |access-date=4 December 2017 |website=Ceph Documentation |language=en}}</ref> * [[DNS-based Authentication of Named Entities|DANE]] * [[Zero-configuration networking#DNS-based service discovery|DNS Service Discovery (DNS-SD)]] * [[Factorio]]<ref>{{Cite web |title=Version 1.1.62 - Factorio Forums |url=https://forums.factorio.com/viewtopic.php?f=3&t=102977 |url-status=live |archive-url=https://web.archive.org/web/20220916111719/https://forums.factorio.com/viewtopic.php?f=3&t=102977 |archive-date=16 Sep 2022 |access-date=16 Sep 2022 |website=Factorio Forum |language=en}}</ref><ref>{{Cite web |title=Version 1.1.67 - Factorio Forums |url=https://forums.factorio.com/viewtopic.php?f=3&t=103181 |url-status=live |archive-url=https://web.archive.org/web/20220820230148/https://forums.factorio.com/viewtopic.php?f=3&t=103181 |archive-date=20 Aug 2022 |access-date=16 Sep 2022 |website=Factorio Forum |language=en}}</ref><ref>{{Cite web |title=Add SRV Record support - Page 4 - Factorio Forums |url=https://forums.factorio.com/viewtopic.php?p=572281#p572281 |url-status=live |archive-url=https://web.archive.org/web/20220916112010/https://forums.factorio.com/viewtopic.php?p=572281#p572281 |archive-date=16 Sep 2022 |access-date=16 Sep 2022 |website=Factorio Forum |language=en}}</ref> * [[Host Identity Protocol]] * [[Kerberos (protocol)|Kerberos]]<ref>{{Cite web |title=Hostnames for the Master and Slave KDCs |url=http://web.mit.edu/Kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-install/Hostnames-for-the-Master-and-Slave-KDCs.html |url-status=live |archive-url=https://web.archive.org/web/20121021104040/http://web.mit.edu/Kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-install/Hostnames-for-the-Master-and-Slave-KDCs.html |archive-date=21 October 2012 |access-date=23 May 2012 |publisher=[[Massachusetts Institute of Technology]] |language=en}}</ref> * [[Lightweight Directory Access Protocol|LDAP]]<ref>{{Cite IETF |title=OpenLDAP Root Service - An experimental LDAP referral service |rfc=3088 |last1=Zeilenga |first1=K. |date=April 2001 |publisher=[[Internet Engineering Task Force|IETF]] |language=en |access-date=5 July 2020 |doi=10.17487/RFC3088 |url=https://tools.ietf.org/html/rfc3088 |archive-url=https://web.archive.org/web/20200116161937/https://tools.ietf.org/html/rfc3088 |archive-date=16 January 2020 |url-status=dead}}</ref> * [[SMTP]] [[Mail submission agent|submission]], [[Post Office Protocol|POP]], and [[Internet Message Access Protocol|IMAP]]<ref>{{Cite IETF |title=Use of SRV Records for Locating Email Submission/Access Services |rfc=6186 |last1=Daboo |first1=C. |date=March 2011 |publisher=[[Internet Engineering Task Force|IETF]] |language=en |access-date=17 April 2013 |doi=10.17487/RFC6186 |url=https://tools.ietf.org/html/rfc6186 |archive-url=https://web.archive.org/web/20130417025405/https://tools.ietf.org/html/rfc6186 |archive-date=17 April 2013 |url-status=dead}}</ref> * [[Matrix (communication protocol)|Matrix.org]]<ref>{{Cite web |title=Federation API |url=https://matrix.org/docs/spec/server_server/unstable.html#server-discovery |url-status=live |archive-url=https://web.archive.org/web/20200705233825/https://matrix.org/docs/spec/server_server/unstable |archive-date=5 July 2020 |access-date=5 January 2018 |publisher=[[Matrix (communication protocol)|Matrix.org]] |language=en}}</ref> * [[Minecraft]]<ref>{{cite web |title=Java Edition 1.3.1 |url=https://minecraft.wiki/w/Java_Edition_1.3.1 |access-date=24 September 2023 |work=Minecraft Wiki |language=en}}</ref> * [[MongoDB]]<ref>{{Cite web |title=MongoDB Connection String URI Format |url=https://www.mongodb.com/docs/manual/reference/connection-string/#std-label-connections-dns-seedlist |url-status=live |archive-url=https://web.archive.org/web/20221210143419/https://www.mongodb.com/docs/manual/reference/connection-string |archive-date=10 December 2022 |access-date=14 December 2022 |publisher=[[MongoDB]]}}</ref> * [[Mumble (software)|Mumble]]<ref>{{Cite web |title=Add DNS SRV record support - mumble-voip/mumble |url=https://github.com/mumble-voip/mumble/issues/1242 |url-status=live |archive-url=https://web.archive.org/web/20200705234141/https://github.com/mumble-voip/mumble/issues/1242 |archive-date=5 July 2020 |access-date=5 July 2020 |publisher=[[GitHub]]}}</ref> * [[OMA Instant Messaging and Presence Service|IMPS]]<ref>{{Cite web |title=Baraza - Userguide |url=http://baraza.im/userguide_pre.htm |url-status=dead |archive-url=https://web.archive.org/web/20080822121412/http://baraza.im/userguide_pre.htm |archive-date=22 August 2008}}</ref> * [[Puppet (software)|Puppet]]<ref>{{Cite web |title=Puppet Docs: Scaling Puppet with compile masters, Using DNS SRV Records |url=https://puppet.com/docs/puppetserver/latest/scaling_puppet_server.html#using-dns-srv-records |url-status=live |archive-url=https://web.archive.org/web/20191011173014/https://puppet.com/docs/puppetserver/latest/scaling_puppet_server.html |archive-date=11 October 2019 |access-date=17 December 2019 |publisher=[[Puppet (software)|Puppet Labs]]}}</ref> * [[Rust (video game)|Rust]]<ref>{{Cite web |title=Server DNS Records |url=https://wiki.facepunch.com/rust/dns-records |access-date=2024-11-06 |website=Rust Wiki |language=en}}</ref> * [[Session Initiation Protocol]] * [[STUN]]<ref>{{Cite web |title=Resolve primary STUN server(s) via DNS SRV Β· Issue #10029 Β· syncthing/syncthing |url=https://github.com/syncthing/syncthing/issues/10029}}</ref> * [[Teamspeak|Teamspeak 3]]<ref>{{Cite web |title=[Suggestion] TS DNS |url=http://forum.teamspeak.com/showthread.php/82123-Suggestion-TS-DNS |url-status=live |archive-url=https://web.archive.org/web/20161114223239/https://forum.teamspeak.com/threads/82123-outdated-thread-TSDNS |archive-date=14 November 2016 |access-date=25 October 2013 |website=[[Teamspeak|Teamspeak Forum]]}}</ref><ref>{{Cite web |title=TeamSpeak 3 Client Version 3.0.8 Released |url=http://forum.teamspeak.com/threads/75254-TeamSpeak-3-Client-Version-3-0-8-Released |url-status=live |archive-url=https://web.archive.org/web/20160927003921/https://forum.teamspeak.com/threads/75254-TeamSpeak-3-Client-Version-3-0-8-Released |archive-date=27 September 2016 |access-date=5 July 2020 |website=[[Teamspeak|Teamspeak Forum]]}}</ref> * [[Extensible Messaging and Presence Protocol|XMPP]]<ref>{{Cite web |title=XEP-0156: Discovering Alternative XMPP Connection Methods |url=http://xmpp.org/extensions/xep-0156.html |archive-url=https://web.archive.org/web/20120507065343/https://xmpp.org/extensions/xep-0156.html |archive-date=7 May 2012 |access-date=23 May 2012 |website=[[Extensible Messaging and Presence Protocol|XMPP.org]]}}</ref> 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.<ref>{{Cite web |date=13 May 2010 |title=A new feature is available that enables Outlook 2007 to use DNS Service Location (SRV) records to locate the Exchange Autodiscover service |url=http://support.microsoft.com/kb/940881 |url-status=dead |archive-url=https://web.archive.org/web/20120420205350/http://support.microsoft.com/kb/940881 |archive-date=20 April 2012 |access-date=23 May 2012 |website=[[Microsoft|Microsoft Support]]}}</ref> In Microsoft Windows networks domain controllers register their network service types for [[Active Directory]] in the DNS. An older version of the [[Internet Draft]] for [[OpenPGP]] Web Key Directory uses SRV records for discovering OpenPGP keys through web servers.<ref>{{cite web |last1=Koch |first1=Werner |title=OpenPGP Web Key Directory draft-koch-openpgp-webkey-service-06 |url=https://datatracker.ietf.org/doc/html/draft-koch-openpgp-webkey-service-06 |website=IETF Datatracker |publisher=Internet Engineering Task Force |access-date=5 June 2021}}</ref> Usages of SRV records are no longer part of the Internet Draft in later versions.<ref>{{cite web |last1=Koch |first1=Werner |title=OpenPGP Web Key Directory draft-koch-openpgp-webkey-service-12 |url=https://datatracker.ietf.org/doc/html/draft-koch-openpgp-webkey-service-12 |website=IETF Datatracker |publisher=Internet Engineering Task Force |access-date=5 June 2021}}</ref> A registry of service names for SRV records & protocols is maintained by the [[Internet Assigned Numbers Authority]] (IANA) as defined in RFC 6335.<ref>{{Cite IETF |title=Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry |rfc=6335 |last1=Cotton |first1=M. |last2=Eggert |first2=L. |last3=Touch |first3=J. |last4=Westerlund |first4=M. |last5=Cheshire |first5=S. |date=August 2011 |publisher=[[Internet Engineering Task Force|IETF]] |language=en |access-date=6 July 2020 |doi=10.17487/RFC6335 |url=https://tools.ietf.org/html/rfc6335 |archive-url=https://web.archive.org/web/20200706002818/https://tools.ietf.org/html/rfc6335 |archive-date=6 July 2020 |url-status=dead}}</ref> == See also == * [[List of DNS record types]] == References == {{Reflist}} == External links == * [https://tools.ietf.org/html/rfc2782 RFC 2782 β Definition of the SRV resource record] - {{webarchive |url=https://web.archive.org/web/20200706003417/https://tools.ietf.org/html/rfc2782 |date=6 July 2020}} * [https://tools.ietf.org/html/rfc6186 RFC 6186 β Use of SRV Records for Locating Email Submission/Access Services] - {{webarchive |url=https://web.archive.org/web/20200706003435/https://tools.ietf.org/html/rfc6186 |date=6 July 2020}} * [https://tools.ietf.org/html/draft-sanz-whois-srv-00 Using DNS SRV records to locate whois servers (Internet-Draft)] - {{webarchive |url=https://web.archive.org/web/20200706003454/https://tools.ietf.org/html/draft-sanz-whois-srv-00 |date=6 July 2020}} * [https://tools.ietf.org/html/draft-andrews-http-srv-01 Use of SRV records in conjunction with HTTP and URIs (Internet-Draft)] - {{webarchive |url=https://web.archive.org/web/20200706003527/https://tools.ietf.org/html/draft-andrews-http-srv-01 |date=6 July 2020}} * [https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml Service Name and Transport Protocol Port Number Registry] - {{webarchive |url=https://web.archive.org/web/20200706003543/https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml |date=6 July 2020}} [[Category:DNS record types]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite IETF
(
edit
)
Template:Cite web
(
edit
)
Template:Clarify
(
edit
)
Template:IETF RFC
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Sxhl
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Webarchive
(
edit
)