# DNSMASQ VS BIND + ISC-DHCPD



## cesjr (Jan 12, 2017)

Hi guys
I have been change the BIND + ISC-DHCPD to DNSMASQ , it looks fine , but I notice some error message in below :

```
Ignoring domain ABC-TECH for DHCP host name SALES13
```
What does it means to ?
Below is my /etc/hosts setting :

```
127.0.0.1               ns              ns.intra.net
192.168.1.20            mail2           mail2.intra.net
192.168.1.20            mail2           mail2.abc-tech.com.tw
192.168.1.20            gate2           gate2.abc-tech.com.tw
```
Under BIND setting , mail2 is a CNAME of gate2  , both IE and google can resolving mail2.abc-tech.com.tw , but  DNSMASQ  not , it only working fine on google !
At the same time , I using nslookup to resolve both mail2.abc-tech.com.tw and gate2.abc-tech.com.tw on my windows client , the result is ok !
I have no idea about that ....what cause this situation ?


----------



## aribi (Jan 13, 2017)

I am guessing this is because your dhcp server gives you the domain and hostname and the domain is not fully qualified. From the CAPITALS in both domainname and hostname it seems that your dhcp server is a windows system that (erroneously) provides windows domainname as dns domain. If this is dhcp client please check /var/db/dhclient.leases.YOURINTERFACE.
Otherwise, please explain what exactly gave error message 


cesjr said:


> Ignoring domain ABC-TECH for DHCP host name SALES13


which host: dhcp server or client? In /var/log/messages?

And another thing, /etc/hosts should always contain an entry for localhost:

```
127.0.0.1       localhost
```
Your nameserver should be mentioned in this file with it's 192.168 address. If you want to reach the default nameserver via 127.0.0.1 solve this in `/etc/resolv.conf`


----------



## cesjr (Jan 16, 2017)

aribi said:


> I am guessing this is because your dhcp server gives you the domain and hostname and the domain is not fully qualified. From the CAPITALS in both domainname and hostname it seems that your dhcp server is a windows system that (erroneously) provides windows domainname as dns domain. If this is dhcp client please check /var/db/dhclient.leases.YOURINTERFACE.
> Otherwise, please explain what exactly gave error message
> 
> which host: dhcp server or client? In /var/log/messages?
> ...




The domaine was given by SAMBA Server :

```
workgroup = ABC-TECH
server string = GATE99 (%h Samba %v)
netbios name = gate99
time server = yes
domain master = Yes
domain logons = Yes
os level = 250
name resolve order = lmhosts bcast host
preferred master = yes
local master = Yes
```
I running dhcp services with dnsmasq , the host is dhcp server.
I will add 127.0.0.1 in /etc/hosts ,thanks


----------



## aribi (Jan 16, 2017)

cesjr said:


> The domaine was given by SAMBA Server


Don't think that is true. Samba advertises workgroup, not dns-domain. MicroSoft often uses the word "domain" when they actually mean "AD-domain", hence the confusion. Your `dnsmasq.conf` will probably need a line like

```
domain=abc-tech.com.tw
# or the equivalent
dhcp-option=15,abc-tech.com.tw
```


----------



## cesjr (Jan 17, 2017)

Thanks , I will try it!
Very appreciated your help.


----------

