Installs and configures ISC DHCP server in both DHCP and DHCPv6 mode.
- Supports setting up Master/Slave ISC DHCP failover (IPv4 only).
- Includes Support for DDNS
- Includes resources for managing:
- Package installation
- Service configuration and management
- Global configuration
- Shared subnets
Version 7.0.0 constitutes a major change and rewrite, please see UPGRADING.md.
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org (opens in a new tab) or come chat with us on the Chef Community Slack in #sous-chefs (opens in a new tab).
- Debian / Ubuntu
- RHEL/CentOS and derivatives
- Fedora and derivatives
- Chef 15.3+
It is recommended to create a project or organization specific wrapper cookbook (opens in a new tab) and add the desired custom resources to the run list of a node.
Example of a basic server listening on and issuing leases for the subnet
dhcp_install 'isc-dhcp-server' dhcp_service 'dhcpd' do ip_version :ipv4 action [:create, :enable, :start] end dhcp_config '/etc/dhcp/dhcpd.conf' do allow %w(booting bootp unknown-clients) parameters( 'default-lease-time' => 7200, 'max-lease-time' => 86400, 'update-static-leases' => true, 'one-lease-per-client' => true, 'authoritative' => '', 'ping-check' => true ) options( 'domain-name' => '"test.domain.local"', 'domain-name-servers' => '22.214.171.124, 126.96.36.199' ) action :create end dhcp_subnet '192.0.2.0' do comment 'Basic Subnet Declaration' subnet '192.0.2.0' netmask '255.255.255.0' options [ 'routers 192.168.1.1', ] pool( 'peer' => '192.168.0.2', 'range' => '192.168.1.100 192.168.1.200' ) parameters( 'ddns-domainname' => '"test.domain"' ) end
- https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcpdconf (opens in a new tab)
- https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcp-options (opens in a new tab)
- https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcp-eval (opens in a new tab)
Please check for more varied working examples in the test cookbook.
There are some known issues on Ubuntu when apparmor is running which may prevent the service from running properly. Please see the test cookbook for a possible work around that you can apply on your nodes.
This project exists thanks to all the people who contribute. (opens in a new tab)
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.