Nslookup working, but cannot ping

Expected Behaviour:

Be able to nslookup a local DNS using Pihole as DNS, and be able to see an HTTP server and ping the machine

Actual Behaviour:

Lookup is working and is giving the correct IP.
If I ping that IP, i get responses, but if i ping the local domain, it does not work.

C:\Users\Alexandre>nslookup node1
Serveur :   pi.hole
Address:  192.168.2.114

Nom :    node1
Address:  192.168.2.101

C:\Users\Alexandre>ping 192.168.2.101

Envoi d’une requête 'Ping'  192.168.2.101 avec 32 octets de données :
Réponse de 192.168.2.101 : octets=32 temps=1 ms TTL=63

Statistiques Ping pour 192.168.2.101:
    Paquets : envoyés = 1, reçus = 1, perdus = 0 (perte 0%),
Durée approximative des boucles en millisecondes :
    Minimum = 1ms, Maximum = 1ms, Moyenne = 1ms

C:\Users\Alexandre>ping node1
La requête Ping n’a pas pu trouver l’hôte node1. Vérifiez le nom et essayez à nouveau.

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

Sorry, here is the token URL: https://tricorder.pi-hole.net/uMKT9tWb/ Thank you!

How did you configure your Windows client to make use of Pi-hole?

I'm asking because your router is distributing its own IP as DNS server:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   
   * Received 300 bytes from eth0:192.168.2.1
     Offered IP address: 192.168.2.43
     DHCP options:
      Message type: DHCPOFFER (2)
      router: 192.168.2.1
      dns-server: 192.168.2.1

Yet your nslookup shows that client to use your Pi-hole at 192.168.2.114, at least for that specific lookup. If you had provided your Windows client with any alternative DNS server in addition to Pi-hole, Windows could by-pass Pi-hole via any such alternative DNS server.

Apart from that, your debug log looks inconspicuous.

So my guess would be that your Windows machine is showing a known misbehaviour where ping would refuse to try resolving a non-dot domain via DNS.

Appending a dot to the name should force ping to use DNS, e.g.

ping node1.

(As a side note, in general, ping isn't adequate to analyse DNS issues, as it is also using other means to resolve a hostname, e.g. mDNS, local hosts file entries, and a Windows ping may also mix in things like lmhosts, NetBIOS resolution, WINS, AD services etc..)

1 Like

It is indeed working with a dot after the hostname when using ping, as well as in Chrome.
For the record, i've set the DNS server in the network adapter settings on Windows.

Thank you so much for your quick and correct answer!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.