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

Mattias Ellerot mattias.ellerot at csit.se
Fri Jan 18 14:13:00 UTC 2008

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 IP.
With my best regards
Mattias Ellerot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20080118/6d058d3c/attachment.html>

More information about the dhcp-users mailing list