Product SiteDocumentation Site

10.2. DHCP Server Configuration

Procedure 10.1. Installing and configuring dhcpd
  1. Install the dhcp server package.
    # dnf install dhcp
  2. 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;
    
    }
    
  3. Test your configuration and address any problems you discover.
    systemctl start dhcpd
    journalctl --unit dhcpd --since -2m --follow
    
  4. 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.
    # refer to RFC4758 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 {
    filename "uefi/shim.efi";
    } else {
    filename "pxelinux.0";
    }
    
    next-server 192.168.1.2;
    
    ...
    
  5. Restart the dhcp service to check the configuration and make changes as needed.
    systemctl restart dhcpd
    journalctl --unit dhcpd --since -2m --follow