安装:apt install isc-dhcp-server -y
修改监听设备:vim /etc/default/isc-dhcp-server
修改配置:vim /etc/dhcp/dhcpd.conf
subnet ${子网:192.168.1.0} netmask ${子网掩码:255.255.255.0}{
range ${开始IP:192.168.1.2} ${192.168.1.10;
option subnet-mask ${子网掩码:255.255.255.0};
option routers ${网关地址:192.168.1.1};
option domain-name "${域名:dhcp.com}";
option domain-name-servers ${DNS服务器IP地址:114.114.114.114};
default-lease-time 3600;
max-lease-time 7200;
启动服务:/etc/init.d/isc-dhcp-server start