0% found this document useful (0 votes)
38 views

DNS SRV Guide 0

Grandstream Networks provides a guide for using DNS SRV records with their VoIP devices. DNS SRV allows devices to locate SIP servers through a domain name lookup, providing priority, weight, and backup server options. Grandstream products support both basic DNS SRV lookups as well as combined DNS NAPTR/SRV lookups to first discover available services and then get SRV records to use for connecting to SIP servers. The document provides instructions for configuring DNS SRV on Grandstream devices and DNS servers.

Uploaded by

Deep_Mind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

DNS SRV Guide 0

Grandstream Networks provides a guide for using DNS SRV records with their VoIP devices. DNS SRV allows devices to locate SIP servers through a domain name lookup, providing priority, weight, and backup server options. Grandstream products support both basic DNS SRV lookups as well as combined DNS NAPTR/SRV lookups to first discover available services and then get SRV records to use for connecting to SIP servers. The document provides instructions for configuring DNS SRV on Grandstream devices and DNS servers.

Uploaded by

Deep_Mind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Grandstream Networks, Inc.

DNS SRV Guide


Table of Contents

SUPPORTED DEVICES ................................................................................................. 4

INTRODUCTION ............................................................................................................. 5

DNS-SRV ........................................................................................................................ 6

DNS-SRV Format .................................................................................................................................. 6

Configuring DNS-SRV On Grandstream Devices.................................................................................. 6

DNS-SRV Lookup .................................................................................................................................. 8

Registration Process....................................................................................................................... 9

DNS NAPTR/SRV ......................................................................................................... 10

DNS NAPTR/SRV Format ................................................................................................................... 10

DNS NAPTR/SRV Lookup ................................................................................................................... 11

DNS SERVER CONFIGURATION ................................................................................ 13

Page |2
DNS SRV Guide
Table of Figures

Figure 1: DNS Interaction .............................................................................................................................. 5


Figure 2: GXP2170 SIP Configuration .......................................................................................................... 7
Figure 3: Network Settings ............................................................................................................................ 7
Figure 4: Registration Process ...................................................................................................................... 9
Figure 5: SRV Lookup ................................................................................................................................... 9
Figure 6: Network Settings 2 ....................................................................................................................... 11
Figure 7: DNS NAPTR/SRV Lookup ........................................................................................................... 12
Figure 8: Configure Records ....................................................................................................................... 13
Figure 9: New Zone ..................................................................................................................................... 13
Figure 10: Forward Zone ............................................................................................................................. 14
Figure 11: Zone Name ................................................................................................................................ 14
Figure 12: New NAPTR Record .................................................................................................................. 15
Figure 13: NAPTR Record .......................................................................................................................... 15
Figure 14: New SRV Record ....................................................................................................................... 16
Figure 15: SRV Record ............................................................................................................................... 16
Figure 16: New A Record ............................................................................................................................ 17
Figure 17: A Record .................................................................................................................................... 17
Figure 18: Save Settings ............................................................................................................................. 17

Table of Tables

Table 1: List of Supported Products .............................................................................................................. 4


Table 2: DNS-SRV Fields Description ........................................................................................................... 6
Table 3: Phone DNS Settings........................................................................................................................ 8
Table 4: DNS-NAPTR/SRV Fields Description ........................................................................................... 10

Page |3
DNS SRV Guide
SUPPORTED DEVICES
Following table shows Grandstream products supporting DNS-SRV protocol.

Table 1: List of Supported Products

Model Supported Firmware


High End IP Phones
GXP21XX Series
GXP2130/2140/2160
Yes 1.0.7.25 or higher
GXP2135/2170
Mid-Range IP Phones
GXP17XX Series
GXP1760/1780/1782 Yes 1.0.0.37 or higher
Basic IP Phones
GXP16XX Series
GXP1610/1615
GXP1620/1625 Yes 1.0.4.6 or higher

