[Dnsmasq-discuss] OpenWRT, modem restarts and lost dhcp leases

Anatol Pomozov anatol.pomozov at gmail.com
Sat Aug 23 04:03:36 BST 2014


Hi

On Fri, Aug 22, 2014 at 9:45 AM, Dave Taht <dave.taht at gmail.com> wrote:
> The simplest thing to do is merely move the dhcp leases file to
> persistent storage, if you are willing to live with the long term
> failure mode of flash becoming less long term. I don't honestly know
> the cycle lifetime of low end flash chips anymore - it was very bad
> when they first came out but has improved dramatically in the last 10
> years.

This workaround will work for reboots, but reflashing router firmware
is still affected.

But I thought about more robust and elegant solution. Something like
this: dnsmasq checks ip for incoming dhcp query requests, if it is in
the lease range but not in the database then dnsmasq sends FORCERENEW
request. FORCERENEW should be send only once during service lifetime -
if client does not support FORCERENEW then we should not bother
resending the request again and again.

> On Fri, Aug 22, 2014 at 11:39 AM, Anatol Pomozov
> <anatol.pomozov at gmail.com> wrote:
>> Hi
>>
>> This is a follow-up for a discussion that I had in systemd maillist
>> [1]. Here is description of the problem:
>>
>> I have a router (Archer C7 V2) where I use patched version of OpenWRT.
>> It uses dnsmasq as a dhcp server for my local network. OpenWRT uses a
>> file on tmpfs to store the dhcp leases. When I reboot modem the files
>> on tmpfs are lost and dnsmasq needs to build the dhcp lease database
>> from anew. All the machines that are connected directly to the modem
>> (via cable or via wifi) work fine here - they notice that data link
>> went down and when it gets back they update DHCP information.
>>
>> The problem is when some machine is located in a different network
>> segment. In this case the data layer stays healthy, machine does not
>> notice anything wrong with the network and dhcp client does not update
>> DHCP lease at the router. So I cannot ping my machine by the name
>> anymore, pinging by ip works fine. To update the lease I need to power
>> cycle the ethernet switch that serves that network segment. But of
>> course it is not the best solution.
>>
>> So my question what is the solution for such problem? Should dnsmasq
>> ask on start all the machines to update their dhcp leases? Is it what
>> FORCERENEW option is? I see that FORCERENEW is not implemented in
>> dnsmasq.
>>
>> [1] http://lists.freedesktop.org/archives/systemd-devel/2014-August/022363.html
>>
>> _______________________________________________
>> Dnsmasq-discuss mailing list
>> Dnsmasq-discuss at lists.thekelleys.org.uk
>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
>
>
> --
> Dave Täht
>
> NSFW: https://w2.eff.org/Censorship/Internet_censorship_bills/russell_0296_indecent.article



More information about the Dnsmasq-discuss mailing list