[Dnsmasq-discuss] Question

rance at frontiernet.net rance at frontiernet.net
Fri Jan 25 18:28:07 GMT 2008


Quoting Heath Woodson <heathwoodson at gmail.com>:

> Setting this up for the first time and I have a simple question but it isnt
> clearly answered anywhere. I want to assign ips with DHCP in a static manner
> can I just use the /etc/host file on the machine running dnsmasq to do this
> and uncomment this line
> # Enable the address given for "judge" in /etc/hosts
> # to be given to a machine presenting the name "judge" when
> # it asks for a DHCP lease.
> #dhcp-host=judge
>
> or is it better to use the MAC address lines presented like below?
>
> # Always allocate the host with ethernet address 11:22:33:44:55:66
> # The IP address 192.168.0.60
> #dhcp-host=00:11:22:33:44:55,192.168.0.60
>
> and will either of these work without uncommenting the range line below(It
> sounds like it wont work without this but i dont want any dynamically
> assigned IPS..)
> # Uncomment this to enable the integrated DHCP server, you need
> # to supply the range of addresses available for lease and optionally
> # a lease time. If you have more than one network, you will need to
> # repeat this for each network on which you want to supply DHCP
> # service.
> #dhcp-range=192.168.0.50,192.168.0.150,12h
>
> thanks for your help in advance
>
> H
>

Just a word of warning, NOT EVERY dhcp client sends a hostname by  
default, if you have a dhcp configuration based on hostname, then it  
is essential that the dhcp clients all send hostnames in the request  
packet.

Windows by default does this, but linux usually doesn't.

On linux boxes you need to edit/create a dhclient.conf file in the  
location your distro expects to find it.

This file will make sure that dhclient sends a hostname.

R




More information about the Dnsmasq-discuss mailing list