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
And later in the question:
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):
Http service (e.g. web browser) usually not using SRV but in theory it could be valid example.
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...