[Dnsmasq-discuss] Question

Simon Kelley simon at thekelleys.org.uk
Fri Jan 25 17:23:13 GMT 2008


Heath Woodson wrote:
> 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?
> 

This will work provided that the client includes the information that
it's called "judge" in the DHCP requests it makes. Windows boxes always
do, Linux DHCP clients can all be configured to do so, but not all do by
default. It's marginally easier for an impostor to pretend to be judge
this way, but nailing down MAC addresses provides so little extra
security that there's very little difference in practice.

> # 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..)

No they won't, but you can get the behavior you want like this

dhcp-range=192.168.0.0,static

which enables DHCP on that network but disables dynamic address allocation.

> # 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
> 
Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list