Network Security
A Domain Name System Service Record, SRV is short for service record.
What does an SRV Record contain?
Unlike most DNS records which contain an IP address or name, the SRV record contains the name and port of a specific service location. Commonly, services like Voice-Over-IP (VOIP) or Instant Messaging (IM) will require a port to make sure the call or IM goes to the right person no matter where they are.
It may also be the case that multiple services reside on one server and to ensure the correct service is used a port would be required. There are commonly used ports or companies may choose to specify their own custom ports, depending on the design and implementations from the network and security teams. Wikipedia provides a list of commonly used tcp and udp port numbers.
SRV Record Example
The following is an example of the information contained within a SRV record for a VOIP service using SIP (Session Initiation Protocol) used in VOIP.
service | SIP |
---|---|
protocol | UDP |
name | phonecall.com |
TTL | 86400 |
class | IN |
type | SRV |
Priority | 20 |
weight | 5 |
port | 5060 |
target | example.phonecall.com |
The record format would appear like this:
_service_proto.name. | TTL Type | Priority | Weight | Port | Target |
---|---|---|---|---|---|
_sip.udp.phonecall.com. | 86400 IN | SRV 20 | 5 | 5060 | example.phonecall.com. |
What is the difference between priority and weight?
Priority and weight are used to load balance traffic. However, the difference is that priority will be looked at first in a DNS lookup. So, if there are three SRV records pointing to three different service locations, and they all have the same priority number, the weight number will then be considered to see where traffic should go. If the priority numbers are different, though, the amount of traffic will be dictated by that ranking first.
How to create a DNS SRV Record
How you create a SRV record will depend on which DNS management system you’re using. If you’re using Micetro, by Men&Mice to create a DNS record you will follow these steps:
- Click on DNS in the Micetro Web UI
- Double click on a DNS zone for which you’d like to create a SRV record
- Click on the Create button to create a new SRV record
- Specify the record name.
- Specify the record type, in this case SRV
- Specify a TTL, or time-to-live
- Specify the Priority
- Specify the Weight
- Specify the Port
- Specify the Target
- Optionally, specify the owner of this record
- Depending on your permissions you can now click either Create Now or Add to Request.