Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-03-01 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 01/03/16 09:29, Nicolas Cavallari wrote:
> On 26/01/2016 14:46, Simon Kelley wrote:
>> 
>> 
>> On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote:
>> 
>> 
>> 
>>> what about writing and sending kill 1 / HUP?
>> 
>> 
>> 
>> No. The only only way to make that work would be to
>> 
>> 1) Stop dnsmasq with SIGTERM 2) modify the leases file 3)
>> restart dnsmasq
>> 
>> 
>> in that order.
> 
> You forgot about my patches that adds a D-Bus method to add leases 
> to the internal copy, that you merged in June last year :)
> 
> It's documented in dbus/DBus-interface, as you requested :)
> 

Indeed. What Nicolas said.


Actually, it's worse: sometimes I find code implementing features in
dnsmasq which I wrote, and I have no memory of...


Cheers,

Simon.

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJW1bc6AAoJEBXN2mrhkTWiaNkP/i3gWvQJ5D2vLAQruuVOTFj7
EpeCMXTTa0TFE+OJHES1STv+8UgpgBGjipdwtLYVndI7bUVvADXpBcFGx0iQtuOt
MQqVGRb+c0o2Z15PwBJ+IxvILWTU1YFOPDy1nHqGkThbZ66HX9sZT9g2f6KansZL
KX3ENul8NEiRt8t9EiwVaYns5+LKoDYPqcCqFtlwSLTwx/MsH0+XC7rvY65StO54
wWxXhzrWn1IsA2Sk2FUCaHTalhFPuY5j0sLcN2yA6AxWczrl2KHcPFKSHumZbWrq
RnWA0DHU+Jr1M2K13iI0/qmd9XqIctLzOzpYTAdD97LRsM/OPW/Q7gnvfayfDEqc
0r8RZ0/jHc1uLoyP79dbASW8hSOwgZN3QN6DZEofYlBjYLwzwdGYA8FmjBuRlctY
LHi6Ek/l3uEtBUU2c2xfkIHeunwbbrSb9pWbntclTQypgUT5ZYFDT/ds+r1g7EL0
vJtSw9xwXrvrZ7MvfvhYRCqqUKAWncgN88AftWqIseQT8rUh63BJIWQ7a0t3Vf9Z
ie2H5xRPfAv/n0QLF0DNrH5RsATh8wEIjhG3s0vsXG/XuK9jDW5Pqb/IPqJtWNYz
1VIZ2fzxfJOuJXGhxI9VbbQAAePhniKdObaZ1Z9nwAnjwGFlAZoxxKhHylSx4V8I
4TjQfwWXsWgrUkP+vsgg
=xXps
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-03-01 Thread Nicolas Cavallari
On 26/01/2016 14:46, Simon Kelley wrote:
> 
> 
> On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote:
> 
> 
> 
>> what about writing and sending kill 1 / HUP?
> 
> 
> 
> No. The only only way to make that work would be to
> 
> 1) Stop dnsmasq with SIGTERM
> 2) modify the leases file
> 3) restart dnsmasq
> 
> 
> in that order.

You forgot about my patches that adds a D-Bus method to add leases to
the internal copy, that you merged in June last year :)

It's documented in dbus/DBus-interface, as you requested :)

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-27 Thread Hartmut Krafft
On Tue, 26 Jan 2016 21:31:29 +
Simon Kelley  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> 
> 
> On 26/01/16 14:56, Stefan Priebe - Profihost AG wrote:
> > 
> >> Am 26.01.2016 um 14:46 schrieb Simon Kelley
> >> :
> >> 
> > 
> > 
>  On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote:
> > 
>  
>  what about writing and sending kill 1 / HUP?
> > 
> > 
> > No. The only only way to make that work would be to
> > 
> > 1) Stop dnsmasq with SIGTERM 2) modify the leases file 3) restart
> > dnsmasq
> > 
> > 
> > in that
> > 
> >> Last idea isn't it possible to make the host static on add? If it
> >> is which file should I use to add the mac  hostname IP
> >> combination
> 
> 
> Add the hostname and IP in /etc/hosts, and add the MAC/hostname or
> MAC/IP as --dhcp-host configuration.
> 
> You can provide all three in --dhcp-host, that will ensure that only
> the specified MAC address gets that IP address BUT, the IP/name  will
> only exist in the DNS whilst the DHCP lease exists. If you want the
> hostname to always resolve, you have to put it in /etc/hosts or
> friend.

