The SRV (Service Record) is a resource record used in DNS, allowing the specification of host and port locations for services on a domain.
SRV Record support was added in Mumble 1.3.0.
SRV Records are evaluated before A, AAAA, or CNAME records.
SRV Records are useful because they allow easy and clear multi-host configurations from the client point of view.
From the perspective of a server host, you no longer need to worry about a mumble-specific subdomain, or providing port configuration details (if they are non-default) to prospective clients – all of that information is gleaned from the SRV record.
SRV Records are formatted as such:
_service._proto.name TTL class 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 TCP or UDP.
- name: the domain name for which this record is valid.
- TTL: standard DNS time to live field.
- class: standard DNS class field.
- priority: the priority of the target host, lower value means more preferred.
- weight: A relative weight for records with the same priority.
- port: the TCP or UDP port on which the service is to be found.
- target: the canonical hostname of the machine providing the service.
Mumble uses the following values:
- service: mumble
- proto: tcp
A typical SRV record for mumble might look like this:
# _service._proto.name. TTL CLASS SRV PRIORITY WEIGHT PORT TARGET _mumble._tcp.example.com. 86400 IN SRV 0 5 64738 mumble.example.com.
You can also supplement an existing subdomain hosted service by adding an SRV record for it.
This will allow you to use arbitrary ports easier, or change/move the subdomain A, AAAA, or CNAME record without requiring clients to reconfigure.
Subdomains might be configured like this:
# _service._proto.name. TTL CLASS SRV PRIORITY WEIGHT PORT TARGET _mumble._tcp.mumble.example.com. 86400 IN SRV 0 5 64738 mumble.example.com. _mumble._tcp.mumble.example.com. 86400 IN SRV 0 5 3050 murmur2.example.net.
SSL Certificates and SRV
Mumble will connect using the domain specified in the Target value, so if having a signed and valid SSL Certificate is important, make sure it is issued for the Target domain.
SRV Records can be used for fail-over, and load balancing, but these are more complicated concepts (and some are hard to apply to Mumble), so they are not explored here.