CentOS 7.2无法启动dhcpd

问题描述 投票:0回答:1

我有一个服务器:

[root@localhost network-scripts]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: em1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 04:7d:7b:ad:94:e4 brd ff:ff:ff:ff:ff:ff
3: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 04:7d:7b:ad:94:e5 brd ff:ff:ff:ff:ff:ff
    inet 103.57.111.1/29 brd 103.57.111.7 scope global em2
       valid_lft forever preferred_lft forever
    inet 103.57.111.2/29 brd 103.57.111.7 scope global secondary em2
       valid_lft forever preferred_lft forever
    inet 103.57.111.3/29 brd 103.57.111.7 scope global secondary em2
       valid_lft forever preferred_lft forever
    inet 103.57.111.4/29 brd 103.57.111.7 scope global secondary em2
       valid_lft forever preferred_lft forever
    inet 103.57.111.5/29 brd 103.57.111.7 scope global secondary em2
       valid_lft forever preferred_lft forever
    inet6 fe80::67d:7bff:fead:94e5/64 scope link 
       valid_lft forever preferred_lft forever

我安装了

dhcp
服务器,
yum install -y dhcp
,按照配置

cat /etc/dhcp/dhcpd.conf

default-lease-time 600;
max-lease-time 7200;

host passacaglia {
  hardware ethernet 04:7d:7b:67:50:80;
  fixed-address 45.117.42.5;
}

cat /etc/sysconfig/dhcpd

DHCPDARGS=em2

上面都是dhcp server配置,

iptables
down了,selinux关了。

操作系统是

CentOS 7.2


当我开始

dhcpd

[root@localhost network-scripts]# systemctl restart dhcpd
Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xe" for details.
[root@localhost network-scripts]# journalctl -xe
12月 19 00:26:59 localhost.localdomain dhcpd[18512]: on ftp.isc.org.  Features have been added and other changes
12月 19 00:26:59 localhost.localdomain dhcpd[18512]: have been made to the base software release in order to make
12月 19 00:26:59 localhost.localdomain dhcpd[18512]: it work better with this distribution.
12月 19 00:26:59 localhost.localdomain dhcpd[18512]: 
12月 19 00:26:59 localhost.localdomain dhcpd[18512]: Please report for this software via the CentOS Bugs Database:
12月 19 00:26:59 localhost.localdomain dhcpd[18512]:     http://bugs.centos.org/
12月 19 00:26:59 localhost.localdomain dhcpd[18512]: 
12月 19 00:26:59 localhost.localdomain dhcpd[18512]: exiting.
12月 19 00:26:59 localhost.localdomain systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
12月 19 00:26:59 localhost.localdomain systemd[1]: Failed to start DHCPv4 Server Daemon.
-- Subject: Unit dhcpd.service has failed

centos dhcp
1个回答
0
投票

您的配置中似乎缺少某些内容。你的子网定义?该子网上也没有任何接口监听。

subnet 45.117.42.0 netmask 255.255.255.0 {
    option routers                  45.117.42.1;
    option subnet-mask              255.255.255.0;
    option domain-search            "tecmint.lan";
    option domain-name-servers      45.117.42.1;
    range   45.117.42.10   45.117.42.100;
    range   45.117.42.120  45.117.42.200;
}
© www.soinside.com 2019 - 2024. All rights reserved.