Re: [Dnsmasq-discuss] Same hostname in different domains with dhcp static assignments?

2016-01-26 Thread Steve Hindle
Turns out I needed dhcp-fqdn set... just setting the domain name isn't
enough

Sorry to have bothered ya

On Tue, Jan 26, 2016 at 7:05 PM, Steve Hindle  wrote:

> Hi!
> I seem to have an odd issue with static dhcp reservations on multiple
> networks with the same hostname but different domains (eg '
> foo.ipmi.example.com' and 'foo.hvm.example.com'). I am setting static
> assignments for both interfaces via:
> dhcp-host=,,,
>
> Basically seems to break DNS lookup for me - using dig on the short name
> or FQDN both return 'no answer'.  Doing a dig -x can't even find the
> reverse record (I'd think that would get one or the other?). I've tried
> using FQDN and shortname in the dhcp-host lines...
>
> When that didn't work - just for testing I tried removing the static
> assignment from the 'hvm.example.com' domain, and just leaving the static
> in 'ipmi.example.com'.
> I see the client getting an IP from dnsmasq (I noticed it uses 'foo' as
> the hostname when talking to dnsmasq..) But I have the same behavior on the
> DNS side...
>
> Anyway - I was just wondering if this should work?  If so, I'll look for
> stupid issues in my configs again
>
>
> Thanks!
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] No caching unless recursion enabled?

2016-01-26 Thread bob tatus
Thanks for that, so essentially I need to download the source code, modify and 
recompile? There is no simple way for me to otherwise do this with my current 
installation, as that isn't really an option in this environment. A 
configuration option to enable this would be great, but understand that you 
don't want to add this.

In that case I may look at placing the top entries I need in /etc/hosts as it 
will cache these results and that will do what I need as a last resort.

Thanks for the help.

> From: b-mor...@concentric.net
> To: si...@thekelleys.org.uk; allcowsgomoo...@hotmail.com; 
> dnsmasq-disc...@thekelleys.org.uk
> Subject: RE: [Dnsmasq-discuss] No caching unless recursion enabled?
> Date: Mon, 25 Jan 2016 16:01:54 -0700
> 
> >  /* Don't put stuff from a truncated packet into the cache.
> > Don't cache replies from non-recursive nameservers, since we may get a
> > reply containing a CNAME but not its target, even though the target
> > does exist. */
> >  if (!(header->hb3 & HB3_TC) &&
> >  !(header->hb4 & HB4_CD) &&
> >  (header->hb4 & HB4_RA) &&
> >  !no_cache_dnssec)
> >cache_end_insert();
> 
> > Removing the
> > (header->hb4 & HB4_RA) &&
> > line will provide the behaviour you're seeking. I don't propose to make
> this change in the distributed dnsmasq code.
> 
> I'd suggest adding a comment to the end of that line that reminds anyone
> what removing it does (and then not removing the line but commenting it
> out).
> 
> Brad
> 
  ___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Does dhcp-range accept/require an interface for ipv4

2016-01-26 Thread Steve Hindle
Hi!

  When dealing with multiple interfaces/subnet, should dhcp-range be given
the interface?  I only see it mentioned for ipv6 stuff in the manpage, but
I'm
finding stuff online that says to use:
  dhcp-range=eth1,172.16.49.101,172.16.49.254,14400
   or:

dhcp-range=interface:eth1,set:wifi,192.168.11.101,192.168.11.200,255.255.255.0

Should I be specifying the interface? Or does dnsmasq figure it out from the
interface configuration like it does netmask ?

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


[Dnsmasq-discuss] Same hostname in different domains with dhcp static assignments?

2016-01-26 Thread Steve Hindle
Hi!
I seem to have an odd issue with static dhcp reservations on multiple
networks with the same hostname but different domains (eg '
foo.ipmi.example.com' and 'foo.hvm.example.com'). I am setting static
assignments for both interfaces via:
dhcp-host=,,,

Basically seems to break DNS lookup for me - using dig on the short name or
FQDN both return 'no answer'.  Doing a dig -x can't even find the reverse
record (I'd think that would get one or the other?). I've tried using FQDN
and shortname in the dhcp-host lines...

When that didn't work - just for testing I tried removing the static
assignment from the 'hvm.example.com' domain, and just leaving the static
in 'ipmi.example.com'.
I see the client getting an IP from dnsmasq (I noticed it uses 'foo' as the
hostname when talking to dnsmasq..) But I have the same behavior on the DNS
side...

Anyway - I was just wondering if this should work?  If so, I'll look for
stupid issues in my configs again


Thanks!
___
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-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 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 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 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: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 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


[Dnsmasq-discuss] Adding wildcard entries for DHCP lease host names

2016-01-26 Thread Christian Weiske

Hello,


To make it easy to share links to locally-installed web projects on 
developer machines (accessible via "projectname.devmachine"), I want
to have dnsmasq automatically create wildcard entries for the host names 
of DHCP leases.


For example, when a dev machine requests an IP via DHCP and sends its 
preferred hostname "foo" in the request, dnsmasq should respond to DNS 
requests to "projectname.foo" with the IP of the foo machine.


We're using dhcpd as DHCP server, and through the "--dhcp-leasefile" 
option, dnsmasq already automatically creates DNS entries for the machines.


I then configured dhcpd to run a script whenever a lease is handed out 
or removed. The script generates a dnsmasq configuration file which 
contains the wildcard configuration.[1]


After this is done, I have to restart dnsmasq to make it pick up the new 
the configuration file.


This is where the problem lies: Restarting dnsmasq takes a second or so, 
and in the result DNS resolving for clients takes ~5-6 seconds in the 
worst case.


I already read that simply reloading all configuration files while 
dnsmasq is running is not possible[2] (as of 2004).


Now my questions:

1. Has this changed in the meantime? Can I make dnsmasq reload the
   configuration without restarting?

2. Is there a different approach I could use to achieve my goal of
   wildcard DNS entries for DHCP'd machines?


[1] http://cweiske.de/tagebuch/dns-wildcard-dhcp.htm
[2] 
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2004q4/02.html


--
Regards,
Christian Weiske

___
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