[Dnsmasq-discuss] How do I tell dnsmasq not to use certain IPs?
simon at thekelleys.org.uk
Mon Feb 18 14:13:48 GMT 2008
Rune Kock wrote:
> Make sure that your fixed IP clients respond to pings, then -- as
> Simon says -- it just works.
> Dnsmasq checks that no computer responds to ping before handing out an address.
Ah, I see that I replied in haste: I assumed that your fixed addresses
were allocated by DHCP. Rune is right, as long as the machines are on,
and responding to pings, they will keep other machines away from their
If you want to be sure, you can tell dnsmasq that the addresses are
allocated to specific machines using dhcp-host. The machines don't need
to do DHCP, dnsmasq will avoid the addresses even if they are never
used. Since dnsmasq doesn't need to associate the addresses with
individual machines, all that is needed is the IP address.
So, change you command line to
dnsmasq -k -K -F 192.168.1.200,192.168.1.249,255.255.255.0,12h \
-G 192.168.1.203 -G 192.168.1.234
and the job is done.
> On Feb 16, 2008 6:16 PM, Simon Kelley <simon at thekelleys.org.uk> wrote:
>> wdt wrote:
>>> Here is my current command-line configuration:
>>> dnsmasq -k -K -F 192.168.1.200,192.168.1.249,255.255.255.0,12h
>>> So I've given dnsmasq the IP range 192.168.1.200 to 192.168.1.249 to
>>> use for DHCP.
>>> But I have two specific IP addresses within that range that are being
>>> used by clients with pre-set fixed IP addresses. For example
>>> 192.168.1.203 and 192.168.1.234.
>>> In my setup it is quite awkward to change the 2 clients' fixed IPs to
>>> be outside the DHCP range. Is there a dnsmasq option that lets me
>>> exclude specific IPs from being used within a given DHCP range of
>> No need. dnsmasq already does what you want.
>>> My version of dnsmasq is:
>>> Dnsmasq version 2.35 Copyright (C) 2000-2006 Simon Kelley
>>> Compile time options IPv6 GNU-getopt ISC-leasefile no-DBus no-I18N
>>> Thanks very much,
>>> Dnsmasq-discuss mailing list
>>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
More information about the Dnsmasq-discuss