CentOS 7.2无法启动dhcpd

332nm8kg  于 2022-11-07  发布在  其他
关注(0)|答案(1)|浏览(158)

我有一台服务器:

[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时:
第一个

bvjveswy

bvjveswy1#

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

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

相关问题