add/change/delete dhcpd.conf entries
Pieter.Donche at ua.ac.be
Tue Dec 9 09:19:11 PST 2008
In a DHCP server managing fixed IP addresses, one needs to make changes
often: new people need their Mac address given a IP addres, people
leaving need to be deleted, people changing an old for a new computer need
a Mac address change for the same IP, etc...
All this information is recorded in the /usr/local/etc/dhcpd.conf file.
I know, there is the omapi command shell (/usr/local/bin/omshell) but
as far as I can see, you can only use it interactively. Or am I wrong?
I would love to have a simple command line tool that allows you
to make changes to your dhcpd.conf file without needing to use an
editor or omapi.
e.g. for a new entry, something like:
# dhcpdmgr -A 184.108.40.206 -c "John.Adams PC" -i "00:34:1A:23:4A:0F"
which would add IP 220.127.116.11 in subnet 175.134.3 for mac address
00:34:1A:23:4A:0F with a comment "John.Adams PC"
and with other options for delete (-D), make changes to comment, IP
or Mac, etc...
Does anyone have such a command line tool?
With that command line tool one can easily make a wrapper script,
presenting you with a menu of frequent operations, and with extensive
checking of your input data. I use such a wrapper script, making use of
Solaris pntadm (DHCP network table management utility) command line tool.
More information about the freebsd-questions