Installation and configuration of the ISC DHCP server
Peter Boy, Emmanuel Seyman
Status Work in progress |
Successor: DHCP and DDNS server kea (https://www.isc.org/kea/) |
Installing and configuring dhcpd
Install the dhcp server package.
# dnf install dhcp // doesn't exist, renamed dhcp-server
Create a simple configuration for the dhcp server at /etc/dhcp/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 { authoritative; default-lease-time 600; max-lease-time 7200; ddns-update-style none;
option domain-name-servers 192.168.1.1; option routers 192.168.1.1;
}
Test your configuration and address any problems you discover.
systemctl start dhcpd journalctl --unit dhcpd --since -2m --follow
configuration for pxe boot
Add entries to point clients to their bootloader and the server that provides it to your subnet configuration in /etc/dhcp/dhcpd.conf. Because DHCP clients provide the server with identifying information along with their address request, BIOS clients and UEFI clients can each be directed to the correct bootloader. Using latest processor architecture option codes, which may be found on the IANA DHCPv6 registration page, allows multiple architectures to share a single DHCP server.
# refer to RFC4578 & IANA DHCPv6 for possible arch option values option arch code 93 = unsigned integer 16;
subnet 192.168.1.0 netmask 255.255.255.0 { if option arch = 00:07 { # x64 UEFI filename "uefi/shimx64.efi"; next-server 192.168.1.2; } else if option arch = 00:0b { # aarch64 UEFI filename "uefi/shimaa64.efi"; server-name "192.168.1.2"; } else { filename "pxelinux.0"; next-server 192.168.1.2; }
...
Restart the dhcp service to check the configuration and make changes as needed.
systemctl restart dhcpd journalctl --unit dhcpd --since -2m --follow
Want to help? Learn how to contribute to Fedora Docs ›