DNS – Query Response ‘No Such Name’ but Client Can Ping Domain

domain-name-systeminternal-dns

Basically I issue a query (Type: PTR) from my client for the following

_some-service._tcp.gv.com

In response to that query, I get back

Reply code: No such name (3)

According to this question and rfc

3     Name Error - Meaningful only for
                   responses from an authoritative name
                   server, this code signifies that the
                   domain name referenced in the query does
                   not exist.

However when I am on my client the domain name does resolve to the correct ip address and I can ping without issue

[root@client/]# ping gv.com
PING gv.com (192.168.10.10) 56(84) bytes of data.
64 bytes from gv.com (192.168.10.10): icmp_seq=1 ttl=64 time=0.308 ms
64 bytes from gv.com (192.168.10.10): icmp_seq=2 ttl=64 time=0.329 ms
64 bytes from gv.com (192.168.10.10): icmp_seq=3 ttl=64 time=0.330 ms
64 bytes from gv.com (192.168.10.10): icmp_seq=4 ttl=64 time=0.306 ms
^C
--- gv.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms

Why does the DNS response give me the reply code 3 when the domain name resolves for my client?

Could it be that the error occurs because the service I am looking for does not exist in the DNS server?

Best Answer

I am afraid without detail it cannot be answered in the way you would be happy :-(.

In your question I would see some (let say) not common approach. In case it would be just theoretical question (you have mentioned capturing the packets) I would think about misunderstanding of the DNS service...

You have mentioned

_some-service._tcp.gv.com PTR

And later in the question:

ping gw.com

Where is absolutely no relation between it...

Let assume only IPv4 (to reduce set of relevant records only) and domain example.com:

There can be following relevant records (for simplicity "ignoring" zones separation):

example.com. IN A 192.0.2.10
www.example.com. IN A 192.0.2.20
web.example.com. IN CNAME www.example.com.
_http._tcp.example.com. IN SRV 10 10 80 www.example.com.

10.2.0.192.in-addr.arpa. IN PTR example.com.
20.2.0.192.in-addr.arpa. IN PTR www.example.com.

Http service (e.g. web browser) usually not using SRV but in theory it could be valid example.

A ... "translate" FQDN to IPv4 address
SRV ... SeRVice  record - can have wight and priority. 
    Pointing the location of the service with posibility of "alternative" endpoints.
CNAME ... Cannonical name - targeting other DNS record. With the answer
    the recursion (following query) is utilized.
PTR ... PoinTeR to cannonical name - usually used for reverse records but 
    by the definition it can be used in the similar way like CNAME just 
    without recursion.

Anyway in case of ping you are requesting simple A record so neither SRV nor PTR is utilized...

In case of MX (Mail eXchange - record used for e-mail delivery) in case of non existence there is defined fall back to A record to where to try to deliver the message...

It is possible that there is PTR record but once it is without success there could be utilized some "standard" A or SRV query. This would be visible in communication visible in Wireshark ;-). Definitely it is about implementation / behaviour of the specific application. This question would be addressed to the authors - why they have utilized the PTR records this way...

Related Topic