O protocolo DHCP não faz acomodações para que você possa consultar um servidor DHCP real e perguntar sobre o conteúdo de seu arquivo dhcpd.leases
.
Então, você basicamente tem duas opções.
-
SSH no servidor DHCP e analise o conteúdo do arquivo
dhcpd.leases
manualmente. -
Instale um software como
DHCPStatus
, que fornece uma interface para que você possa obter informações sobre o conteúdo de um Concessões do servidor DHCP.
trecho
DHCPStatus is a query tool for browsing information stored in DHCPD's configuration and leases files, dhcpd.conf and dhcpd.leases. It correlates the subnet details that you configure in the conf file with the lease records that DHCPD maintains in its lease file. You can thus obtain an overall picture of your DHCP environment, as well as view details of individual leases for each IP.
DHCPStatus can be run either as a CGI script and viewed via a web browser, or as a command-line tool that generates simple text output. The CGI/web interface requires that you run a CGI-capable web server on your DHCPD server machine. The command-line tool merely requires that you have a shell login on the server.
O DHCPStatus fornece 2 relatórios.
Exemplos
-
Aqui está o relatório de resumo do DHCPStatus.
como texto
[localhost]$ dhcpstatus DHCP Subnet Information Location: IFC - Glenorchy Subnet: 10.1.4.64 Netmask: 255.255.255.192 IP range: 10.1.4.65 - 10.1.4.126 Router: 10.1.4.126 IPs defined: 47 IPs used: 33 IPs free: 14 Location: TGIO Subnet: 10.1.4.128 Netmask: 255.255.255.192 IP range: 10.1.4.129 - 10.1.4.190 Router: 10.1.4.190 IPs defined: 30 IPs used: 4 IPs free: 26 Location: Servtas - Devonport Subnet: 10.1.5.64 Netmask: 255.255.255.224 IP range: 10.1.5.65 - 10.1.5.94 Router: 10.1.5.94 IPs defined: 10 IPs used: 8 IPs free: 2 Location: Servtas - Burnie - Reece House Subnet: 10.1.5.96 Netmask: 255.255.255.224 IP range: 10.1.5.97 - 10.1.5.126 Router: 10.1.5.126 IPs defined: 15 IPs used: 5 IPs free: 10 Location: Servtas - Glenorchy Subnet: 10.1.5.160 Netmask: 255.255.255.224 IP range: 10.1.5.161 - 10.1.5.190 Router: 10.1.5.190 IPs defined: 15 IPs used: 1 IPs free: 14
Como HTML
EaquiestáorelatóriodetalhadodoDHCPStatus.
Comotexto
[localhost]$dhcpstatus-s192.62.4.64DHCPSubnetInformation:IFC-GlenorchySubnet:192.62.4.64Netmask:255.255.255.192Broadcast:192.62.4.127Router:192.62.4.126DNSservers:192.62.11.156,192.62.130.13WINSservers:192.62.10.39,192.62.10.40IPrange:192.62.4.65-192.62.4.126IPaddress:192.62.4.65IPaddress:192.62.4.66IPaddress:192.62.4.67IPaddress:192.62.4.68IPaddress:192.62.4.69IPaddress:192.62.4.70IPaddress:192.62.4.71IPaddress:192.62.4.72Leasestatus:ActiveLeasestart:07/11/200007:43:12Leaseend:21/11/200007:43:12Macaddress:00:80:5f:f7:d9:52DNSname:infna72.ifc.tas.gov.auWINSname:9906000IFC9006
ComoHTML