In addition to the basic DNS record types that were defined in the original RFC for the protocol, additional feature-specific record types have been added over the years to accommodate interoperability of other peripheral technologies in conjunction with the DNS.
The Service Record, or SRV record, is an example of this. Where a typical DNS record indicates the address of a resource, SRV also provides the provision to specify a port and protocol for that request. This comes in very handy cases where a specific application requires a different port to access the resource in question, such as IP telephony or certain proprietary messaging systems. This article serves to explain the mechanics of the SRV record, and its proper usage.
Dissecting the SRV Record Type
The SRV record contains more information than the typical DNS record as it contains specific information that can be used to locate a specific resource at an address. This is an example of what an SRV appears like in a typical BIND-style zone file:
_sip._tcp.example.com. 86400 IN SRV 0 5 5060 sipserver.example.com. |____________________||_____||_||__|_|_|____|______________________| 1 2 3 4 5 6 7 8
- Address - Location of the SRV record, including the resource type (_sip) and protocol (_tcp) - This information is often given by the provider of the service the SRV is being set up for.
- TTL - Expiration value of the record.
- Internet-type - Standard BIND notation indicating that the record is on the InternetRecord type - Standard BIND notation indicating that it’s an SRV record.
- Priority - Much like an MX record, one is able to set priority of more than 1 record at the address.
- Weight - There is provision for a rudimentary load balancing schema. All values across all records at the address must add up to 100. The higher the weight, the more often the specific record will be served and vice versa.
- Port - TCP or UDP port where the specified service can be found.
- Target Endpoint - the canonical hostname of the machine providing the service.
Leveraging the SRV Record Type In NS1’s Portal
- Log into the NS1 portal and locate the zone you want to set the SRV record up on.
Click Add Record.
Select SRV from the drop down box.
Input the information provided into the appropriate boxes
- Priority of target host (Priority)
- Relative weight for hosts with same priority (Weight)
- TCP/UDP service port (Port)
- Host providing service (Target Endpoint)
- Changes will be committed and propagated to our edge servers once you press Save All Changes