You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dhcpd.conf 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #Dynamic DNS security settings
  2. key "key-internal" {
  3. algorithm HMAC-MD5;
  4. secret "DNS_TSIG_KEY_INTERNAL_SECRET";
  5. };
  6. zone DHCP_DYN_IPS_DOMAIN {
  7. primary DHCP_DNS_MASTER;
  8. key "key-internal";
  9. }
  10. zone DHCP_SITE_DOMAIN {
  11. primary DHCP_DNS_MASTER;
  12. key "key-internal";
  13. }
  14. zone DHCP_REV_DOMAIN {
  15. primary DHCP_DNS_MASTER;
  16. key "key-internal";
  17. }
  18. # Custom routes classes
  19. option classless-routes code 121 = array of unsigned integer 8;
  20. option classless-routes-win code 249 = array of unsigned integer 8;
  21. # Leases settings
  22. default-lease-time 600;
  23. max-lease-time 7200;
  24. # Dynamic DNS update
  25. ddns-updates on;
  26. ddns-update-style interim;
  27. update-static-leases on;
  28. #allow client-updates;
  29. # Misc settings
  30. use-host-decl-names on;
  31. authoritative;
  32. log-facility local7;
  33. subnet DHCP_SUBNET netmask DHCP_NETMASK {
  34. # Dynamic DNS update
  35. ddns-domainname "DHCP_DYN_IPS_DOMAIN";
  36. update-conflict-detection false;
  37. # IP settings
  38. range DHCP_IP_FIRST DHCP_IP_LAST;
  39. option subnet-mask DHCP_NETMASK;
  40. option broadcast-address DHCP_BROADCAST;
  41. option routers DHCP_ROUTERS;
  42. # DNS settings
  43. option domain-name "DHCP_SITE_DOMAIN";
  44. option domain-search "DHCP_SITE_DOMAIN", "DHCP_DOMAIN";
  45. option domain-name-servers DHCP_DNS_SERVER;
  46. # Push custom routes to clients
  47. #option classless-routes 24, 10,15,42, 10.15.12,2;
  48. #option classless-routes-win 24, 10,15,42, 10.15.12,2;
  49. # Netboot settings
  50. next-server DHCP_TFTP_SERVER;
  51. #option root-path "10.15.100.1:/pxeroot/ubuntu";
  52. if exists user-class and ( option user-class = "iPXE-rthoni" ) {
  53. option domain-search "DHCP_SITE_DOMAIN";
  54. filename "http://netboot/boot.ipxe";
  55. }
  56. else {
  57. filename "ipxe-rthoni.kpxe";
  58. }
  59. # Static IP hosts
  60. group {
  61. host vm-pxe {
  62. hardware ethernet 08:00:27:7b:9d:21;
  63. fixed-address 10.15.100.10;
  64. }
  65. host vm-windows {
  66. hardware ethernet 08:00:27:76:ce:95;
  67. fixed-address 10.15.100.11;
  68. }
  69. ddns-domainname "DHCP_SITE_DOMAIN";
  70. option host-name = host-decl-name;
  71. ddns-hostname = config-option host-name;
  72. }
  73. # Force a default hostname if not present
  74. if option dhcp-message-type = 3 and not exists host-name and config-option host-name = null {
  75. option host-name = concat("dyn-", binary-to-ascii(10, 8, "-", leased-address));
  76. ddns-hostname = config-option host-name;
  77. }
  78. }