GXP1628/1630
IP Video Phones for Android
GXV32XX Series
GXV3240/3275 Yes 1.0.3.92 or higher
Full HD Video Conferencing System
GVC3200 Series
GVC3200/3202 Yes 1.0.1.74 or higher
Audio Conferencing System
GAC2500 Series
GAC2500 Yes 1.0.1.44 or higher
Analog VoIP Gateways
GXW42XX / GXW40XX Series
GXW4004/4008 1.0.15.5 or higher
Yes
GXW4216/4224/4232/4248 1.0.5.16 or higher
Analog Telephone Adaptors
HT5XX / HT7XX / HT8XX Series
HT502/503 1.0.15.5 or higher
HT701/702/704 Yes 1.0.8.2 or higher
HT802/812/814 1.0.2.5 or higher
Cordless IP Phones
DP750/DP720 Series
DP750 Yes 1.0.1.20 or higher

Page |4
DNS SRV Guide
INTRODUCTION
SRV records (Service records) are names in DNS (Domain Name System) allowing to locate servers for
specific service, by providing hostname, port number, weight and priority information in response to a DNS
lookup request.

DNS SRV can be used to discover the SIP server domain, in order to get registered to make and receive
calls, and can be also used to identify a backup SIP server domain in the event the primary server fails,
providing high availability with no service interruption.

A SIP client configured with a domain name as SIP server (example: grandstream.com), if DNS lookup is
using "A Record", the response from the DNS server will include a single IP address for this domain. While
if this domain offers different servers for the same service (SIP), DNS SRV can help to provide hostnames,
port number, weight and priority for each server, allowing SIP client to connect to the first available server
(depending on priority and weight). In addition, Grandstream products support DNS SRV/NAPTR, NAPTR
records are used in conjunction with SRV records to discover available services (SIP, email, web, FTP…)
in a specific domain, and provide DNS SRV records as response to use for DNS lookup.

The following flow shows DNS interaction between Grandstream products and DNS server:

DNS
Server

Choose the FQDN


DNS – NAPTR query

Services available

Choose the service


DNS – SRV query

List of hosts providing the service

Choose the host


DNS – A or AAAA query

IP Address

Figure 1: DNS Interaction

Page |5
DNS SRV Guide
DNS-SRV

DNS-SRV Format
The format for a DNS SRV lookup is the following:

_Service._Proto.Name TTL Class SRV Priority Weight Port Target

Table 2: DNS-SRV Fields Description

Fields Description

Service The name of the service to resolve (http, sip, ldap…).

Proto The protocol used by this service (udp or tcp).

Name The domain name of the wanted service


The time interval that the resource record may be cached before the
TTL source of the information should again be consulted.

Specify the type of the Resource record it can be:


 IN: The Internet class
 CS: The CSNET class (Obsolete - used only for examples in
Class some obsolete RFCs)
 CH: The CHAOS class
 HS: Hesiod [Dyer 87]
A client attempt to contact the target host with the lowest-numbered
Priority priority it can reach, target hosts with the same priority will be tried in an
order defined by the weight field. The range is 0-65535
It specifies a relative weight for entries with the same priority. Larger
Weight weight will get high priority of being selected. The range of this number is
0-65535.
The port on this target host of this service. The range is 0-65535.
Port

The domain name of the target host. This entry should return one or more
Target address records for this name.

Configuring DNS-SRV On Grandstream Devices


GXP2170 is used in this guide as example for the configuration.

1. Enter account credentials under “Accounts > Account X > General Settings”.
In this example: “SIP Server” is “grandstream.com” and “Outbound proxy” is
“test.grandstream.com”.

Page |6
DNS SRV Guide
Figure 2: GXP2170 SIP Configuration

2. Set “DNS Mode” to “SRV” under “Accounts > Account X > Network Settings”

Figure 3: Network Settings

The table below explains available options related to DNS configuration:

Page |7
DNS SRV Guide
Table 3: Phone DNS Settings

