我的 Ubuntu 服务器不接受我的静态 IP 分配。相反,我不断获得 DHCP 租用。未安装网络管理器。下面是 cat /etc/network/interfaces 的输出
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.128
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.120 192.168.1.125
dns-domain mynetwork.local
dns-search mynetwork.local
Run Code Online (Sandbox Code Playgroud)
问题:
为什么 Ubuntu 不接受静态 IP 分配?Interfaces 文件似乎被忽略了。
什么是允许分配 DHCP 租约?