Difference between revisions of "SRV Records"

Jump to navigation Jump to search
2,239 bytes added ,  14:40, 28 August 2011
m
no edit summary
m (SRV Record moved to SRV Records)
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 [http://tools.ietf.org/html/rfc2782 RFC 2782].
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 [http://tools.ietf.org/html/rfc2782 RFC 2782].


XMPP often require SRV support by network elements.
XMPP uses 5222 (C2S) and 5269 (S2S) ports in TCP and STUN uses 3478 port in TCP/UDP.


== Record format ==
== Record format ==
Line 47: Line 47:
The XMPP domain is example.net and the principal server is server1.example.net which used 50% after server2.example.net 30%, server3.example.net 10%, server4.example.net 10% too, if server1 is down, server2, server3 and server4 will work, if servers 1/2/3/4 are down, backup will work.
The XMPP domain is example.net and the principal server is server1.example.net which used 50% after server2.example.net 30%, server3.example.net 10%, server4.example.net 10% too, if server1 is down, server2, server3 and server4 will work, if servers 1/2/3/4 are down, backup will work.


== Retrieving SRV records ==
=== Retrieving XMPP SRV records ===
  $ dig SRV _xmpp-client._tcp.example.net
  $ dig SRV _xmpp-client._tcp.example.net
  $ dig SRV _xmpp-server._tcp.example.net
  $ dig SRV _xmpp-server._tcp.example.net
== STUN SRV records ==
_stun._tcp.example.net. TTL IN SRV priority weight port target
_stun._udp.example.net. TTL IN SRV priority weight port target
=== Example 1 ===
_stun._tcp.example.net. 86400 IN SRV 5 0 3478 example.net.
_stun._udp.example.net. 86400 IN SRV 5 0 3478 example.net.
_stuns._tcp.example.net. 86400 IN SRV 5 0 5349 example.net.
The STUN domain is example.net and the server is example.net.
=== Example 2 ===
_stun._tcp.example.net. 86400 IN SRV 5 0 3478 server.example.net.
_stun._udp.example.net. 86400 IN SRV 5 0 3478 server.example.net.
_stuns._tcp.example.net. 86400 IN SRV 5 0 5349 server.example.net.
The STUN domain is example.net and the server is server.example.net.
=== Example 3 ===
_stun._tcp.example.net. 86400 IN SRV 5 50 3478 server1.example.net.
_stun._tcp.example.net. 86400 IN SRV 10 30 3478 server2.example.net.
_stun._tcp.example.net. 86400 IN SRV 10 10 3478 server3.example.net.
_stun._tcp.example.net. 86400 IN SRV 10 10 3478 server4.example.net.
_stun._tcp.example.net. 86400 IN SRV 15 0 3478 backup.example.net.
_stun._udp.example.net. 86400 IN SRV 5 50 3478 server1.example.net.
_stun._udp.example.net. 86400 IN SRV 10 30 3478 server2.example.net.
_stun._udp.example.net. 86400 IN SRV 10 10 3478 server3.example.net.
_stun._udp.example.net. 86400 IN SRV 10 10 3478 server4.example.net.
_stun._udp.example.net. 86400 IN SRV 15 0 3478 backup.example.net.
_stuns._tcp.example.net. 86400 IN SRV 5 50 5349 server1.example.net.
_stuns._tcp.example.net. 86400 IN SRV 10 30 5349 server2.example.net.
_stuns._tcp.example.net. 86400 IN SRV 10 10 5349 server3.example.net.
_stuns._tcp.example.net. 86400 IN SRV 10 10 5349 server4.example.net.
_stuns._tcp.example.net. 86400 IN SRV 15 0 5349 backup.example.net.
The XMPP domain is example.net and the principal server is server1.example.net which used 50% after server2.example.net 30%, server3.example.net 10%, server4.example.net 10% too, if server1 is down, server2, server3 and server4 will work, if servers 1/2/3/4 are down, backup will work.
=== Retrieving STUN SRV records ===
$ dig SRV _stun._tcp.example.net
$ dig SRV _stun._udp.example.net
$ dig SRV _stuns._tcp.example.net
216

edits

Navigation menu