Field Description
DNS Mode This parameter controls how the search appliance looks up IP addresses for
hostnames. There are four modes: A Record, SRV, NAPTR/SRV, Use Configured IP.
The default setting is "A Record". If the user wishes to locate the server by DNS SRV,
the user may select "SRV" or "NAPTR/SRV". If "Use Configured IP" is selected,
please fill in the three fields below:
 Primary IP.
 Backup IP 1.
 Backup IP 2.
If SIP server is configured as domain name, phone will not send DNS query, but use
“Primary IP” or “Backup IP x” to send SIP message if at least one of them are not
empty. Phone will try to use “Primary IP” first. After 3 tries without any response, it
will switch to “Backup IP x”, and then it will switch back to “Primary IP” after 3 re-tries.
If SIP server is already an IP address, phone will use it directly even “User Configured
IP” is selected.
DNS SRV Fail- The option will decide which IP is going to be used in sending SIP packets after IPs
over Mode for SIP server host are resolved with DNS SRV.
 Default
If the option is set with "default", it will again try to send register messages to one IP
at a time, and the process repeats.
 Saved one until DNS TTL
If the option is set with "Saved one until DNS TTL", it will send register messages to
the previously registered IP first. If no response, it will try to send one at a time for
each IP. This behavior lasts as long as DNS TTL (time-to-live) is up.
 Saved one until no responses
If the option is set with "Saved one until no responses", it will send register messages
to the previously registered IP first, but this behavior will persist until the registered
server does not respond.

DNS-SRV Lookup
In order to Register account in the above example, the phone will try to resolve the domain
“test.grandstream.com”, therefore:

 The phone will send a SRV lookup for “test.grandstream.com”.


 The DNS server will reply with a list of FQDN’s with different weight and priorities.
 The phone will issue an A record query for all the FQDNs starting from the one with the lowest
priority number.
 The DNS server will send back the IP addresses associated with those FQDNs.
 The phone will then send SIP REGISTER request to the IP address associated with the lowest
priority number returned by the SRV lookup.

Page |8
DNS SRV Guide
Registration Process

If the primary SIP server where the phone is registered (192.168.10.13) fails, the phone act as follow:

 After the register expiration, the phone will send 3 SIP REGISTER requests to the primary server,
and won’t get a reply.
 The phone will consider the server not available and then send a REGISTER request to the backup
server (192.168.10.12).

Figure 4: Registration Process

Once the primary server returns to normal, after the register expiration the phone will send again
REGISTER request to the primary server.

Note: The same REGISTER process is applied for INVITE and BYE messages.

Figure 5: SRV Lookup

Page |9
DNS SRV Guide
DNS NAPTR/SRV

DNS NAPTR/SRV Format


NAPTR resource records are used to replace compact, regular expressions with a replacement field that
may well be a pointer to another rule, its DNS-type code is 35.

The format of an NAPTR record is as follows:

Domain TTL Class Type Order Preference Flags Service Regexp


Replacement

Table 4: DNS-NAPTR/SRV Fields Description

Fields Description

Domain The domain name to which this resource record refers

the time interval that the resource record may be cached before the source of
TTL the information should again be consulted.

Specify the type of the Resource record it can be:


 IN: The Internet class
 CS: The CSNET class (Obsolete - used only for examples in some
Class obsolete RFCs)
 CH: The CHAOS class
 HS: Hesiod [Dyer 87]
Type DNS type code for NAPTR is 35
Order order in which the NAPTR records need to be processed, low numbers are
processed before high numbers.
Preference Specifies the order in which NAPTR records with the same “Order” values
need to be processed. records are processed from lower preference numbers
to higher preference numbers.
Flags Indicate what happens next after this lookup, at this time 4 flags are defined.
 The “S” flag indicates that the next lookup should be an SRV lookup.
 The “A” flag indicates that the next step is a DNS A, AAAA, A6 record
