我正在尝试使用busybox中的dhcp服务器udhcpd来获取IP地址。我正在开发一个带有标准 linux 的 ARM 平台。
dhcp 客户端 IP 地址没问题,根据 udhcpd.conf 文件中设置的范围,但网络掩码设置为 255.255.255.255。如果我手动将其更改为 255.255.255.0,则服务可以完美运行,但我不明白为什么将网络掩码设置为此以及可以修改哪些内容以使其自动运行。
(简单的)conf文件:
# Sample udhcpd configuration file (/etc/udhcpd.conf)
# Values shown are defaults
# The start and end of the IP lease block
start 192.168.7.2
end 192.168.7.254
# The interface that udhcpd will use
interface usb0
option subnet 255.255.255.0 (tested with or without this option)
希望有人可以帮助我了解问题所在