RFC 2782

A DNS RR for specifying the location of services (DNS SRV)
Standards Track Obsoletes: RFC 2052
February 2000
Abstract: DNS SRV records specify the location (hostname and port) of servers for specific services and protocols. SRV records are used in 3GPP for Diameter peer discovery, SIP server location, and NRF-based NF discovery supplementation.
Canonical source: https://www.rfc-editor.org/rfc/rfc2782  |  IETF Datatracker

1. Introduction

▶

SRV records extend DNS to provide service discovery. Unlike A/AAAA records that map hostnames to IPs, SRV records specify which host and port handle a particular service, with priority and weight for load balancing.

In 3GPP, SRV records are used for Diameter peer discovery (CER/CEA connection setup), SIP/IMS server location (RFC 3263), and as a fallback for NF discovery when NRF is unavailable.

2. SRV Record Format

▶
Field Description
_service Service name (e.g., _diameter, _sip, _http)
_protocol Transport protocol (_tcp, _sctp, _udp)
priority Lower value = higher priority (0-65535)
weight Load balancing weight among same-priority servers
port TCP/UDP/SCTP port number
target FQDN of the server (must have A/AAAA records)
  _service._protocol.name  TTL  IN  SRV  priority weight port target
Examples:
_diameter._sctp.epc.mnc001.mcc208.3gppnetwork.org. 300 IN SRV 10 50 3868 dra1.epc...
_diameter._sctp.epc.mnc001.mcc208.3gppnetwork.org. 300 IN SRV 10 50 3868 dra2.epc...
_diameter._sctp.epc.mnc001.mcc208.3gppnetwork.org. 300 IN SRV 20 0  3868 dra3.epc...
_sip._tcp.ims.mnc001.mcc208.3gppnetwork.org. 300 IN SRV 10 100 5060 pcscf1.ims...

3. 3GPP Usage

▶
  • Diameter peer discovery: _diameter._sctp.realm for finding DRA/DEA peers
  • SIP/IMS: _sip._tcp, _sip._udp, _sips._tcp for P-CSCF/S-CSCF discovery
  • NAPTR + SRV: 3GPP uses NAPTR records to select transport, then SRV for specific servers
  • FQDN conventions: 3GPP defines canonical FQDN formats (TS 23.003 §19) for DNS entries

4. Selection Algorithm

▶
  • Group SRV records by priority (ascending — lowest first)
  • Within same priority, select by weighted random (higher weight = more likely)
  • If selected server fails, try next in weight order, then next priority group
  • Cache TTL should be respected — stale SRV records can cause misrouting