DHCPv6 PD server
Shane Kerr
shane at time-travellers.org
Mon Aug 13 20:03:27 CEST 2012
Gert and all,
On Monday, 2012-08-13 17:42:17 +0200,
Gert Doering <gert at space.net> wrote:
> Hi,
>
> On Sun, Aug 12, 2012 at 11:07:42AM +0200, Oliver wrote:
> > The ISC suite implements "OMAPI" for reading/writing/trapping on
> > events - you should be able to write a monitoring daemon that
> > connects to OMAPI for the purposes of being notified about PDs that
> > have been handed out; much cleaner than poking a leases file :)
>
> Will the dhcpd actually *notify* the client of changes? From reading
> omapi(3), this very much looks like a "command/response" interface,
> with no way to install callbacks / select on "activity".
>
> Better than parsing the dhcpd.leases file, maybe, but much worse to
> use a polling interface than just passively wait for the dhcpd.leases
> file to change (inotify etc).
>
> A callback handler that runs an arbitrary command (e.g. script) with
> some well-defined environment would be the right way forward...
I asked the ISC DHCP team, and got the following answer:
ISC DHCP4 code does support execute statement. Although I haven't
done it myself, my understanding is that it can be done. In
particular, quick look at common/execute.c indicates that we seem to
support on-commit, on-release and on-expiry, so all cases are
covered. I assume that assigned options are passed to that script. I
haven't checked if it is possible to to call execute() on both
client and server (it should be).
The other open source that does support calling external scripts is
Dibbler. The approach is very similar - external script can be
called whenever something happens to a lease.
Sadly, the DHCP documentation is a bit lacking right now. We've started
on a Administrator's Reference Manual, which will include explanations
of this sort of thing along with examples.
Cheers,
--
Shane
--
Shane
More information about the ipv6-ops
mailing list