[Dnsmasq-discuss] Hostnames not being added to dnsmasq.leases file
simon at thekelleys.org.uk
Fri Dec 15 21:37:51 GMT 2006
Jason Baker wrote:
> I have DNSMASQ configured to run on a CentOS 4 server. It is acting as
> both the DNS and DHCP server. All is working fine, except that when I
> connect another linux machine to the network, the host name on the
> client machine doesn't show up in the dnsmasq.leases file. Instead I get:
> 1166770800 00:14:22:9b:10:47 172.16.41.40 * *
> Because of the above, I cannot ping the linux machine by machine name.
> When I plug a Windows XP machine into the network I get correct hostname
> 1166770990 00:16:17:a8:c4:23 172.16.189.188 pommel 01:00:16:17:a8:c4:23
> In this case, I can ping the machine named "pommel". The linux machines
> host file is:
> 127.0.0.1 MYLINUXBOX localhost localhost.localdomain
> Any advice would be greatly appreciated.
The problem lies in the client machine, not your dnsmasq configuration.
Not all DHCP clients for Linux send the machine's hostname unless
specialy configured to do so.
If the DHCP client on you Linux machine is dhclient, then adding
end host-name "MYLINUXBOX";
to /etc/dhcp3/dhclient.conf should do the trick. Other clients have
other configuration methods.
More information about the Dnsmasq-discuss