new program to list dhcpd.leases

Christian Hammers ch at lathspell.de
Sat Jul 26 07:43:25 UTC 2008


Hello

As I sometimes want to find out which leases are currently active on my
DHCP server or which IP a specific MAC got the last time, I wrote a little
script to parse dhcpd.leases. It even prints the oui.txt manufacturer.

Would be nice to see anything like this in the official DHCP distribution.

If someone is interested, the script is public domain and written in pure
Perl5. It's available from http://www.lathspell.de/linux/dhcp/

bye,

-christian-

$ dhcp-lease-list --last
#      MAC            IP             valid until           manufactorer
00:02:b3:96:4d:4f  192.168.230.56  2007-10-25 14:04:30  Intel Corporation
00:08:02:62:e8:b0  192.168.230.75  2008-02-25 16:24:26  Compaq Computer Corporation
00:0b:5d:96:bf:2f  192.168.230.57  2008-01-25 13:07:19  FUJITSU LIMITED
00:0b:82:01:90:ee  192.168.230.71  2007-10-25 07:35:50  Grandstream Networks, Inc.
00:0c:29:7b:4d:b9  192.168.230.59  2007-08-23 07:46:55  VMware, Inc.

$ dhcp-lease-list --help
Prints active DHCP leases.

Usage: ./dhcp-lease-list [options]
 --help      shows this help
 --parsable  machine readable output with full dates
 --last      prints the last (even if end<now) entry for every MAC
 --all       prints all entries i.e. more than one per MAC



More information about the dhcp-users mailing list