16.4. Service records (SRV RRs)
Before service records (SRV RRs) are introduced an entity must know the exact address of a server to contact for a service. With the introduction of SRV RRs in [RFC2782], DNS clients can query a domain for a service or protocol and get back the names of servers. Administrators can use SRV RRs to distribute the load by using several servers to service a single domain. The DNS-type code for SRVs is 33.
The format of an SRV record is as follows (Table 16.2 describes each field in detail):
_Service._Proto.Name TTL Class SRV Priority Weight Port Target
16.4.1. SRV example
Continuing with the example, the SRV RR looks like:
Service, Proto, Name | TTL | Class | Record type | Priority | Weight | Port | Target |
_sip._tcp.example.com | 7200 | IN | SRV | 0 | 1 | 5060 | server1.example.com |
7200 | IN | SRV | 0 | 3 | 5060 | server2.example.com |
In this example the client of the SIP service in the "example.com" domain performs an SRV look-up of "_sip._tcp.example.com" followed by an A record look-up for "server2.example.com".
Field | Description |
---|---|
Service | Service identifier. An underscore "_" is pre-pended |
Proto | Desired protocol. An underscore "_" is pre-pended |
Name | The domain of the SRV record |
TTL | Time to live |
Class | Class of record (SRV records are of class IN, or Internet) |
SRV | Identifies the entry as an SRV RR |
Priority | The priority of the target host in this record. Clients with lowest numbered priority are tried first. Weight (see below) is used if more than one record carries the same priority |
Weight | Denotes a relative ... |
Get The IMS: IP Multimedia Concepts And Services, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.