[Dnsmasq-discuss] Static IP and hostname

Grant Coady grant_nospam@dodo.com.au
Fri, 01 Apr 2005 10:54:37 +1000


On Thu, 31 Mar 2005 15:34:36 -0800, Donnie Berkholz <spyderous@gentoo.org> wrote:

>I'm having trouble setting static IP addresses and hostnames based on
>the hardware address.
>
>Relevant dnsmasq.conf settings (dhcp-host is nearly the same as in
>dnsmasq.conf.example):
>
>dhcp-range=192.168.0.50,static,12h
>dhcp-host=<hw address>,node01,192.168.1.1,1h
>
I do it like this:
dhcp-range=192.168.1.101,192.168.1.109,2h
dhcp-host=magpie,192.168.1.31,2h
dhcp-host=poohnt,192.168.1.32,2h
dhcp-host=pooh98,192.168.1.42,2h
dhcp-host=toshnt,192.168.1.35,2h
dhcp-host=tosh98,192.168.1.45,2h
dhcp-host=stinky,192.168.1.49,2h
dhcp-option=42,0.0.0.0

I know it is not quite what you asked for, but this works for me.
Linux boxen have static IP, known windows boxen get DHCP static 
IP as above, unknown boxen get IP from dhcp-range.  This machine 
I type on is magpie, winxp.

Cheers,
Grant.