[CentOS] Home LAN server - dnsmasq

Ben abnormaliti at clivepeeters.com.au
Sun Dec 13 22:51:36 UTC 2009



>
> The specific problem I'm having is that of the virtual 'clients', only
> one of them is getting assigned an IP address from the list in
> /etc/hosts.  'asmodean', running Ubuntu 9.10 gets its IP address of
> 10.0.0.2 as planned.  The other two, demandred (running F12+LXDE) and
> lanfear (running Debian 5.03 Lenny), get randomly assinged IP addresses
> from the pool defined in dnsmasq.conf (10.0.0.50-10.0.0.100) like one
> would normally expect for a *dynamically* assigned lease.  Except I
> wanted them to get fixed leases based on /etc/hosts.
>

Monte,

You need to ensure that the clients are sending the hostname in the dhcp 
request.  Your dnsmasq logs will show it, usually in /var/log/messages, and 
if you want you can enable extra logging for dnsmasq to show u exactly what 
options are being sent by the clients.

If i remember correctly Debian doesn't but i would have thought Fedora would 
have by default.

You can do it by adding "send host-name <insert hostname here>" to the 
dhclient.conf.

Alternatively, you can just assign the static IP using the client MAC in the 
dnsmasq.conf.  You will have the MAC from the dnsmasq logs so you can just 
copy and paste.

Ben 




More information about the CentOS mailing list