dhcpd.conf 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ##
  2. ## dhcpd.conf -- ISC DHCP Daemon Configuration
  3. ##
  4. # Options applicable to all subnets
  5. option domain-name "quux.dom";
  6. authoritative;
  7. default-lease-time 600;
  8. max-lease-time 7200;
  9. ddns-update-style none;
  10. use-host-decl-names on;
  11. # Define some non-standard options
  12. option freebsd-swappath code 128 = text;
  13. option freebsd-rootopts code 130 = text;
  14. option freebsd-swapopts code 131 = text;
  15. # Define a particular sample subnet
  16. subnet 192.168.1.0 netmask 255.255.255.0 {
  17. # Options applicable to this particular subnet
  18. option broadcast-address 192.168.1.255;
  19. option subnet-mask 255.255.255.0;
  20. option routers 192.168.1.1;
  21. option domain-name-servers 192.168.1.2;
  22. # Dynamic DNS (DDNS) Updating
  23. ddns-updates off;
  24. ddns-domainname "quux.dom";
  25. ddns-rev-domainname "in-addr.arpa";
  26. # Pool of known clients (i.e. MAC known but IP not specified)
  27. pool {
  28. range 192.168.1.100 192.168.1.149;
  29. min-lease-time 600; # 10min
  30. default-lease-time 43200; # 12hour
  31. max-lease-time 86400; # 24hour
  32. deny unknown clients;
  33. }
  34. # Pool of unknown clients (i.e. MAC not known)
  35. pool {
  36. range 192.168.1.150 192.168.1.199;
  37. min-lease-time 300; # 5min
  38. default-lease-time 3600; # 1hour
  39. max-lease-time 10800; # 3hour
  40. allow unknown clients;
  41. }
  42. }
  43. # The list of clients we explicitly configure
  44. group {
  45. # Just assign a fixed IP address for machine "quux1"
  46. host quux1 {
  47. hardware ethernet 01:02:03:00:00:01;
  48. fixed-address 192.168.1.3;
  49. }
  50. # Provide full boot information for a FreeBSD diskless client "quux2":
  51. # On the server, create a 32MB swapfile /dlc/fs/swap/swap.192.168.1.4
  52. # with `dd if=/dev/zero of=swap.141.1.129.4 bs=1m count=32' and the
  53. # filesystem /dlc/fs/quux2 with `cd /usr/src; make buildworld; make
  54. # installworld DESTDIR=/dlc/fs/quux2'. Then use Etherboot for booting.
  55. host quux2 {
  56. hardware ethernet 01:02:03:00:00:02;
  57. fixed-address 192.168.1.4;
  58. next-server 192.168.1.2;
  59. option tftp-server-name "192.168.1.2";
  60. filename "kernel.quux";
  61. always-reply-rfc1048 on;
  62. option root-path "192.168.1.2:/dlc/fs/quux2";
  63. option freebsd-rootopts "rw,noatime";
  64. option swap-server 192.168.1.2;
  65. option freebsd-swappath "192.168.1.2:/dlc/fs/swap";
  66. option freebsd-swapopts "sw";
  67. }
  68. }
  69. # The list of clients we know, but which get IP addresses from pool
  70. group {
  71. host quux3 { hardware ethernet 01:02:03:00:00:03; }
  72. host quux4 { hardware ethernet 01:02:03:00:00:04; }
  73. }