Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SRV Request to DNS

234 views
Skip to first unread message

Harshith Mulky

unread,
Sep 29, 2015, 2:37:08 AM9/29/15
to bind-...@lists.isc.org
Hi all,

I had a query

Let us say we are having a FQDN and we need to Resolve it. It goes through the procedure of determining the IP and Port using NAPTR/SRV/A query mechanisms

The question I have is if I have a FQDN with a Port Number already determined, will it go through the Procedure of NAPTR/SRV/A query (or) simply do a A query (or) Is this left to the client to apply the Logic?

Thanks

Ray Bellis

unread,
Sep 29, 2015, 4:01:03 AM9/29/15
to bind-...@lists.isc.org
NAPTR / SRV are most commonly used when all you have is a "domain name"
and you need to determine the hostname and port associated with a
particular service at that domain (e.g. a SIP server)

I would therefore expect that given a specific hostname and port that
those would be used directly, rather than using NAPTR / SRV.

Ray


Harshith Mulky

unread,
Oct 5, 2015, 11:51:35 PM10/5/15
to bind-...@lists.isc.org
Hi all,

I had a query

Let us say we are having a FQDN and we need to Resolve it. It goes through the procedure of determining the IP and Port using NAPTR/SRV/A query mechanisms

The question I have is if I have a FQDN with a Port Number already determined, will it go through the Procedure of NAPTR/SRV/A query (or) simply do a A query (or) Is this left to the client to apply the Logic?

Thanks

Matus UHLAR - fantomas

unread,
Oct 12, 2015, 7:46:48 AM10/12/15
to bind-...@lists.isc.org
On 06.10.15 09:21, Harshith Mulky wrote:
>Let us say we are having a FQDN and we need to Resolve it. It goes through
> the procedure of determining the IP and Port using NAPTR/SRV/A query
> mechanisms

no, the ordinary resolution does NOT use NAPTR and SRV records, only A
and/or AAAA records.

>The question I have is if I have a FQDN with a Port Number already
> determined, will it go through the Procedure of NAPTR/SRV/A query (or)
> simply do a A query (or) Is this left to the client to apply the Logic?

DNS does NOT care about port numbers.
Some upper-level protocols do, but they must take care themselves.

please provide more detailesd question, or search archives if it hasn't been
answered already.

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Due to unexpected conditions Windows 2000 will be released
in first quarter of year 1901

Chris Buxton

unread,
Oct 13, 2015, 7:58:49 AM10/13/15
to Harshith Mulky, BIND Users
On Oct 5, 2015, at 11:51 PM, Harshith Mulky <harshit...@outlook.com> wrote:
Let us say we are having a FQDN and we need to Resolve it. It goes through the procedure of determining the IP and Port using NAPTR/SRV/A query mechanisms
The question I have is if I have a FQDN with a Port Number already determined, will it go through the Procedure of NAPTR/SRV/A query (or) simply do a A query (or) Is this left to the client to apply the Logic?

The client must supply the logic. DNS is conceptually a simple database service — ask a question, get an answer. The logic of using NAPTR records, SRV records, A records, AAAA records, and CNAME records is mostly handled by the client. (CNAME and DNAME records are the primary exception, triggering extra processing on the recursive name server.)

Chris

Darcy Kevin (FCA)

unread,
Oct 13, 2015, 3:56:30 PM10/13/15
to Harshith Mulky, BIND Users

Harshith,

I think you need to understand the proportionality here: the *vast*majority* of the time, the client already knows the port (because ports tend to be pre-assigned for specific services), and only needs to resolve the FQDN to one or more address records (A and/or AAAA records), in order to make a connection. This isn’t really a burden, or complicated logic in the client software, since it can just call a generic hostname lookup function (e.g. the traditional gethostbyname() or the more modern getaddrinfo()). It’s not like every application programmer needs to deal with parsing packet contents, handling retries, dealing with label compression, etc. This is all handled in the library routine.

 

Only in a small minority of cases do clients go through the whole NAPTR or SRV process. Some of the main scenarios for that include:

·         Microsoft Active Directory. The clients use SRV records as part of the so-called “dc locator” process to find a domain controller that provides a specific service

·         Certain IM clients (like Lync) use SRV records to find SIP services

·         SIP telephony clients use NAPTR records

 

Note that SMTP clients use MX records rather than SRV records. MX records can be considered the simpler, mail-specific precursor to SRV records. Theoretically, SMTP _could_ be switched over to use SRV records, but the use of MX is so ingrained that it’s probably not worth the (massive) effort.

 

If you look at nameserver query statistics, you’ll see that the volume of SRV and/or NAPTR queries on a typical nameserver/resolver is a miniscule fraction of the A/AAAA traffic. Where MX-record traffic falls between those extremes, will depend a lot on whether the nameserver/resolver is internal or external, whether the particular domain is heavily used for mail, etc.

 

                                                                                                                                                                                                - Kevin

Mark Andrews

unread,
Oct 13, 2015, 4:20:20 PM10/13/15
to Darcy Kevin (FCA), Harshith Mulky, BIND Users

To answer the question. What you do when given a name and a port
is protocol specific. Read the protocol specification. Note if
the port is the well known port for the protocol then it may be
ignored.

If the protocol does not specify most developers will just implement
the protocol over that port to the specified host taking into account
well known ports if needed.

To used SRV with a protocol you need a specification that says to
do so. Using SRV without such a specification results in undefined
behaviour.

This really isn't a DNS question. The DNS is just the database
that stores the values that are being looked up.

Mark


