226
edits
(→External links: Remove STUN & TURN links, they should be on their own page somewere) |
Neustradamus (talk | contribs) m |
||
Line 1: | Line 1: | ||
A Service record ('''SRV record''') is a specification of data in the Domain Name System ('''DNS''') defining the location (i.e. the hostname and port number) of servers for specified services. It is defined in [ | A Service record ('''SRV record''') is a specification of data in the Domain Name System ('''DNS''') defining the location (i.e. the hostname and port number) of servers for specified services. It is defined in [https://datatracker.ietf.org/doc/html/rfc2782 RFC2782]. | ||
== Default Ports == | == Default Ports == | ||
=== XMPP === | === XMPP === | ||
For TCP connections ([ | For TCP connections ([https://datatracker.ietf.org/doc/html/rfc6120 RFC6120]) | ||
* Server 2 Server ('''S2S''') - 5269 | * Server 2 Server ('''S2S''') - 5269 | ||
Line 24: | Line 24: | ||
== XMPP SRV records == | == XMPP SRV records == | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. TTL IN SRV priority weight port target | ||
_xmpps-client._tcp. | _xmpps-client._tcp.domain.tld. TTL IN SRV priority weight port target | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. TTL IN SRV priority weight port target | ||
_xmpps-server._tcp. | _xmpps-server._tcp.domain.tld. TTL IN SRV priority weight port target | ||
=== Example 1 === | === Example 1 === | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. 86400 IN SRV 5 0 5222 domain.tld. | ||
_xmpps-client._tcp. | _xmpps-client._tcp.domain.tld. 86400 IN SRV 5 0 5223 domain.tld. | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. 86400 IN SRV 5 0 5269 domain.tld. | ||
The XMPP domain is | The XMPP domain is domain.tld and the server is domain.tld. | ||
=== Example 2 === | === Example 2 === | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. 86400 IN SRV 5 0 5222 server.domain.tld. | ||
_xmpps-client._tcp. | _xmpps-client._tcp.domain.tld. 86400 IN SRV 5 0 5223 server.domain.tld. | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. 86400 IN SRV 5 0 5269 server.domain.tld. | ||
The XMPP domain is | The XMPP domain is domain.tld and the server is server.domain.tld. | ||
=== Example 3 === | === Example 3 === | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. 86400 IN SRV 5 50 5222 server1.domain.tld. | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. 86400 IN SRV 10 30 5222 server2.domain.tld. | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. 86400 IN SRV 10 10 5222 server3.domain.tld. | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. 86400 IN SRV 10 10 5222 server4.domain.tld. | ||
_xmpp-client._tcp. | _xmpp-client._tcp.domain.tld. 86400 IN SRV 15 0 5222 backup.domain.tld. | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. 86400 IN SRV 5 50 5269 server1.domain.tld. | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. 86400 IN SRV 10 30 5269 server2.domain.tld. | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. 86400 IN SRV 10 10 5269 server3.domain.tld. | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. 86400 IN SRV 10 10 5269 server4.domain.tld. | ||
_xmpp-server._tcp. | _xmpp-server._tcp.domain.tld. 86400 IN SRV 15 0 5269 backup.domain.tld. | ||
The XMPP domain is | The XMPP domain is domain.tld and the principal server is server1.domain.tld which used 50% after server2.domain.tld 30%, server3.domain.tld 10%, server4.domain.tld 10% too, if server1 is down, server2, server3 and server4 will work, if servers 1/2/3/4 are down, backup will work. | ||
=== Retrieving XMPP SRV records === | === Retrieving XMPP SRV records === | ||
$ dig SRV _xmpp-client._tcp. | $ dig SRV _xmpp-client._tcp.domain.tld | ||
$ dig SRV _xmpp-server._tcp. | $ dig SRV _xmpp-server._tcp.domain.tld | ||
== External links == | == External links == | ||
* [https://wiki.xmpp.org/web/Tech_pages/XEP-0368: XEP-0368: SRV records for XMPP over TLS] | * [https://wiki.xmpp.org/web/Tech_pages/XEP-0368: XEP-0368: SRV records for XMPP over TLS] | ||
* [ | * [https://datatracker.ietf.org/doc/html/rfc2782 RFC2782: A DNS RR for specifying the location of services (DNS SRV)] | ||
* [ | * [https://datatracker.ietf.org/doc/html/rfc6120 RFC6120: Extensible Messaging and Presence Protocol (XMPP): Core] |
edits