TEXT   29
Install the DHCP server from the Internet Consortium
Guest on 16th March 2023 01:40:48 PM


  1. Install the DHCP server from the Internet Consortium.  There are
  2.     other servers available, but this one is the easiest to configure.
  3.  
  4. # apt-get install isc-dhcp-server
  5.  
  6. 2. Edit the server's master configuration file:
  7.  
  8. # emacs /etc/default/isc-dhcp-server
  9.  
  10. In the following file, make sure that your INTERFACES list is exactly
  11.   the interfaces on which you want your DHCP server to listen and give
  12.   out addresses.
  13.  
  14. Also, check DHCPD_CONF, which you'll edit next. On my system, it's in
  15.   the default location, /etc/dhcp/dhcpd.conf
  16.  
  17. ---------[ begin /etc/default/isc-dhcp-server ]---------
  18. # Defaults for isc-dhcp-server initscript
  19. # sourced by /etc/init.d/isc-dhcp-server
  20. # installed at /etc/default/isc-dhcp-server by the maintainer scripts
  21.  
  22. #
  23. # This is a POSIX shell fragment
  24. #
  25.  
  26. # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
  27. #DHCPD_CONF=/etc/dhcp/dhcpd.conf
  28.  
  29. # Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
  30. #DHCPD_PID=/var/run/dhcpd.pid
  31.  
  32. # Additional options to start dhcpd with.
  33. #       Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
  34. #OPTIONS=""
  35.  
  36. # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
  37. #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
  38. INTERFACES="eth0"
  39. ---------[ end /etc/default/isc-dhcp-server ]---------
  40.  
  41. 3. Edit the configuration file proper:
  42.  
  43. # emacs /etc/dhcp/dhcpd.conf
  44.  
  45. (See my example of dhcpd.conf; my edits are very few. I saved the
  46.    original template file for reference, as dhcpd_conf_orig.txt; do
  47.    "diff -u dhcpd_conf_orig.txt dhcpd.conf" to compare.)
  48.  
  49. 4. Start the server:
  50.  
  51. # /etc/init.d/isc-dhcp-server start

Raw Paste

Login or Register to edit or fork this paste. It's free.