I am trying to setup a PXE server on my laptop on CentOS 7 to connect to a physical test client, following the tutorial on: https://www.linuxtechi.com/configure-pxe-installation-server-centos-7/#comment-35567
All of the configuration files and setup procedures are from this website. On “Step: 6 Start and enable xinetd, dhcp, and vsftpd service.”, The commands: “systemctl start xinetd” and “systemctl enable xinetd” work, but when I run the command: “systemctl start dhcpd.service”, I receive the following error message:
Job for dhcpd.service failed because the control process exited with error code. See “systemctl status dhcpd.service” and “journalctl -xe” for details.
When I run “systemctl status -l dhcpd.service”, I receive the following error message:
systemctl status -l dhcpd.service
dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-07-05 11:18:07 EDT; 1min 12s ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Process: 11655 ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid (code=exited, status=1/FAILURE)
Main PID: 11655 (code=exited, status=1/FAILURE)
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: to which interface virbr0 is attached. **
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]:
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]:
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: No subnet declaration for enp0s20f0u13 (10.249.6.154).
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: ** Ignoring requests on enp0s20f0u13. If this is not what
Jul 05 11:18:07 localhost.localdomain dhcpd[11655]: you want, please write a subnet declaration
Jul 05 11:18:07 localhost.localdomain systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
Jul 05 11:18:07 localhost.localdomain systemd[1]: Failed to start DHCPv4 Server Daemon.
Jul 05 11:18:07 localhost.localdomain systemd[1]: Unit dhcpd.service entered failed state.
Jul 05 11:18:07 localhost.localdomain systemd[1]: dhcpd.service failed.
Also here is the Dhcpd.conf file:
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
# DHCP Server Configuration file.
ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;
allow unknown-clients;
# internal subnet for my DHCP Server
subnet 172.168.1.0 netmask 255.255.255.0 {
range 172.168.1.21 172.168.1.151;
option domain-name-servers 172.168.1.11;
option domain-name "pxe.example.com";
option routers 172.168.1.11;
option broadcast-address 172.168.1.255;
default-lease-time 600;
max-lease-time 7200;
# IP of PXE Server
next-server 172.168.1.11;
filename "pxelinux.0";
}
What do I need to change in my dhcpd.conf file to make the command “systemctl start dhcpd.service” work so I can finish going through the PXE server tutorial?