glenn.satchell at uniq.com.au
Thu Jul 23 13:39:40 UTC 2015
On Thu, July 23, 2015 10:36 pm, Simon Hobson wrote:
> richard lucassen <mailinglists at lucassen.org> wrote:
>> problem is now that I always have to nmap the /24 in order to find the
>> hosts that populate this network. And as I use clusterssh to manage
>> these hosts, each time I need to find out the correct command as
>> dhcpd reassigns the ip that it once assigned in the past ;-)
> A few things that come to mind :
> - Write a script that tail the log (or uses on-commit) and shows the IP
> address and what it's been assigned to on a console screen.
> - Write (or adapt) a script that parses the leases file and tells you
> what's using what address that you can run as required.
> - Write a script that tails the log (or uses on-cmmit) to detect expired
> leases - and use OMAPI to delete the lease, or do a stop-blast-start
> sequence to clear the leases file completely.
> - Barcode (if it's not already) the MAC address on each bit of gear. Have
> a scanner that'll read the barcode and assign a fixed address (or let you
> pick one) before quickly re-configuring the DHCP server.
> - Hack the code. Remove the code that does all the "least recently used"
> stuff, and simply pick the first address that's not currently in use.
> Simon Hobson
Use DNS and call things by name rather than ip in your scripts.
More information about the dhcp-users