[Dnsmasq-discuss] Is leasquery supported in Dnsmasq

Petr Menšík pemensik at redhat.com
Tue Mar 14 21:46:53 UTC 2023


I looked into RFC 3046(DHCP Relay Agent Information Option) and it seems 
it suggests the DHCP server should assign address to triplets [1]:

(client IP address,  client MAC address,  client remote ID)

I am pretty sure dnsmasq does not use any client remote id at the moment 
to make mac addresses from different clients independent. Not sure how 
much common such configurations are and whether is it desirable to 
implement them. That RFC is from 2001.

But it seems leasequery purpose is not obtaining just status of 
leased/non-leased address, but also those ids. Because they are not 
defined as a simple integers but variable length binary ids, processing 
them would not be simple task. Dnsmasq lease database code does not have 
easily extendable database for any new key=value pair on leases, so this 
would be somehow difficult.

Also I think networks where multiple circuit ids appear should not rely 
on dnsmasq to do DHCP for them. I think such network deserves more 
heavy-weight DHCP server implementation, which should have support for 
storing (and querying) additional parameters. It might make sense to add 
configurable ids into forwarded requests when acting as relay agent though.

Cheers,
Petr

[1] https://www.rfc-editor.org/rfc/rfc3046#section-4.0

On 27. 02. 23 13:46, Simon Kelley wrote:
> src/rfc2131.c has all the relevant code: add code to handle 
> DHCPLEASEQUERY to the switch in dhcp_repy();
>
> HOWEVER. Whilst the RFC sort of makes this sound like a general query 
> system, it's actually a hack to solve a specific problem that access 
> concentrators don't have persistent storage, so this allows them to 
> rely on the DHCP server to persistently store Relay Agent Information
>
>
>    If the Relay Agent Information (option 82) is specified in the
>    Parameter Request List, then the information contained in the most
>    recent Relay Agent Information option received from the relay agent
>    associated with this IP address MUST be included in the
>    DHCPLEASEACTIVE message.
>
>
> This is the biggest problem, since dnsmasq doesn't store that 
> information in its lease database either. Adding that info is a large 
> undertaking, with compatibility risks.
>
> The quote above make it clear that, even if you application doesn't 
> need option 82 information, an RFC-compliant implementation of 
> LEASEQUERY does, and it's not a small job.
>
> Simon.
>
>
>
>
>
> On 24/02/2023 19:10, Rashi Krishna wrote:
>> Thanks for the update. If I want to add the code myself, do you have 
>> any pointers to where to get started from?
>>
>> Thanks again,
>> Rashi
>>
>> On Fri, 24 Feb, 2023, 16:23 Nicolas Cavallari, 
>> <Nicolas.Cavallari at green-communications.fr 
>> <mailto:Nicolas.Cavallari at green-communications.fr>> wrote:
>>
>>     On 24/02/2023 10:13, Rashi Krishna wrote:
>>      > Hi all.
>>      >
>>      > I just wanted to know if leasequery is supported in Dnsmasq. I 
>> tried
>>      > sending a leasequery to the server, but I couldn't get any 
>> response.
>>
>>     There does not seem to be any leasequery (RFC 4388) support in 
>> dnsmasq.
>>
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
>
-- 
Petr Menšík
Software Engineer, RHEL
Red Hat, http://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB




More information about the Dnsmasq-discuss mailing list