Modifying DHCP server to use database backend
Ted Lemon
Ted.Lemon at nominum.com
Fri Jul 29 00:05:19 UTC 2005
On Jul 28, 2005, at 2:30 PM, andy goldstein wrote:
> 1) is this feasible?
I don't think so. The performance you'd get out of an SQL database
would be nowhere near enough to support a telco-grade DHCP server.
> 2) is this a good idea?
In the abstract, sure. In practice, stuffing a lease db into an SQL
database isn't going to scale very well - I would expect it to be
slower to write than the current database, although of course
startups would be faster.
You may be imagining a lot of maintenance benefit from this, but I
don't think you'd get that benefit, because if you modified the
database from an external program, it could easily cause the DHCP
server to do something bogus.
> (Should the in-memory database be able to handle
> this large a number of subnets?)
It was never designed with that in mind. In principle it can do
this right now, as long as you crank the renewal time out long
enough, but server reloads become more expensive the more leases
you're supporting.
> 4) if it is feasible, would it be sufficient to modify server/mdb.c
> so any
> access to the in-memory data structures is replaced with access to the
> database? Or are there other files that would need changes as well?
There is no formal interface between the protocol engine and the
database, so it would be very difficult to do this - just hacking
mdb.c would be about 5% of the work required. You'd really have to
redesign a lot of the internal data structures - it's not like just
strapping on an ODBC interface or something.
More information about the dhcp-hackers
mailing list