PVE安装OpenWrt做主路由后局域网DHCP分配不了地址的修复

通过悟空的日常安装的istoreos设置成主路由后无论如何设置,都会发现DHCP分配不了IPV4地址,无论怎么设置,最后发现:
root@iStoreOS:~# uci show dhcp.lan
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv4='disabled'
dhcp.lan.force='1'
dhcp.lan.limit='116'

uci show 输出可以看出,DHCPv4 被显式禁用了dhcp.lan.dhcpv4='disabled'),这是导致局域网设备无法获取 IP 地址的直接原因。以下是完整的修复步骤:
#启用 DHCPv4 服务
uci set dhcp.lan.dhcpv4='server' # 启用DHCPv4服务
uci commit dhcp
/etc/init.d/dnsmasq restart

This entry was posted in Resourse. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *