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

Mattias Ellerot mattias.ellerot at csit.se
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.
 
//ME
 
 
Från: dhcp-users-bounce at isc.org [mailto:dhcp-users-bounce at isc.org] För Frank Bulk
Skickat: den 19 januari 2008 05:59
Till: dhcp-users at isc.org
Ä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.
 
Frank
 



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!
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/20080121/6c313b22/attachment.html>


More information about the dhcp-users mailing list