[Dnsmasq-discuss] How do I tell dnsmasq not to use certain IPs?

Simon Kelley 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
addresses.

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.


Cheers,

Simon.

> 
> Rune
> 
> 
> 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
>>> addresses?
>> No need. dnsmasq already does what you want.
>>
>> Cheers,
>>
>> Simon.
>>
>>
>>> 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,
>>> Bill
>>>
>>> _______________________________________________
>>> Dnsmasq-discuss mailing list
>>> Dnsmasq-discuss at lists.thekelleys.org.uk
>>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>
> 
> 
> 





More information about the Dnsmasq-discuss mailing list