Difference between revisions of "SRV Records"

Jump to navigation Jump to search
4,862 bytes removed ,  10:25, 7 April 2023
Delete STUN/TURN examples, we use XEP-0215 for that and having conflicting info causes confusion
(Delete STUN/TURN examples, we use XEP-0215 for that and having conflicting info causes confusion)
Line 8: Line 8:
* Server 2 Server ('''S2S''') - 5269
* Server 2 Server ('''S2S''') - 5269
* Client 2 Server ('''C2S''') - 5222 ('''START TLS''') / 5223 ('''DIRECT TLS''')
* Client 2 Server ('''C2S''') - 5222 ('''START TLS''') / 5223 ('''DIRECT TLS''')
=== STUN/TURN ===
* STUN uses 3478 port in TCP/UDP and STUNS (STUN over TLS) uses 5349 port in TCP only ([http://tools.ietf.org/html/rfc5389 RFC 5389]).
* TURN uses 3478 port in TCP/UDP and TURNS (TURN over TLS) uses 5349 port in TCP only ([http://tools.ietf.org/html/rfc5766 RFC 5766], [http://tools.ietf.org/html/rfc5928 RFC 5928]).


== Record format ==
== Record format ==
Line 64: Line 60:
  $ 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
_stuns._tcp.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
== TURN SRV records ==
_turn._tcp.example.net. TTL IN SRV priority weight port target
_turn._udp.example.net. TTL IN SRV priority weight port target
_turns._tcp.example.net. TTL IN SRV priority weight port target
=== Example 1 ===
_turn._tcp.example.net. 86400 IN SRV 5 0 3478 example.net.
_turn._udp.example.net. 86400 IN SRV 5 0 3478 example.net.
_turns._tcp.example.net. 86400 IN SRV 5 0 5349 example.net.
The TURN domain is example.net and the server is example.net.
=== Example 2 ===
_turn._tcp.example.net. 86400 IN SRV 5 0 3478 server.example.net.
_turn._udp.example.net. 86400 IN SRV 5 0 3478 server.example.net.
_turns._tcp.example.net. 86400 IN SRV 5 0 5349 server.example.net.
The TURN domain is example.net and the server is server.example.net.
=== Example 3 ===
_turn._tcp.example.net. 86400 IN SRV 5 50 3478 server1.example.net.
_turn._tcp.example.net. 86400 IN SRV 10 30 3478 server2.example.net.
_turn._tcp.example.net. 86400 IN SRV 10 10 3478 server3.example.net.
_turn._tcp.example.net. 86400 IN SRV 10 10 3478 server4.example.net.
_turn._tcp.example.net. 86400 IN SRV 15 0 3478 backup.example.net.
_turn._udp.example.net. 86400 IN SRV 5 50 3478 server1.example.net.
_turn._udp.example.net. 86400 IN SRV 10 30 3478 server2.example.net.
_turn._udp.example.net. 86400 IN SRV 10 10 3478 server3.example.net.
_turn._udp.example.net. 86400 IN SRV 10 10 3478 server4.example.net.
_turn._udp.example.net. 86400 IN SRV 15 0 3478 backup.example.net.
_turns._tcp.example.net. 86400 IN SRV 5 50 5349 server1.example.net.
_turns._tcp.example.net. 86400 IN SRV 10 30 5349 server2.example.net.
_turns._tcp.example.net. 86400 IN SRV 10 10 5349 server3.example.net.
_turns._tcp.example.net. 86400 IN SRV 10 10 5349 server4.example.net.
_turns._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 TURN SRV records ===
$ dig SRV _turn._tcp.example.net
$ dig SRV _turn._udp.example.net
$ dig SRV _turns._tcp.example.net


== External links ==
== External links ==
43

edits

Navigation menu