1、修改服务的配置文件:定制功能
vi /etc/dhcp/dhcpd.conf
option domain-name "linuxxue.top";
option domain-name-servers 202.106.0.20;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.150 192.168.100.250;
option routers 192.168.100.100;
}
##启动
/etc/init.d/dhcpd start
chkconfig dhcpd on
2、linux客户机测试
dhclient -d eth0 ##获取ip
dhclient -r eth0 ##释放ip
时间: 2024-09-30 05:06:06