Finding dynamic IP addresses
|
Finding a DHCP Server
The call dhclient -v made as root is usually a reliable way to find DHCP servers that have gone missing. A simpler method would be to use dhcping [10], which is primarily used to determine whether a DHCP server is still running. You can call this program with the -v (verbose) specification (Listing 9). The DHCPStatus [11], reportdhcp [12], and dhcpd-pools [13] tools work in a similar fashion.
Listing 9
dhcping
# dhcping -v Got answer from: 192.168.55.6 received from 192.168.55.6, expected from 0.0.0.0 no answer
Inventory of Leases
Most of the tools referenced here can be used without root rights. The Perl script dhcp-lease-list works differently. It can only be started by the system administrator. This tool has been a part of the ISC DHCP server since version 4.3.1. It uses the file for the assigned leases [14] as parameters and interprets the leases (Listing 10). The output lets you view the MAC addresses, the IP address assignments, the hostnames, the valid time of the lease, and, if available, the name of the manufacturer of the network chip.
Listing 10
dhcp-lease-list
# dhcp-lease-list --lease /var/lib/dhcp/dhcpd.leases [...] MAC IP hostname valid until manufacturer =============================================================================== [...] 00:1e:67:39:cd:fa 192.168.251.249 DALCOServer 2016-02-23 16:52:33 -NA- 00:1e:67:49:72:fe 192.168.251.6 -NA- 2016-02-23 16:52:55 -NA- 00:1e:67:4f:df:2c 192.168.251.93 DALCOServer 2016-02-23 16:52:38 -NA- [...]
« Previous 1 2 3 4 Next »
Buy this article as PDF
Pages: 5
(incl. VAT)