大网数据广告活动
服务器运维问答

How to fix "no address range available for DHCP request" error?

· 52CE 我爱测

Trying to run a DHCP server on lo using dnsmasq. $ cat /etc/dnsmasq.d/01-dhcp-loopback.conf interface=lo dhcp-range=10.0.2.10,10.0.2.254,255.255.255.0 port=0 I can get things working by adding the following alias to eth0 , but th…

问题原文

原帖链接 · sunknudsen · CC BY-SA 4.0

Trying to run a DHCP server on lo using dnsmasq.

$ cat /etc/dnsmasq.d/01-dhcp-loopback.conf
interface=lo
dhcp-range=10.0.2.10,10.0.2.254,255.255.255.0
port=0

I can get things working by adding the following alias to eth0, but that doesn’t make sense right?

auto eth0:1
iface eth0:1 inet static
    address 10.0.2.1/24

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

You probably can't configure eth0 as it's a container, not a real VM, and the host controls the network.

In a real VM you could create a dummy interface and use that. Since you have a container, this depends on whether the container host has loaded the dummy module (and the chance is pretty close to 100% that they have not).

iface dummy0 inet static
    address 10.10.0.1/24
    pre-up ip link add dummy0 type dummy

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-08-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。