If you want to avoid shutting down dnsmasq you could use the
dhcp-hostsfile and addn-hosts directives (see manpage). You can
regenerate those files while dnsmasq is running and send a hangup
signal to the dnsmasq process which will cause them to be read and the
information updated.
I've made me a unified dhcp+hostsfile input file and a script to
generate both dhcp-hostsfile and addnhost from that because I found
that I preferred not to have to enter redundant data in two files (and
invariably ending up with contradictory entries).
You'll just have to devise a way to enter your information into those
files for your usecase.

Hartmut


> 
> 
> Cheers,
> 
> Simon.



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Stefan Priebe - Profihost AG


Am 25.01.2016 um 23:20 schrieb Simon Kelley:
> Not directly. If you just want a record of leases after they've been
> released, then you can save information by using the dhcp-script
> function. If you want to stop re-use of the addresses, then the best
> you can easily do is to allocate static addresses to clients. That
> will stop the addresses being allocated to other clients, even
> when not leased.

I had the hope that dnsmasq evaluate the return code of the dhcp-script
and i can use exit 1 if i do not want to delete the IP.

Is it possible that i readd the IP to the leases file in the
dhcp-script? Or does dnsmasq remove the entry after processing the
dhcp-script?

Stefan
> 
> 
> Cheers,
> 
> Simon.
> 
> On 25/01/16 16:42, Stefan Priebe - Profihost AG wrote:
>> Hi,
> 
>> is there any way to keep IPs in the dnsmasq DB even the host sends
>> a release?
> 
>> I want to keep those entry at least for 2 more days.
> 
>> Greets, Stefan
> 
>> ___ Dnsmasq-discuss
>> mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



On 26/01/16 07:25, Stefan Priebe - Profihost AG wrote:
> 
> 
> Am 25.01.2016 um 23:20 schrieb Simon Kelley:
>> Not directly. If you just want a record of leases after they've
>> been released, then you can save information by using the
>> dhcp-script function. If you want to stop re-use of the
>> addresses, then the best you can easily do is to allocate static
>> addresses to clients. That will stop the addresses being
>> allocated to other clients, even when not leased.
> 
> I had the hope that dnsmasq evaluate the return code of the
> dhcp-script and i can use exit 1 if i do not want to delete the
> IP.

That's an interesting thought. The dhcp-script gets run
asynchronously, so it wouldn't be trivial to implement, but it may be
possible.
> 
> Is it possible that i readd the IP to the leases file in the 
> dhcp-script? Or does dnsmasq remove the entry after processing the 
> dhcp-script?

That wouldn't work at all. Dnsmasq only reads the contents of the
lease file at startup. The rest of the time it's working from an
internal copy. If you altered the file, your changes would just be
overwritten and ignored.


Cheers,

Simon.

> 
> Stefan
>> 
>> 
>> Cheers,
>> 
>> Simon.
>> 
>> On 25/01/16 16:42, Stefan Priebe - Profihost AG wrote:
>>> Hi,
>> 
>>> is there any way to keep IPs in the dnsmasq DB even the host
>>> sends a release?
>> 
>>> I want to keep those entry at least for 2 more days.
>> 
>>> Greets, Stefan
>> 
>>> ___
>>> Dnsmasq-discuss mailing list
>>> Dnsmasq-discuss@lists.thekelleys.org.uk 
>>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>
>>
>>
>>> 
___
>> Dnsmasq-discuss mailing list 
>> Dnsmasq-discuss@lists.thekelleys.org.uk 
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJWp3V7AAoJEBXN2mrhkTWic6IP/RS7ctPqm9NVTxLm/pGKivzC
SnfH3IYYuDUlP5R7dW3/FgJEbMTEPPzCqNmh/EwoGWexEQkED8SlUcDn7mZBqmlz
cuEOB8l2s9yAo0Lnr5ni6WuWOZcgW9BlPnN1kFhAO+f6fbHDC5tCOdXGnBYqCjUY
lvIoG2/0O87/buYf2DMdbvEwKlbr6RqmGMm7RL24nALYSi+O/OJQuwq+t0jgN5uJ
g3PA5KtzLknrDolA+aDoht3X9A6aSzLNi/TDZr97HNDpAWleK5ipCZaOls5qwu6s
CFEsKVfMTPAX6SPirzqwz8kO1sfKBfJ0t9CIpr+y1bYkam9VI8V2dWWE+EZxuhT+
jJelYnbo7CH4q5X9xTd0KM4MnZ8zo+7yaWbWYy43/7a9BFUWnA3bszq6WoUo4Qlv
BAh77KAZ/ah8EiIkuHH05L9OQ0URotVfJ44e2etgXSLKxZvf8wS2Ziu78+1BQDsh
tjMSjq5lNtI3ND2J14gDV3OW8F2EGxKoVwYqiCiNPavjypsAN9KYxrwX/K6fyqkY
MCd/+ZDyQrp568I0jPlWHHIReoCh+IDLcIqNUUsswpSCbytxvRwfjM+itYphx7kD
Ls7yvteHQhDCLDPARP0L52lS8YD6iBY2Fn+lxl5g9NiiBS6t5r6DrJTNhN8msr5Z
CrU2m4slCKehxhlVBP0c
=r5ot
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Stefan Priebe - Profihost AG

