[Dnsmasq-discuss] Howto reclaim all dhcp leases after router reboot

Chris Green cl at isbd.net
Fri Sep 25 15:01:48 BST 2020


On Fri, Sep 25, 2020 at 02:39:04PM +0200, Tuxo wrote:
> Hi Matus,
> 
> Thanks for replying so quickly to my request.
> 
> On 25.09.20 11:39, Matus UHLAR - fantomas wrote:
> 
> > 
> > why the need to reclaim them?
> > 
> 
> Because I like to have a place (file) where I can see what leases have been
> given out, to what IP address and what hostname is currently using them.
> 
I've written myself a script to do this for me, independent of what is
doing DHCP.

It produces output like this:-

    chris$ lan
    16 packets received by filter, 0 packets dropped by kernel
    192.168.1.1     2860n                     xx:xx:xx:xx:xx:xx  DrayTek Corp.
    192.168.1.3     esprimo                   xx:xx:xx:xx:xx:xx  Fujitsu Technology Solutions GmbH
    192.168.1.4     newdns                    xx:xx:xx:xx:xx:xx  Raspberry Pi Foundation
    192.168.1.10    TD-W9980                  xx:xx:xx:xx:xx:xx  TP-LINK TECHNOLOGIES CO.,LTD.
    192.168.1.20    2820n                     xx:xx:xx:xx:xx:xx  DrayTek Corp.
    192.168.1.30    Tenda-W311R               xx:xx:xx:xx:xx:xx  Tenda Technology Co., Ltd.
    192.168.1.50    MC342-AE529C              xx:xx:xx:xx:xx:xx  Oki Electric Industry Co., Ltd.
    192.168.1.92    t470                      xx:xx:xx:xx:xx:xx  Intel Corporate
    192.168.1.96    humaxYouview              xx:xx:xx:xx:xx:xx  HUMAX Co., Ltd.
    192.168.1.99    TL-SG108E                 xx:xx:xx:xx:xx:xx  TP-LINK TECHNOLOGIES CO.,LTD.
    192.168.1.107   Galaxy-A10                xx:xx:xx:xx:xx:xx  Samsung Electronics Co.,Ltd
    192.168.1.108   pibackup                  xx:xx:xx:xx:xx:xx  Raspberry Pi Trading Ltd (DUP: 2)
    192.168.1.110   amazon-ac95e92de          xx:xx:xx:xx:xx:xx  Amazon Technologies Inc.
    192.168.1.114   oldbackup                 xx:xx:xx:xx:xx:xx  MICRO-STAR INT'L CO.,LTD
    192.168.1.121   DESKTOP-978VD5M           xx:xx:xx:xx:xx:xx  GIGA-BYTE TECHNOLOGY CO.,LTD.

It's basically the output from the program arp-scan (available from
most repositories I think).

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list