0

I have a DHCP and DNS server setup with dnsmasq. Connected to it, I have Windows, Ubuntu and CentOS servers. Windows and Ubuntu servers are working normally, both the DNS and DHCP, however the CentOS servers are not. If I locally login to any of them, I can do a ssh to any of my other servers, but I can't do the opposite - I can't do a nslookup to these CentOS servers. Using bind, our old DNS and DHCP, it worked fine.

For example, trying to nslookup hull (which is a CentOS machine)

user@server:~$ nslookup hull
Server:     127.0.1.1
Address:    127.0.1.1#53
** server can't find hull: NXDOMAIN

In hull, I have:

/etc/resolv.conf (Seems correct)

search company.intranet
nameserver    172.16.0.6

hostname

hull

/etc/sysconfig/network

NETWORKING=yes
HOSTNAME=hull

Something I noticed in my /var/lib/misc/dnsmasq.leases:

1475267373 ##:##:##:##:##:## 172.16.0.237 * *
1475276237 ##:##:##:##:##:## 172.16.0.196 * *
1475263184 ##:##:##:##:##:## 172.16.0.197 burnley *
1475262472 ##:##:##:##:##:## 172.16.0.158 karlebo *

The server does get a DHCP IP address but its hostname is not registered in the DNS. The other ones with names are Ubuntu and Windows machines, which are working.

My question is: am I missing something? Is there any sort of configuration I should do in these CentOS machines?

0

I needed to add a variable called DHCP_HOSTNAME="SERVER_NAME" to /etc//etc/sysconfig/network-scripts/ifcfg-<INTERFACE>.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.