In message <d5ff3ef51b504cca...@mxph4chrw.fgremc.it>, "Darcy Kevin
(FCA)" writes:
>
> Harshith,
> I think you need to understand the proportionality here: the
> *vast*majority* of the time, the client already knows the port (because
> ports tend to be pre-assigned for specific services), and only needs to
> resolve the FQDN to one or more address records (A and/or AAAA records),
> in order to make a connection. This isn't really a burden, or complicated
> logic in the client software, since it can just call a generic hostname
> lookup function (e.g. the traditional gethostbyname() or the more modern
> getaddrinfo()). It's not like every application programmer needs to deal
> with parsing packet contents, handling retries, dealing with label
> compression, etc. This is all handled in the library routine.
>
> Only in a small minority of cases do clients go through the whole NAPTR
> or SRV process. Some of the main scenarios for that include:
>
> * Microsoft Active Directory. The clients use SRV records as part
> of the so-called "dc locator" process to find a domain controller that
> provides a specific service
>
> * Certain IM clients (like Lync) use SRV records to find SIP
> services
>
> * SIP telephony clients use NAPTR records
>
> Note that SMTP clients use MX records rather than SRV records. MX records
> can be considered the simpler, mail-specific precursor to SRV records.
> Theoretically, SMTP _could_ be switched over to use SRV records, but the
> use of MX is so ingrained that it's probably not worth the (massive)
> effort.
>
> If you look at nameserver query statistics, you'll see that the volume of
> SRV and/or NAPTR queries on a typical nameserver/resolver is a miniscule
> fraction of the A/AAAA traffic. Where MX-record traffic falls between
> those extremes, will depend a lot on whether the nameserver/resolver is
> internal or external, whether the particular domain is heavily used for
> mail, etc.
>
>
>
> - Kevin
>
> From: bind-user...@lists.isc.org
> [mailto:bind-user...@lists.isc.org] On Behalf Of Chris Buxton
> Sent: Tuesday, October 13, 2015 7:58 AM
> To: Harshith Mulky
> Cc: BIND Users
> Subject: Re: SRV Request to DNS
>
> On Oct 5, 2015, at 11:51 PM, Harshith Mulky
> <harshit...@outlook.com<mailto:harshit...@outlook.com>> wrote:
> Let us say we are having a FQDN and we need to Resolve it. It goes
> through the procedure of determining the IP and Port using NAPTR/SRV/A
> query mechanisms
>
> The question I have is if I have a FQDN with a Port Number already
> determined, will it go through the Procedure of NAPTR/SRV/A query (or)
> simply do a A query (or) Is this left to the client to apply the Logic?
>
> The client must supply the logic. DNS is conceptually a simple database
> service - ask a question, get an answer. The logic of using NAPTR
> records, SRV records, A records, AAAA records, and CNAME records is
> mostly handled by the client. (CNAME and DNAME records are the primary
> exception, triggering extra processing on the recursive name server.)
>
> Chris
>

--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org

Barry Margolin

unread,
Oct 14, 2015, 11:29:19 AM10/14/15
to comp-protoc...@isc.org
In article <mailman.2812.1444767...@lists.isc.org>,
Mark Andrews <ma...@isc.org> wrote:

> To answer the question. What you do when given a name and a port
> is protocol specific. Read the protocol specification. Note if
> the port is the well known port for the protocol then it may be
> ignored.
>
> If the protocol does not specify most developers will just implement
> the protocol over that port to the specified host taking into account
> well known ports if needed.
>
> To used SRV with a protocol you need a specification that says to
> do so. Using SRV without such a specification results in undefined
> behaviour.

Are there *any* current, well-known protocols that make use of SRV
records to find the port? The examples I've seen just use it to find a
server (analogous to the way MX records are used for mail).

Theoretically, this could be useful for HTTP, so you wouldn't have to
put :port# in URLs if the domain uses an alternate port. It would make
things easier when you have servers for multiple domains behind a NAT
router with a single public address. But AFAIK there's been no movement
to require browsers to use SRV for this.

--
Barry Margolin
Arlington, MA

Anders Löwinger

unread,
Oct 14, 2015, 11:40:45 AM10/14/15
to bind-...@lists.isc.org
Den 2015-10-14 kl. 17:29, skrev Barry Margolin:
Are there *any* current, well-known protocols that make use of SRV 
records to find the port? The examples I've seen just use it to find a 
server (analogous to the way MX records are used for mail).

Bob Harold

unread,
Oct 14, 2015, 12:37:57 PM10/14/15
to Anders Löwinger, bind-...@lists.isc.org
--- But not sure if the 'port' is actually used, since it can also be defined in the conf file.

--
Bob Harold
 

Alan Clegg

unread,
Oct 14, 2015, 1:33:47 PM10/14/15
to bind-...@lists.isc.org
On 10/14/15 11:29 AM, Barry Margolin wrote:

> Are there *any* current, well-known protocols that make use of SRV
> records to find the port? The examples I've seen just use it to find a
> server (analogous to the way MX records are used for mail).

I guess it depends on what you define as a well-known protocol...

Teamspeak 3:
https://support.teamspeakusa.com/index.php?/Knowledgebase/Article/View/293/12/does-teamspeak-3-support-dns-srv-records

AlanC
--
When I do still catch the odd glimpse, it's peripheral; mere fragments
of mad-doctor chrome, confining themselves to the corner of the eye.

signature.asc

Mark Andrews

unread,
Oct 14, 2015, 6:38:23 PM10/14/15
to Alan Clegg, bind-...@isc.org
All protocols that use SRV do. It's the operators that decide the
port to put in the SRV record, not the protocol.

Mark
0 new messages