using dhcpd with mysql

Matt Jenkins matt at smarterbroadband.net
Tue Dec 22 21:11:41 UTC 2009


Any updated on this? I recently setup Bind DNS with DLZ. I would like to 
integrate DHCP into this.

I run a WISP and all customers information is stored in a database. I 
need to hand out an specific ip address to a specific mac address 
(Calea) that is identified to a specific customer. Currently I use a 
really bulky snmp program I built to do this. This only works for about 
90% of situations. If the customer has a router or other device that 
needs to have the address it currently has to be input manually into 
that device. As customers move from one location to another they 
sometimes have to change their address. If I could use DHCP to read the 
database this could all be very easily automated.

Gregor Kling wrote:
> Hello Dmitry,
> Dmitry Cherkasov schrieb:
>> Hello everybody.
>>
>> I am sure this topic was discussed a lot of times, yet I didn't find
>> satisfying information in ISC DHCP docs or internet.
>>
>> I'm looking for a solution to tie dhcpd with external database, e.g.
>> MySQL. What I need is the following:
>>
>> 1) keeping per host (and probably other) information in external DB so
>> that dhcpd queries it when serving requests
>> 2) storing lease information in external DB
>>
>> Certainly, some tasks may be fulfilled with OMAPI and parsing
>> dhcpd.leases, but it does not seem to be flexible enough.
>> So the question is how it may be possible to implement dhcpd
>> interaction with external SQL database?
>>
>>   
> It may not be very helpful to you, but it does not feel very comfortable 
> with life-asking a backend database
> for something ~trivial~ as dhcp/dns data.
> This is another layer that could wreak havoc. In case of problems you 
> have to cope not with flat files but with a system that need to use a 
> query language instead of a simple grep.
> If you want to host your data in a database there a plenty good reasons.
> But IMHO its always better to generate the data for dns or dhcp data 
> from the backend and use the native format of
> the service.
> Why do you want to hold data about leases in a mysql databases. I cannot 
> see an advantage ?
> 
>> P.S. I'm obviously not the first to look for such solution, there are
>> for example http://users.accesscomm.ca/docsis_server/ ,
>> http://www.anemon.org/wiki/ .
>> Also there are DHCP implementations when server generates accounting
>> using some AAA protocol like RADIUS (e.g.
>> http://www.cisco.com/en/US/docs/ios/12_2sr/12_2srb/feature/guide/ipradacc.html). 
>>
>>
>>   
> 
> 



More information about the dhcp-users mailing list