Am 26.01.2016 um 14:32 schrieb Simon Kelley:
> 
> 
> On 26/01/16 07:25, Stefan Priebe - Profihost AG wrote:
> 
> 
>> Am 25.01.2016 um 23:20 schrieb Simon Kelley:
>>> Not directly. If you just want a record of leases after they've
>>> been released, then you can save information by using the
>>> dhcp-script function. If you want to stop re-use of the
>>> addresses, then the best you can easily do is to allocate static
>>> addresses to clients. That will stop the addresses being
>>> allocated to other clients, even when not leased.
> 
>> I had the hope that dnsmasq evaluate the return code of the
>> dhcp-script and i can use exit 1 if i do not want to delete the
>> IP.
> 
> That's an interesting thought. The dhcp-script gets run
> asynchronously, so it wouldn't be trivial to implement, but it may be
> possible.
> 
>> Is it possible that i readd the IP to the leases file in the 
>> dhcp-script? Or does dnsmasq remove the entry after processing the 
>> dhcp-script?
> 
> That wouldn't work at all. Dnsmasq only reads the contents of the
> lease file at startup. The rest of the time it's working from an
> internal copy. If you altered the file, your changes would just be
> overwritten and ignored.

what about writing and sending kill 1 / HUP?

> 
> 
> Cheers,
> 
> Simon.
> 
> 
>> Stefan
>>>
>>>
>>> Cheers,
>>>
>>> Simon.
>>>
>>> On 25/01/16 16:42, Stefan Priebe - Profihost AG wrote:
 Hi,
>>>
 is there any way to keep IPs in the dnsmasq DB even the host
 sends a release?
>>>
 I want to keep those entry at least for 2 more days.
>>>
 Greets, Stefan
>>>
 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk 
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>>
>>>
>>>

> ___
>>> Dnsmasq-discuss mailing list 
>>> Dnsmasq-discuss@lists.thekelleys.org.uk 
>>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>>
> 
> 

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote:
> 

> 
> what about writing and sending kill 1 / HUP?
> 


No. The only only way to make that work would be to

1) Stop dnsmasq with SIGTERM
2) modify the leases file
3) restart dnsmasq


in that order.


Cheers,

Simon.

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJWp3ihAAoJEBXN2mrhkTWi9SwP/3bh7wI9Jsa+YMa/PRIQUnDW
WEiMCqNXme1c6KPZ0sFUfaqgcNjbEmQ7ahRW+H22Yr6MXyZmEcK96Geia6Fn0hL+
3kvwjjrJa3oO/mp29AFR8WTOAdQoJdRFycPexDmlWQC7VRV2s/qV1pGOZvS20TZ6
/j1qYjZLm1yMFAVH1ArjC3SOItEt3yT7KaKcvZMC3HXuVyuHDDTIABWYB7DMWV2Z
I/MFWN8kCwQycG3RP3o9f6LEFMkRsvUcR9LDLEnGjErl9rVFh337v7p7afxMHauu
zXn1JpTeh1pl/fsstmzNgIpe61DD/rhxZVvrwlyzSOog/xQnTHxxiXl7Gl4LHkUY
Z1W1qjzCzN3E3sC+cgx/NIB5dOzctSSTzfPLKLisshwYAxaBgOowIRQCQtv6Oovh
Md0oqN2jYYMPAuk+D6hOA0Yuoz2lHANnQMC97gY/6tWDPMSmeAyS4fuN61YJuX41
suydUc+CWwwVmmLkIf0qBY5dk/cgMIepiis3NZutnnOBYyxf9xpvxtLgkTFYyryD
7w+OdOg54ug2jABjinGAhjvcI36y1HilsANbMpED26PiNlKiC4pj99pPUYqzM6GE
Eb0+CA2Ah+c7CGEK1YMnKx78qqCb+tzkD1VfgQSusQaNvsPi+nsb19qfuO8ZDJc6
jXCO2S8dIIS1us8YH4sj
=vL+b
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Stefan Priebe - Profihost AG