lookup.
 The "U" flag means that the next step is not a DNS lookup but that the
output of the Regexp field is an URI that adheres to the 'absoluteURI'.
 The “P” flag indicates that the remainder of the lookup are defined by
the application that uses the NAPTR.
Service Specifies the services available in this domain. The replacement field is used
to get to this service. It can also specify the protocol used to communicate with

P a g e | 10
DNS SRV Guide
the server that offers this service. In SIP, three services are defined along with
their resolution services (resolution services are defined after the “+” sign):
 “SIPS+D2T”: Secure SIP, TLS over TCP.
 “SIP+D2T”: SIP over TCP.
 “SIPS+D2S”: Secure SIP, TLS over SCTP.
 “SIP+D2S”: SIP over SCTP.
 “SIP+D2U”:SIP over UDP.
Regexp Carries a substitution expression that is applied to the original domain name in
order to construct a new domain name for the next lookup.
Replacement The next name used to query a DNS. This could be another NAPTR, SRV or A
record. In SIP the replacement fields are SRV RRs and hence the flag field is
set to “S”.

DNS NAPTR/SRV Lookup


Using the GXP2170 example the DNS settings can be found under “Accounts > Account X > Network
Settings”.

Figure 6: Network Settings 2

Using the example in Figure 1, in order to register the account, the phone will make the following lookup:

 The phone will send a NAPTR lookup for the domain “test.grandstream.com”.
 The server will return back a NAPTR record reply that contain the next step for the lookup.
 The phone will send an SRV lookup for using parameters returned on the NAPTR record.
 The DNS server will reply with a list of FQDN’s with different weight and priorities.
 The phone will issue an A record query for all the FQDNs starting from the one with the lowest
priority number.
 The DNS server will send back the IP addresses associated with those FQDNs.

P a g e | 11
DNS SRV Guide
 The phone will then send SIP REGISTER request to the IP address associated with the lowest
priority number returned by the SRV lookup.

Figure 7: DNS NAPTR/SRV Lookup

Note: The registration process is the same as described previously on SRV section.

P a g e | 12
DNS SRV Guide
DNS SERVER CONFIGURATION
A trial Version of Simple DNS Plus is used as DNS server in this example.

In order to configure Simple DNS with SRV and NAPTR records please follow those steps:

1. Download and install Simple DNS plus from this link: SimpleDNSPlus.
2. Open Simple DNS Plus and Click on Records to start configuration.

Figure 8: Configure Records

3. Create a new Primary Zone.

Figure 9: New Zone

P a g e | 13
DNS SRV Guide
4. The following window will be prompt, select Forward Zone and Click Next.

Figure 10: Forward Zone

5. Enter the name of your zone which is “grandstream.com” in our example, then click on Finish.

Figure 11: Zone Name

Once the zone created successfully, we can start creating our records as follow:

P a g e | 14
DNS SRV Guide
6. Right Click on the zone created which is “grandstream.com” then select “Other New Records”
and click on “NAPTR-record”, this will create our NAPTR record.

Figure 12: New NAPTR Record

7. Fill the information related to the NAPTR record and click “OK” as shown below.

Figure 13: NAPTR Record

8. Create SRV records by clicking on “grandstream.com” zone, then select “Other New Records”
and click on “SRV-record”, this will create our NAPTR record.

P a g e | 15
DNS SRV Guide
Figure 14: New SRV Record

9. Fill the information related to the SRV record and click “OK” as shown below.

Figure 15: SRV Record

10. Create SRV records by clicking on “grandstream.com” zone, then select “Other New Records”
and click on “SRV-record”, this will create our NAPTR record.

P a g e | 16
DNS SRV Guide
Figure 16: New A Record

11. Fill the information related to the A record and click “OK” as shown below.

Figure 17: A Record

Once all the Records created click on Save Zone as shown below to save the zone and complete the
Server configuration.

Figure 18: Save Settings

P a g e | 17
DNS SRV Guide

You might also like