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

Mattias Ellerot mattias.ellerot at
Mon Jan 21 13:34:00 UTC 2008

Okeay..thanks. I'm bit of a newbie, mostly a layer 2 guy :) So how should I do? An configure example would be nice.
Från: dhcp-users-bounce at [mailto:dhcp-users-bounce at] För Frank Bulk
Skickat: den 19 januari 2008 05:59
Till: dhcp-users at
Ämne: RE: Extracting agent.circuit-id and compare to dhcp leases!
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 describe.

From: dhcp-users-bounce at [mailto:dhcp-users-bounce at] On Behalf Of Mattias Ellerot
Sent: Friday, January 18, 2008 8:13 AM
To: 'dhcp-users at'
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 "";
option domain-name-servers,;
default-lease-time 28800;
max-lease-time 28800;
# Privat kunder - Tranemo
subnet netmask {
                             option domain-name "";
                             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: <>

More information about the dhcp-users mailing list