> Am 26.01.2016 um 14:46 schrieb Simon Kelley :
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
> 
> 
> 
>> On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote:
> 
>> 
>> what about writing and sending kill 1 / HUP?
> 
> 
> No. The only only way to make that work would be to
> 
> 1) Stop dnsmasq with SIGTERM
> 2) modify the leases file
> 3) restart dnsmasq
> 
> 
> in that 

Last idea isn't it possible to make the host static on add? If it is which file 
should I use to add the mac  hostname IP combination



> 
> 
> Cheers,
> 
> Simon.
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.22 (GNU/Linux)
> 
> iQIcBAEBCAAGBQJWp3ihAAoJEBXN2mrhkTWi9SwP/3bh7wI9Jsa+YMa/PRIQUnDW
> WEiMCqNXme1c6KPZ0sFUfaqgcNjbEmQ7ahRW+H22Yr6MXyZmEcK96Geia6Fn0hL+
> 3kvwjjrJa3oO/mp29AFR8WTOAdQoJdRFycPexDmlWQC7VRV2s/qV1pGOZvS20TZ6
> /j1qYjZLm1yMFAVH1ArjC3SOItEt3yT7KaKcvZMC3HXuVyuHDDTIABWYB7DMWV2Z
> I/MFWN8kCwQycG3RP3o9f6LEFMkRsvUcR9LDLEnGjErl9rVFh337v7p7afxMHauu
> zXn1JpTeh1pl/fsstmzNgIpe61DD/rhxZVvrwlyzSOog/xQnTHxxiXl7Gl4LHkUY
> Z1W1qjzCzN3E3sC+cgx/NIB5dOzctSSTzfPLKLisshwYAxaBgOowIRQCQtv6Oovh
> Md0oqN2jYYMPAuk+D6hOA0Yuoz2lHANnQMC97gY/6tWDPMSmeAyS4fuN61YJuX41
> suydUc+CWwwVmmLkIf0qBY5dk/cgMIepiis3NZutnnOBYyxf9xpvxtLgkTFYyryD
> 7w+OdOg54ug2jABjinGAhjvcI36y1HilsANbMpED26PiNlKiC4pj99pPUYqzM6GE
> Eb0+CA2Ah+c7CGEK1YMnKx78qqCb+tzkD1VfgQSusQaNvsPi+nsb19qfuO8ZDJc6
> jXCO2S8dIIS1us8YH4sj
> =vL+b
> -END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Neil Jerram
On 26/01/16 15:09, Stefan Priebe - Profihost AG wrote:
>> Am 26.01.2016 um 14:46 schrieb Simon Kelley :
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>>
>>
>>> On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote:
>>> what about writing and sending kill 1 / HUP?
>>
>> No. The only only way to make that work would be to
>>
>> 1) Stop dnsmasq with SIGTERM
>> 2) modify the leases file
>> 3) restart dnsmasq
>>
>>
>> in that 
> Last idea isn't it possible to make the host static on add? If it is which 
> file should I use to add the mac  hostname IP combination

FYI, at https://github.com/projectcalico/calico/issues/233 we have a
long trail about what we think is the opposite problem.  Namely, that
Dnsmasq will not reallocate an IP that should have been released, and
whose old IP/MAC mapping has been removed from the 'host' config file. 
As you'll see if you read that trail, we thought this was caused by a
problem in the delivery of the DHCP_RELEASE message to Dnsmasq, and
hence Dnsmasq retaining a record of the old lease in its internal data.

Based on that, I'd expect that if you deliberately did something to stop
the DHCP_RELEASE message from reaching Dnsmasq, Dnsmasq would then
retain the old lease (which I believe is what you're asking for).

However, that understanding does seem to be contradicted by what Simon
has said in this thread, and I would strongly assume that Simon is right
- but perhaps there might still be some hint or useful information in
that issue trail.

Regards,
Neil


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



On 26/01/16 14:56, Stefan Priebe - Profihost AG wrote:
> 
>> Am 26.01.2016 um 14:46 schrieb Simon Kelley
>> :
>> 
> 
> 
 On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote:
> 
 
 what about writing and sending kill 1 / HUP?
> 
> 
> No. The only only way to make that work would be to
> 
> 1) Stop dnsmasq with SIGTERM 2) modify the leases file 3) restart
> dnsmasq
> 
> 
> in that
> 
>> Last idea isn't it possible to make the host static on add? If it
>> is which file should I use to add the mac  hostname IP
>> combination


