LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   DNS names resolution (https://www.linuxquestions.org/questions/linux-general-1/dns-names-resolution-4175427205/)

leamassiot 09-14-2012 04:16 AM

DNS names resolution
 
Hello,

Thank you for reading my post.

I'm working in a mixed Linux/Windows environment.
I've a Debian server "S" acting as a DHCP server, DNS server and Samba server and some (client) Windows machines (mostly).
All these machines belong to the same LAN, to the same name domain and to the same Samba domain.

- Machines either get their IP address via DHCP or have a statically assigned IP address.
- For each statically assigned IP addresses, there is a record (hostname, IP) and the reverse record in the appropriate DNS zone files.
- For DHCP assigned addresses, the DNS zone files are dynamically updated by the DHCP server.
- Every machine is part of the Samba domain and has been added to "smbpasswd".

Now, my problem is the following: I suddenly realized I do not properly understand how names are resolved. Here is why:

- On Windows machines and for static IP addresses, I used to set the DNS name server as "S" in the network interface configuration.
- For dynamically allocated IP addresses, it was also set that way in "dhcpd.conf" by means of the "ddns-domainname", "ddns-rev-domainname"... attributes.

Now, on one machine, none of the DNS servers is set as "S" in the network interface and yet names resolution is working "properly".
On this machine, I can do a "nslookup":
Code:

cmd.exe> nslookup <another_machine_name_in_the_domain>
Server:  dns-abo-static-a.wanadoo.fr
Address:  80.10.246.2

*** dns-abo-static-a.wanadoo.fr can't find <another_machine_name_in_the_domain>: Non-existent domain

(a message which I understand...)
and yet, I can ping the name <another_machine_name_in_the_domain>
and access all the shares on that <another_machine_name_in_the_domain>.

If I do the same thing on a machine for which I've the DNS server set as "S", here is what I get:
Code:

cmd.exe> nslookup <another_machine_name_in_the_domain>
Server:  S.my.domain.name
Address:  x.y.z.w1

Name:    <another_machine_name_in_the_domain>.my.domain.name
Address:  x.y.z.w2

So, in the first case, I do not understand how names are actually resolved.

I would like to mention I also know about the Netbios cache which I could empty with the command "nbtstat -R" but even after that, names resolution still worked.
Which leads me to ask myself, if there is another cache for names
or another mechanism I'm not aware of for solving names?

Can you advise a procedure for troubleshooting this or explain the mechanism actually at stake?


Thank you for helping and best regards.

etech3 09-15-2012 05:00 PM

You said the client machines are windows, mostly. Same issue on linux and windows?

leamassiot 09-17-2012 03:34 AM

Hello and thank you for your answer.

Quote:

You said the client machines are windows, mostly. Same issue on linux and windows?
Ok, below are the tests I ran on a Linux machine in my network.

1) First test with the following "/etc/resolv.conf":
Code:

nameserver 80.10.246.2
nameserver 80.10.246.129

Note that the above IP addresses are some of my ISP's DNS IP addresses.

Code:

# ping google.com
It works.

Code:

# nslookup <another_machine_name_in_the_domain>
Server: 80.10.246.2
Address: 80.10.246.2#53

** server can't find <another_machine_name_in_the_domain>: NXDOMAIN

Code:

#nslookup <another_machine_name_in_the_domain>.my.domain.name
Server: 80.10.246.2
Address: 80.10.246.2#53

** server can't find <another_machine_name_in_the_domain>.my.domain.name: NXDOMAIN

2) Second test with the following "/etc/resolv.conf":

Code:

search my.domain.name
nameserver x.y.z.w1

Note that the above IP address is "S"'s IP address, my DNS IP address.

Code:

# nslookup <another_machine_name_in_the_domain>
Server: x.y.z.w1
Address: x.y.z.w1#53

Name: <another_machine_name_in_the_domain>.my.domain.name
Address: x.y.z.w2

So, to answer your question: no, I do not have the same issue on a Linux machine.
It works as expected in the Linux case.

So I still don't know what is going wrong on the Windows machines...

Thank you for helping and best regards.

etech3 09-17-2012 09:22 AM

take a look at this: http://support.microsoft.com/kb/305553


All times are GMT -5. The time now is 09:09 PM.