1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| # 安装DHCP yum -y install dhcp-sever
# 编辑DHCP配置文件 vim /etc/dhcp/dhcpd.conf
# 内容如下 ddns-upadte-style none; ignore client-updates; subnet 192.168.60.0 netmask 255.255.255.0 { range 192.168.60.50 192.168.60.100; option subnet-mask 255.255.255.0; option routers 192.168.60.2; option domain-name-servers 192.168.60.14; default-lease-time 3600; }
# 启动DHCP,DHCP服务的配置文件为空,只有配置后才能启动 systemctl start dhcpd systemctl enable dhcpd
|