nano /etc/dhcp/dhcpd.conf
authoritative;
ddns-update-style none;
default-lease-time 240;
max-lease-time 380;
subnet 192.168.21.0 netmask 255.255.255.0 {
range 192.168.21.30 192.168.21.70
option routers 192.168.21.1}
flore{
hardware ethernet 08:00:27:e1:f0:4e;
fixed address 192.168.21.40;
}
当我service isc-dhcp-server restart
写/etc/init.d,我遇到了这个错误:
start: job failed to start
答案1
您的子网声明中缺少分号,并且主机声明中的术语也缺少分号host
,以下内容应该可以让您走上正轨:
权威性; ddns 更新样式无; 默认租用时间 240; 最大租赁时间380; 子网 192.168.21.0 网络掩码 255.255.255.0 { 范围 192.168.21.30 192.168.21.70; 选项路由器192.168.21.1; } 主持人 flore { 硬件以太网 08:00:27:e1:f0:4e; 固定地址192.168.21.40; }