Community discussions

MikroTik App
 
zorrua
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 53
Joined: Sun Sep 17, 2017 4:32 pm

Windows DNS client problem

Wed May 19, 2021 9:57 am

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.
 
User avatar
jvanhambelgium
Forum Guru
Forum Guru
Posts: 1119
Joined: Thu Jul 14, 2016 9:29 pm
Location: Belgium

Re: Windows DNS client problem

Wed May 19, 2021 10:30 am

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.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12594
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Windows DNS client problem

Wed May 19, 2021 10:32 am

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...)
 
levicki
newbie
Posts: 32
Joined: Mon Apr 30, 2018 12:22 pm
Location: Belgrade, Serbia
Contact:

Re: Windows DNS client problem

Wed May 19, 2021 3:22 pm

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.

Who is online

Users browsing this forum: No registered users and 57 guests