操作kickstart模式时DHCP无法启动

安装DHCP服务配置了以后无法启动

查看状态

[root@localhost ~]# systemctl status dhcpd
● dhcpd.service - DHCPv4 Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 四 2018-03-01 17:19:40 CST; 12s ago
     Docs: man:dhcpd(8)
           man:dhcpd.conf(5)
  Process: 4879 ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid (code=exited, status=1/FAILURE)
 Main PID: 4879 (code=exited, status=1/FAILURE)

3月 01 17:19:40 bogon dhcpd[4879]: on ftp.isc.org.  Features have been added and other changes
3月 01 17:19:40 bogon dhcpd[4879]: have been made to the base software release in order to make
3月 01 17:19:40 bogon dhcpd[4879]: it work better with this distribution.
3月 01 17:19:40 bogon dhcpd[4879]: 
3月 01 17:19:40 bogon dhcpd[4879]: Please report for this software via the CentOS Bugs Database:
3月 01 17:19:40 bogon dhcpd[4879]:     http://bugs.centos.org/
3月 01 17:19:40 bogon systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
3月 01 17:19:40 bogon systemd[1]: Failed to start DHCPv4 Server Daemon.
3月 01 17:19:40 bogon systemd[1]: Unit dhcpd.service entered failed state.
3月 01 17:19:40 bogon systemd[1]: dhcpd.service failed.

状态错误,查看dhcp配置文件
vim /etc/dhcp/dhcpd.conf

配置如下

subnet 192.168.15.0 netmask 255.255.255.0 {

range 192.168.15.100 192.168.15.199;

option routers 192.168.15.2;

option subnet-mask 255.255.255.0;

default-lease-time 21600;

max-lease-time 43200;

next server 192.168.15.201;

filename "/pxelinux.0";

}

 配置next-server要带连字符“-”
修改后

subnet 192.168.15.0 netmask 255.255.255.0 {

range 192.168.15.100 192.168.15.199;  #可分配起始IP-结束IP

option routers 192.168.15.2;          

option subnet-mask 255.255.255.0;

default-lease-time 21600;            #设置默认的IP租用期限

max-lease-time 43200;                #设置最大IP租用期限

next-server 192.168.15.201;          #告知客户端TFTP服务器的IP

filename "/pxelinux.0";              #告知客户端TFTP根目录下载pxlinux.0文件

}
保存后启动成功
[root@localhost ~]# systemctl status dhcpd
● dhcpd.service - DHCPv4 Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; disabled; vendor preset: disabled)
   Active: active (running) since 四 2018-03-01 17:37:39 CST; 6s ago
     Docs: man:dhcpd(8)
           man:dhcpd.conf(5)
 Main PID: 5179 (dhcpd)
   Status: "Dispatching packets..."
   CGroup: /system.slice/dhcpd.service
           └─5179 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid

3月 01 17:37:39 bogon dhcpd[5179]: No subnet declaration for ens34 (no IPv4 addresses).
3月 01 17:37:39 bogon dhcpd[5179]: ** Ignoring requests on ens34.  If this is not what
3月 01 17:37:39 bogon dhcpd[5179]:    you want, please write a subnet declaration
3月 01 17:37:39 bogon dhcpd[5179]:    in your dhcpd.conf file for the network segment
3月 01 17:37:39 bogon dhcpd[5179]:    to which interface ens34 is attached. **
3月 01 17:37:39 bogon dhcpd[5179]: 
3月 01 17:37:39 bogon dhcpd[5179]: Listening on LPF/ens33/00:0c:29:4b:71:eb/192.168.15.0/24
3月 01 17:37:39 bogon dhcpd[5179]: Sending on   LPF/ens33/00:0c:29:4b:71:eb/192.168.15.0/24
3月 01 17:37:39 bogon systemd[1]: Started DHCPv4 Server Daemon.
3月 01 17:37:39 bogon dhcpd[5179]: Sending on   Socket/fallback/fallback-net
低级错误
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值