Extracting agent.circuit-id and compare to dhcp leases!
Mattias Ellerot
mattias.ellerot at csit.se
Fri Jan 18 14:13:00 UTC 2008
Hi!
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;
authoritative;
option domain-name "bbtnet.se";
option domain-name-servers 77.110.38.205, 85.11.1.11;
default-lease-time 28800;
max-lease-time 28800;
# Privat kunder - Tranemo
subnet 77.110.36.0 netmask 255.255.255.0 {
option domain-name "pp.tran.bbtnet.se";
option subnet-mask 255.255.255.0;
option routers 77.110.36.1;
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;
range 77.110.36.2 77.110.36.254;
}
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