Add the hostname and IP in /etc/hosts, and add the MAC/hostname or
MAC/IP as --dhcp-host configuration.

You can provide all three in --dhcp-host, that will ensure that only
the specified MAC address gets that IP address BUT, the IP/name  will
only exist in the DNS whilst the DHCP lease exists. If you want the
hostname to always resolve, you have to put it in /etc/hosts or friend.


Cheers,

Simon.

> 
> 
> 
> 
> 
> Cheers,
> 
> Simon.
> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJWp+WxAAoJEBXN2mrhkTWiok8P/2ty3LW/0sDDtPdgZhyykddc
fTecPR4ApYG3n8advL4F/2gpy5bKx4JYn8si6jSJJS12knex7BpdDYfqPnJ/NOcs
PKlmjc2eIvWaLI04ZvCJKCOgr/jkp8Mn1oGkEKz0+yVRfNsfl43hAMSLZWb21o5i
FrQ7RTrIXJhtbDnY+h1LytrofWmZcmH3FfzTsBc36DRd8fu7p7LEmbm8M6q54vLn
pm0w3OF5oeTUyMXy8d5RQk0tOHMmOgno0qgTF/UzBAXw2DQDFa4TwsVJMNg2HKUz
QHqf8hnEOLYYmWGSbwek29SXKET1NYxtwfYfHmzrJOPEURSmIN7TW0WqTDHIJWAd
WVzx/bvJg8lHsQo9/JYqlp1N+oeG7qT5BnY22Ab5cYzpOEPJrLSqVDdeBJEYGgAW
sAabk2Y0FyudiL62Rst639j4km9AlyQc3/uCqnTTyb/2xPxo6Wkev7YJHZ7jh49N
xDpFmSVrDIx+Hu4uvhNR8U2X6FGLNN7n1RIJXb2jAKVOH7TFg/vPnaYwwRUDypBa
NTlrvei/c9ujioBuTqLn3wDyyK2GZ6WwSSUdDLOkLVceZO7vrkHao2qhTQOPI1+0
t5LlTG98dYttvJKfMzKe/IfwVuUXYz6Qgwstjymovcl3Y4Q7pSGq67XVNn9S2xoT
uvTqfGlGGZTQ3g2EnXEj
=lFuW
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-26 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256



On 26/01/16 16:03, Neil Jerram wrote:
> On 26/01/16 15:09, Stefan Priebe - Profihost AG wrote:
>>> Am 26.01.2016 um 14:46 schrieb Simon Kelley
>>> :
>>> 
>>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
>>> 
>>> 
>>> 
 On 26/01/16 13:42, Stefan Priebe - Profihost AG wrote: what
 about writing and sending kill 1 / HUP?
>>> 
>>> No. The only only way to make that work would be to
>>> 
>>> 1) Stop dnsmasq with SIGTERM 2) modify the leases file 3)
>>> restart dnsmasq
>>> 
>>> 
>>> in that
>> Last idea isn't it possible to make the host static on add? If it
>> is which file should I use to add the mac  hostname IP
>> combination
> 
> FYI, at https://github.com/projectcalico/calico/issues/233 we have
> a long trail about what we think is the opposite problem.  Namely,
> that Dnsmasq will not reallocate an IP that should have been
> released, and whose old IP/MAC mapping has been removed from the
> 'host' config file. As you'll see if you read that trail, we
> thought this was caused by a problem in the delivery of the
> DHCP_RELEASE message to Dnsmasq, and hence Dnsmasq retaining a
> record of the old lease in its internal data.
> 
> Based on that, I'd expect that if you deliberately did something to
> stop the DHCP_RELEASE message from reaching Dnsmasq, Dnsmasq would
> then retain the old lease (which I believe is what you're asking
> for).

That's certainly true.
> 
> However, that understanding does seem to be contradicted by what
> Simon has said in this thread, and I would strongly assume that
> Simon is right - but perhaps there might still be some hint or
> useful information in that issue trail.
> 


I looks like the problem there is exactly as you say: dnsmasq is
failing to allocate an address because it has run out of free
addresses because addresses have been consumed by machine which are
now "dead" but did not release their address when they died, so the
address is unavailable until the lease period expires.


