|
Prerequisites: |
FreeBSD (Base + Autoconf, Automake, Bash and GCC) |
|
Overview: Setting up a dhcpd (Dynamic Host Configuration Protocol Daemon) server on FreeBSD |
|
dhcpd – FreeBSD dhcpd server for your network devices
Home:
# Download (Notes: Users behind a Proxy Server should read this and users without Internet but have a CDRom read this.)
# Make sure bpf (Berkeley Packet
Filter) is compiled into your kernel (on by default)
grep bpf /usr/src/sys/i386/conf/GENERIC
# Change to the ICS DHCP port
directory
cd /usr/ports/net/isc-dhcp3-server/
# Install the ICS DHCP port using
the default options (just tab down and hit OK)
make install
# Copy the example configuration
as your starting point
cp /usr/local/etc/dhcpd.conf.sample /usr/local/etc/dhcpd.conf
# Edit rc.conf
vi /etc/rc.conf
# Add desired startup options to
rc.conf and pick the NIC you
want dhcpd running on
dhcpd_enable="YES"
dhcpd_flags="-q"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_ifaces="xl0"
dhcpd_withumask="022"
dhcpd_chuser_enable="YES"
dhcpd_withuser="dhcpd"
dhcpd_withgroup="dhcpd"
dhcpd_chroot_enable="YES"
dhcpd_devfs_enable="YES"
dhcpd_rootdir="/var/db/dhcpd"
dhcpd_flags="-early_chroot"
dhcpd_jail_enable="YES"
# Edit dhcpd.conf
vi /usr/local/etc/dhcpd.conf
# Avaya IP phones need a custom option 176 added (TFTP
Server and CLANs):
option Avaya code 176 = string;
option Avaya "TFTPSRVR=172.x.x.x,VLANTEST=300,MCIPADD=172.x.x.x,172.x.x.x,MCPORT=1719,L2QAUD=5,L2QSIG=3,DSCPAUD=46,DSCPSIG=26";
# Start the DCHPD Server Daemon
and look for errors:
/usr/local/sbin/dhcpd
NOTES:
# Configuration file:
vi /usr/local/etc/dhcpd.conf
# Startup boot-time script
/usr/local/etc/rc.d/isc-dhcpd.sh
# For more help:
man dhcpd
# Official Website:
http://www.isc.org/products/DHCP/
# See sample config options:
more
/usr/local/etc/dhcpd.conf.sample
# Binary locations:
/usr/local/sbin/dhcpd
/usr/local/bin/omshell
# Other file locations:
more /usr/local/etc/dhcpd.conf
more /var/db/dhcpd.leases
more /var/run/dhcpd.pid