- Install the DHCP server from the Internet Consortium. There are
- other servers available, but this one is the easiest to configure.
- # apt-get install isc-dhcp-server
- 2. Edit the server's master configuration file:
- # emacs /etc/default/isc-dhcp-server
- In the following file, make sure that your INTERFACES list is exactly
- the interfaces on which you want your DHCP server to listen and give
- out addresses.
- Also, check DHCPD_CONF, which you'll edit next. On my system, it's in
- the default location, /etc/dhcp/dhcpd.conf
- ---------[ begin /etc/default/isc-dhcp-server ]---------
- # Defaults for isc-dhcp-server initscript
- # sourced by /etc/init.d/isc-dhcp-server
- # installed at /etc/default/isc-dhcp-server by the maintainer scripts
- #
- # This is a POSIX shell fragment
- #
- # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
- #DHCPD_CONF=/etc/dhcp/dhcpd.conf
- # Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
- #DHCPD_PID=/var/run/dhcpd.pid
- # Additional options to start dhcpd with.
- # Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
- #OPTIONS=""
- # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
- # Separate multiple interfaces with spaces, e.g. "eth0 eth1".
- INTERFACES="eth0"
- ---------[ end /etc/default/isc-dhcp-server ]---------
- 3. Edit the configuration file proper:
- # emacs /etc/dhcp/dhcpd.conf
- (See my example of dhcpd.conf; my edits are very few. I saved the
- original template file for reference, as dhcpd_conf_orig.txt; do
- "diff -u dhcpd_conf_orig.txt dhcpd.conf" to compare.)
- 4. Start the server:
- # /etc/init.d/isc-dhcp-server start
Raw Paste