Windows DNS client problem

Hello,

I use the Mikrotik router as a central DNS of my home.

I have this 2 lines:

/ip dns static
add address=192.168.1.2 name=test
add address=192.168.1.2 name=test.domain.com

From a Windows 10 machine, I can resolv the host with domain, but not without the domain:

C:\>nslookup test.domain.com
Servidor:  UnKnown
Address:  192.168.1.1

Respuesta no autoritativa:
Nombre:  test.domain.com
Address:  192.168.1.2



C:\>nslookup test
Servidor:  UnKnown
Address:  192.168.1.1

*** UnKnown no encuentra test: Non-existent domain

In Linux client it works great:

# host test
test has address 192.168.1.2



# host test.domain.com
test.domain.com has address 192.168.1.2
test.domain.com mail is handled by 10 mx.domain.com.

Why I can not resolv the “test” hostname?

Thanks for your help.

Kind regards.

Perform a “nslookup” + enter
Then “set debug=true”
Then perform the lookup again and what output you get.

What do you see ? Does you Win10 perform a lookup perhaps with some extra’s added or really only “test”
Would not surprise me.

On windows 10 recently DNS without any dot . are invalid, it depend on what version and what settings you have on the machine.

Formerly >test< is invalid DNS name, must be at least >test.< with one dot



C:\WINDOWS\system32>ping test
Impossibile trovare l'host test. Verificare che il nome sia corretto e riprovare.



C:\WINDOWS\system32>ping test.
Esecuzione di Ping test [192.168.0.1] con 32 byte di dati:
Risposta da 192.168.0.1: byte=32 durata<1ms TTL=128
Risposta da 192.168.0.1: byte=32 durata<1ms TTL=128
Risposta da 192.168.0.1: byte=32 durata<1ms TTL=128
Risposta da 192.168.0.1: byte=32 durata<1ms TTL=128

Statistiche Ping per 192.168.0.1:
    Pacchetti: Trasmessi = 4, Ricevuti = 4,
    Persi = 0 (0% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
    Minimo = 0ms, Massimo =  0ms, Medio =  0ms

oddly is reported test without dot… (…Ping test [192…)

If you do not have a real domain (read: domain controller), and your PC is not domain-joined, then Windows (and probably Linux as well) will not append any DNS search suffix to host names when it triies to resolve them on the DNS server.

On Windows, you can go to Control Panel > Network Connections, right-click on your LAN or Wi-Fi connection, then select Properties, then select Internet Protocol Version 4, thern click on Properties button, then on Advanced… button, then select DNS tab, and there you can configure specifics of how DNS lookup will work. For example, you can enter “domain.com” into DNS suffix for this connection, and then remove your “test” DNS entry because it is not necessary. Both “test” and “test.domain.com” should resolve after you make that change.