gpt4 book ai didi

CentOS 7.2 无法启动dhcpd

转载 作者:行者123 更新时间:2023-12-04 19:41:36 27 4
gpt4 key购买 nike

我有一个服务器:

[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 ,并关注 configuration :
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服务器配置, iptables已关闭,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

最佳答案

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

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;
}

关于CentOS 7.2 无法启动dhcpd,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59396301/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com