Extracting agent.circuit-id and compare to dhcp leases!

Frank Bulk frnkblk at iname.com
Sat Jan 19 04:59:08 UTC 2008

I think most people would recommend generating an include file from your
database once an hour or so.  Then it should be possible to do what you


From: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] On Behalf
Of Mattias Ellerot
Sent: Friday, January 18, 2008 8:13 AM
To: 'dhcp-users at isc.org'
Subject: Extracting agent.circuit-id and compare to dhcp leases!



Now when I managed to extract agent.circuit-id I wan't it to compare the
agent.circuit-id with a list that defines what IP the customer should have.
To begin with it would be enough with a text file but preferable would be a
connection to a mysql database.

For instance have we a provisioning system that defines the agent.circuit-id
on the customer port and we are able to set a specific IP for it also. I'm
waiting for the table indexes so I know what I need to pick out from the db,
but for now I need to see that the DHCP server is able to set a static ip
through DHCP. 

Here's the test config from dhcpd.conf


log-facility local7;

ddns-update-style none;


option domain-name "bbtnet.se";

option domain-name-servers,;


default-lease-time 28800;

max-lease-time 28800;


# Privat kunder - Tranemo

subnet netmask {

                             option domain-name "pp.tran.bbtnet.se";

                             option subnet-mask;

                             option routers;

        log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".",
leased-address), " is allocated to customer: ", option agent.circuit-id));
allow client-updates;

                             ddns-updates off;

                             default-lease-time 28800;




Another thing, if the customer number is not in the list it shouldn't get an


With my best regards


Mattias Ellerot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20080118/6d54f0b3/attachment.html>

More information about the dhcp-users mailing list