Introduction to SRV Records
This is a introduction to SRV records for helping you understand SRV records and the usage of the records.
SRV Records extend DNS functionality to enable location of services outside of the standard record types supported in DNS. Various protocols such as SIP and XMPP use SRV records to allow discovery of the service endpoint for a particular domain.
For instance, if directi’s chat server is hosted at internal.chat.pw, the SRV Record for the same would be -
_xmpp-server._tcp.directi.com. IN SRV 0 0 5222 internal.chat.pw
The LHS of the SRV record consists of the Service Name (which incase of XMPP is defined as xmpp-sever) and the Protocol (which in the above example is TCP). Both of these are prefixed with an underscore.
A detailed description of the above fields is available at the Wikipedia article on SRV Records. SRV Records provide a Priority field similar to the Priority field in MX records, and a weight field for DNS based load balancing.
One can use nslookup or dig to lookup SRV Records. The below snippet shows an XMPP Service lookup being performed on directi.com.
C:\Documents and Settings\bhavin.t>nslookup
Default Server: bdc.internal.directi.com
Address: 192.168.0.35
> set type=srv
> _xmpp-server._tcp.directi.com.
Server: bdc.internal.directi.com
Address: 192.168.0.35
Non-authoritative answer:
_xmpp-server._tcp.directi.com SRV service location:
priority = 10
weight = 0
port = 5269
svr hostname = internal.chat.pw
internal.chat.pw internet address = 192.168.1.58
The above lookup shows that the XMPP server for directi.com is hosted on a server called internal.chat.pw. which is available at 192.168.1.58
13



