小编som*_*HOW的帖子

为什么在子接口上启动 ISC DHCP 服务器时会出现“无子网声明”?

我在 上创建了两个子接口eth0

  • eth0:0 带IP 192.168.10.1/24
  • eth0:1 带IP 192.168.11.1/24

/etc/dhcp/dhcpd.conf像这样配置:

option domain-name-server 194.204.159.1;

subnet 192.168.10.0 netmask 255.255.255.0 {
   option routers 192.168.10.1;
   option subnet-mask 255.255.255.0;
   range 192.168.10.10 192.168.10.100;
}

subnet 192.168.11.0 netmask 255.255.255.0 {
   option routers 192.168.11.1;
   option subnet-mask 255.255.255.0;
   range 192.168.11.10 192.168.11.100;
}
Run Code Online (Sandbox Code Playgroud)

但是当我尝试启动 DHCP 服务器时,我得到:

No subnet declaration for eth0:0 (no IPv4 addresses).
 ** Ignoring requests on eth0:0.  If this is not what
    you want, please write a subnet declaration
    in your dhcpd.conf file for the network …
Run Code Online (Sandbox Code Playgroud)

networking dhcp isc-dhcp dhcp-server

5
推荐指数
1
解决办法
3988
查看次数

标签 统计

dhcp ×1

dhcp-server ×1

isc-dhcp ×1

networking ×1