<div dir="ltr"><div>We use a script (based on the <a href="http://dhcp-lease-list.pl">dhcp-lease-list.pl</a> script in /contrib) to do what you describe from pfsense. We've added options (including sorting, formatting, etc.) to tailor it specifically for our use. It does not include a couple of the columns in your example, but those would be trivial to add. </div><div><br></div><div>NOTE: this script only "understands" IPv4. It has never been tested with IPv6. Most everything should work, but we don't currently have even a test environment to try it. Hopefully later this year there will be cycle time to experiment with that.</div><div><br></div><div>YMMV</div><div>The <font face="Helv" size="3"><font face="Helv" size="3">Paranoid Schizophrenic</font></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 15, 2015 at 12:28 PM, Leandro <span dir="ltr"><<a href="mailto:ingrogger@gmail.com" target="_blank">ingrogger@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi dhcp users list.<br>
    Im looking for some tool to list the provided leases and its status.<br>
    So far I can list range usage per defined network using dhcpd-tools
    as follows:<br>
    <br>
    [root@centos-dns1 etc]# dhcpd-pools -L11 -c /etc/dhcp/dhcpd.conf -l
    /var/lib/dhcpd/dhcpd.leases<br>
    Ranges:<br>
    shared net name     first ip           last ip            max  
    cur    percent  touch   t+c  t+c perc     bu  bu perc<br>
    Relay1              192.168.88.2     - 192.168.88.126     125    
    0      0.000     40    40    32.000     50   40.000<br>
    Relay2              192.168.88.130   - 192.168.88.254     125    
    0      0.000      1     1     0.800      0    0.000<br>
    Relay1              192.168.89.2     - 192.168.89.126     125    
    0      0.000     66    66    52.800     59   47.200<br>
    Relay2              192.168.89.130   - 192.168.89.254     125    
    0      0.000      1     1     0.800      2    1.600<br>
    <br>
    This is very usefull , but I wonder if is there other way to list
    all leases and its status, for example pfsense provides the
    following list:<br>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" summary="dhcp leases">
      <thead><tr>
          <td><a href="https://10.0.0.251/status_dhcp_leases.php#" target="_blank">P
              address</a></td>
          <td><a href="https://10.0.0.251/status_dhcp_leases.php#" target="_blank">MAC
              address</a></td>
          <td><a href="https://10.0.0.251/status_dhcp_leases.php#" target="_blank">Hostname</a></td>
          <td><a href="https://10.0.0.251/status_dhcp_leases.php#" target="_blank">Start</a></td>
          <td><a href="https://10.0.0.251/status_dhcp_leases.php#" target="_blank">End</a></td>
          <td><a href="https://10.0.0.251/status_dhcp_leases.php#" target="_blank">Online</a></td>
          <td><a href="https://10.0.0.251/status_dhcp_leases.php#" target="_blank">Lease
              Type</a></td>
        </tr>
      </thead> <tbody>
        <tr>
          <td>192.168.88.130 </td>
          <td><a title="send Wake on LAN packet to this MAC address" href="https://10.0.0.251/services_wol.php?if=opt2&mac=08:00:27:95:d9:62" target="_blank">08:00:27:95:d9:62</a> </td>
          <td> </td>
          <td>2015/07/15 14:21:06 </td>
          <td>2015/07/15 16:21:06 </td>
          <td>offline </td>
          <td>active </td>
        </tr>
      </tbody>
    </table>
    <br>
    Thanks <br><span class="HOEnZb"><font color="#888888">
    Leandro.<br>
    <br>
  </font></span></div>

<br>_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank" rel="noreferrer">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div> </div><div> </div><div>paranoid sysadmin</div></div>
</div>