请告知这里发生了什么。我配置了(在 /etc/netplan 中)一个如上所述的静态地址,现在我被告知这是一个“辅助地址”,而 192.168.0.199(dchp 获得)是主地址。
如果 /etc/netplan 中的主配置文件告诉系统已分配静态 IP,您能否确保它会覆盖与此设置相矛盾的其他内容。或者在文档中明确说明设置静态 IP 需要更改的所有文件。我看到上面我需要检查 /lib/netplan 和 /run/netplan 中的 yaml 文件。哦,看在上帝的份上,为什么不回到简单易用的旧 /etc/network/interfaces 呢。
neilp@Lubuntu:~$ cat /etc/network/interfaces
cat: /etc/network/interfaces: No such file or directory
neilp@Lubuntu:~$ cat /etc/netplan/*.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
neilp@Lubuntu:~$ sudo lshw -C network
[sudo] password for neilp:
*-network:0
description: Ethernet interface
product: 82540EM Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 3
bus info: pci@0000:00:03.0
logical name: enp0s3
version: 02
serial: 08:00:27:8d:2c:2a
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 66MHz
capabilities: pm pcix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full ip=192.168.0.101 latency=64 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:19 memory:f0200000-f021ffff ioport:d020(size=8)
*-network:1
description: Ethernet interface
product: 82540EM Gigabit Ethernet Controller
vendor: Intel Corporation
physical id: 8
bus info: pci@0000:00:08.0
logical name: enp0s8
version: 02
serial: 08:00:27:a6:57:79
size: 1Gbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 66MHz
capabilities: pm pcix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000 driverversion=7.3.21-k8-NAPI duplex=full latency=64 link=yes mingnt=255 multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:16 memory:f0820000-f083ffff ioport:d240(size=8)