CentOS6.6下DHCP服务器配置

1.安装
yum install dhcp
2.编辑配置文件
首先拷贝配置文件到/etc/dhcp/dhcpd.conf目录下,注意, 新版默认目录/etc/dhcp/dhcpd.conf旧版是/etc/dhcpd.conf
注意DNS后缀名是在option domain-name里配置,这个跟KMS自动激活关系很大
如果不配置默认后缀localdomain
cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf #新版的这里改路径了注意
vi /etc/dhcp/dhcpd.conf

DHCP服务器IP配置成192.168.88.132
清空内容,写入如下文件
subnet 192.168.88.0 netmask 255.255.255.0 {
  range 192.168.88.1 192.168.88.254;
  option domain-name-servers ns.testlan.com;
  option domain-name "testlan.com";
  option routers 192.168.88.132;
  option broadcast-address 192.168.88.255;
  default-lease-time 600;
  max-lease-time 7200;
}

host dhcpserver {
  hardware ethernet 00:0C:29:54:FF:37;
  fixed-address 192.168.88.132;
}
3.启动dhcp
service dhcpd restart
4.启动失败解决
打印日志,找出问题所在,主要检测目录和配置文件是否正确
cat /var/log/messages

你可能感兴趣的:(centos,服务器,配置,DHCP)