LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   simple DNS server (dnsmasq) with Windows hosts? (http://www.linuxquestions.org/questions/linux-server-73/simple-dns-server-dnsmasq-with-windows-hosts-791446/)

Umanga 02-25-2010 04:00 AM

simple DNS server (dnsmasq) with Windows hosts?
 
Greetings friends,

I have installed 'dnsmasq' in my Debian server (192.168.2.10) and configured all host names in its '/etc/hosts' file as:

Code:

192.168.2.10 simba
192.168.2.12 mufasa
192.168.2.15 nala
192.168.2.18 kaira
192.168.2.21 sarab

I added a nameserver in all hosts (192.168.2.10).

I can ping from any linux workstation for a hostname,but when I ping for any of above host name from a Windows machine , it cannot resolve it.

How can I use 'dnsmasq' server to resolve names from a Window machine ?

thanks in advance.

MS3FGX 02-25-2010 04:32 AM

Are you using DHCP for the Windows clients? Have you checked that they are using your server as their primary DNS?

In the past I have noticed that Windows clients don't always pick up a dnsmasq DNS server with the default configuration, and they need to be forced by adding something like this to dnsmasq.conf:

Code:

# Set DNS server for Windows machines
dhcp-option=6,192.168.2.10


Umanga 02-25-2010 07:52 PM

Thanks alot MS3FGX,

I added the option you mentioned but still Windows machines doesnt resolve the names.

In the 'ipconfig/all' it shows:

Quote:

DHCP Server .......: 192.168.1.5
DNS Servers .......: 192.168.2.1
192.168.1.5
But it works fine when I added the server IP (192.168.1.5) in TCP/IP4 settings manually.





Quote:

Originally Posted by MS3FGX (Post 3876136)
Are you using DHCP for the Windows clients? Have you checked that they are using your server as their primary DNS?

In the past I have noticed that Windows clients don't always pick up a dnsmasq DNS server with the default configuration, and they need to be forced by adding something like this to dnsmasq.conf:

Code:

# Set DNS server for Windows machines
dhcp-option=6,192.168.2.10



gustavoc 07-29-2011 08:17 AM

I guess that by this time you have already solved this problem, but if not I think I have the answer (because I faced the same issue and finally got it working!). By using tcpdump to debug the name resolution of the windows client I have noticed that before asking for the domain name to resolve, it asks for the own name (reverse resolution) of the host that is running dnsmasq (the dns "server"). If the host running dnsmasq does not respond to this query, the win client discards it and asks the next dns server available (in my case i had 2 networks on the win machine). Solution, add a line to /etc/hosts containing the own dnsmasq box ip and name. Take notice that my dnsmasq box has several interfaces and there was only one line on /etc/hosts pointing to the ip of eth0, so I added the other interfaces there. This way the dnsmasq process will answer the initial query and everyone is happy!
Hope this will help you!

Gustavo.


All times are GMT -5. The time now is 01:18 AM.