centos7 架设dhcp服务器
yum -y install dhcp
cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/
vi dhcpd.conf 添加以下:
subnet 192.168.116.0 netmask 255.255.255.0 {
range 192.168.116.100 192.168.116.200;
option routers 192.168.116.2;
option subnet-mask 255.255.255.0;
default-lease-time 21600;
max-lease-time 43200;
next-server 192.168.116.222;
filename "/pxelinux.0";
}
systemctl start dhcpd