Cheers,

Simon.

> Regards, Neil
> 
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJWp+c2AAoJEBXN2mrhkTWipUIQAKGtY46A32t3msjkH4+5t3mk
bbIM0+T7N9NDFy402C+tiDNhrThUxiynV4svGFXJ3Xx7umqNMbeDWslagFb7i/HG
6pfRvp8b4TMhml33228TxCmuGZfHuhPFtbyj+RSRIZGA7m2cHREpeBPaQJQyYER3
0nX8wL64iiLXIX3B7UkaR+pDYPpf4VxgZXjHfUaGoYjzmrP3dBNXcZrd7juTQWWx
7YZS2PLueAUR7pm1ScC/BSukCCG4hsZgGw8h7iZMkUDAgtxY/DylydL9i/ujgx+D
x/vskp+V+HpvC5ZnTUwgU8NzfofIx7tInEm0RWxRS5xX9ex2HkM7jpm3+ZJQCy9x
tcN+C2NOfCRqLpsqrIotkgD8oLPLJKV52szAPSDy7F4SB0DAe2vJSBhd9vHNSlv1
5l4iGtFgq3JrPYW78gXb8+e+WKPMacZB1sz3xZvy4J0cfIqU95rpyhT/qDVMVQxd
jkdlkDWe/C252Ve0tOAzCMux5YdqwxgZOYG17Dp+dboIx2Th8im6q5o9DeXBDO1s
4/Az37grsCeYXdXRGNBY9xtHmDL7+Y7xh5jZVoOAe9BfvNHsdXR8e8ODyUNiuaYR
/Yaa7xQTa5QdESDkCHCAiCh9PY6piEbkJ+ibNwC43s6e/+Jh4tY3FNz09fVUtruh
X2CCwbKhFg3vDjNhCWTE
=Casw
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] prevent dnsmasq from releasing IPs

2016-01-25 Thread Simon Kelley
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Not directly. If you just want a record of leases after they've been
released, then you can save information by using the dhcp-script
function. If you want to stop re-use of the addresses, then the best
you can easily do is to allocate static addresses to clients. That
will stop the addresses being allocated to other clients, even
when not leased.


Cheers,

Simon.

On 25/01/16 16:42, Stefan Priebe - Profihost AG wrote:
> Hi,
> 
> is there any way to keep IPs in the dnsmasq DB even the host sends
> a release?
> 
> I want to keep those entry at least for 2 more days.
> 
> Greets, Stefan
> 
> ___ Dnsmasq-discuss
> mailing list Dnsmasq-discuss@lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBCAAGBQJWpp+TAAoJEBXN2mrhkTWiBNgP/j/c9SlvhOCHkp1sR5zomVj2
Yc7v5W97Emq6Z/vu63iLVHDx3KfaVa4a2o/yup7LmeURAKs/+bGvcH12CItbTKzS
Ky8dvdbX6q3KZSxMT+gvC7BdpDKIlzGzwrbpX4SlRoc7BBW7e2JyIU1c9PwOsxYh
17fH4Cf2FK8IGtjz5ypDvv+0oemjeUaJnRYmNuNqU3Kqb7A4QJTxY4PaYFDuZNif
x7ECTRAO7T7I8yaCyDWDwG+jyzJif90uvsfWwiU21jxBlfbXyzfpdzPiWziG98MV
cKoj5E2GDTCl/F1BCJ0xqf21admWDscB26i4CiLs+iROZ5mUt5a3EE3o2IxBKXIe
wNHSJu25kwyWnIHyDvGrqsFPUYDVhu+gbgBrg+ZQA7KngboDTjtq2noMxKvbTsDt
m7qWEgifxbVYTHbWTx4EhWhyIY4IjwbDLBV220qK7LFda06OliC805pHN9HxWgBZ
jHlK41LL6nJy0MmdPo3mJIl1JTKhfpEMIxDxeVg7fQtsffxg4dhbyOlOi9qv2K3H
TaviDLCdWkqXkbzC3OjoteXG2oNeMiTSaG2UuvVxDjtZrdKPpiznS9jWrcWB6Ntb
8AXAIMWE6xuRVSYlhuPn+VbQ14XQAGL3XFCuXB9HVTvV4VyoOtyggzweJUNLSzJ+
S4t6lZzOiAlCAoJ26nTp
=3Jfp
-END PGP SIGNATURE-

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss