我正在尝试在提供 PLoP Linux 图像的 Debian 6.0.3 Squeeze 机器上设置 pxe 引导服务器。我正在关注本教程。
当我尝试启动 dhcpd(从包 dhcp3-server)时,我得到以下信息:
No subnet declaration for eth0 (10.0.0.0).
**Ignoring requests on eth0. If this is not what
you want, please write a subnet delclaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **
Not configured to listen on any interfaces!
Run Code Online (Sandbox Code Playgroud)
/etc/dhcpd.conf除了一些更改外,我的与教程中的相同:
host testpc {
hardware ethernet 00:0C:6E:A6:1A:E6;
fixed-address 10.0.0.250;
}
Run Code Online (Sandbox Code Playgroud)
而是
host tablet {
hardware ethernet 00:02:3F:FB:E2:6F;
fixed-address 10.0.0.249;
}
Run Code Online (Sandbox Code Playgroud)
我的/etc/network/interfaces是:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 10.0.0.0
netmask 255.255.255.0
Run Code Online (Sandbox Code Playgroud)
这是我的/etc/default/isc-dhcp-server:
# Defaults for dhcp initscript
# sourced by /etc/init.d/dhcp
# installed at /etc/default/isc-dhcp-server by the maintainer scripts
#
# This is a POSIX shell fragment
#
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth0"
Run Code Online (Sandbox Code Playgroud)
我也复制到了/etc/default/dhcp3-server它,不确定它会检查哪个。
我也尝试将 ip 设置/etc/network/interfaces为 10.0.0.1 和 10.0.0.2,但它产生了相同的结果。
由于 dhcpd 必须将 IP 地址分发给客户端,因此它需要知道它负责的地址范围。子网声明为 dhcpd 提供了该信息以及更多信息。假设您使用的是 10.0.0/24,以下内容应该可以帮助您入门并跳过错误消息,但您确实需要进入文档以进一步了解。将此添加到您的 dhcpd.conf:
subnet 10.0.0.0 netmask 255.255.255.0 {
authoritative;
range 10.0.0.1 10.0.0.254;
default-lease-time 3600;
max-lease-time 3600;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.0;
option domain-name-servers 8.8.8.8;
option domain-name "example.com";
}
Run Code Online (Sandbox Code Playgroud)
我在上面插入的 IP 地址是猜测。您必须为您的设置正确设置这些。
| 归档时间: |
|
| 查看次数: |
101911 次 |
| 最近记录: |