Ubuntu 20.04 ,VM,安装isc-dhcp-server成功,但是配置好以后,dhcpd service 一直failed。
配置监听接口:
INTERFACESv4="ens160"
#INTERFACESv6="ens160"
配置DHCPD文件
subnet 10.139.8.0 netmask 255.255.255.0{
range 10.139.8.16 10.139.8.240;
}
default-lease-time 600;
max-lease-time 7200;
option ntp-servers 172.30.2.3;
option domain-name-servers 172.30.2.3;
option broadcast-address 10.139.8.255;
option routers 10.139.8.250;
运行结果及报错内容
报错1:
Active: failed (Result: exit-code) since Thu 2022-04-14 08:38:51 UTC; 1min 32s ago
Process: 8802 ExecStart=/bin/sh -ec CONFIG_FILE=/etc/dhcp/dhcpd.conf; if [ -f /etc/ltsp/dhcpd.conf ]; then CONFIG_FILE=/etc/ltsp/dhcpd.conf; fi; >
Main PID: 8802 (code=exited, status=1/FAILURE)
Apr 14 08:38:51 dhcpd[8802]: Not configured to listen on any interfaces!
提示2:
Apr 14 08:50:53 systemd[1]: isc-dhcp-server.service: Main process exited, code=exited, status=1/FAILURE
Apr 14 08:50:53 systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
尝试过在Ubuntu 21.10,Ubuntu 18.04,在实体机上安装isc-dhcp-server,仍然会有以上报错。安装步骤也有比照官网做法。头疼请指点。