DHCP Option82 and MySQL?

Simon Hobson dhcp1 at thehobsons.co.uk
Mon Aug 25 11:21:20 UTC 2008


Mattias Ellerot wrote:

>I'm looking for a solution where a provisioning 
>system is automatic adds a user into a 
>database(MySQL, PostgreeŠwhat ever) and adds 
>UserID, User customernr, IP, subnetmask, default 
>gw, DNS server and maybe DynamicDNS.
>This database is then, supposed, to be used by the DHCP server.
>So when a DHCP request is recived by the DHCP 
>server it looks at the agent.remote-id or 
>agent.circuit-id (witch is the user id) and then 
>asks the db for IP adress.
>NowŠthe tricky part J
>How to do this?

Out of the box, with a bit of hard work !

If you check the archives, you will find that at 
the moment, the only way to tie IP to circuit ID 
is by having a class & pool for each circuit. 
It's messy but not too bad to do as the output of 
a script. All the DB stuff you'd have to write 
yourself.

What would make it a lot easier would be a 
feature that so far hasn't made it out of the "to 
do" list - to redefine the master DB key. At 
present it's (in accordance with RFCs) "pick 
first option(client id, hardware)", but could be 
redefined with this feature.
Though I'm not sure how well it would work with 
renewals that don't go via the relay agent ?

If this is important to you, perhaps you could 
sponsor it's development ? There seem to be a few 
people who want it - but very few willing to 
sponsor it.


More information about the dhcp-users mailing list