我在vmware虚拟机上安装了具有最新更新的Ubuntu 17.10。Netplan没有配置我的2个以太网。
这是我的/etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
lan:
match:
macaddress: 00:12:34:a8:29:e8
set-name: lan
dhcp4: false
dhcp6: false
accept-ra: false
addresses:
- 10.10.0.48/24
- 1701:5740:5000:3301::48/64
failover:
match:
macaddress: 00:45:57:89:27:e8
set-name: failover
dhcp4: false
dhcp6: false
accept-ra: false
addresses:
- 17.25.111.30/27
- 1701:5740:5000:3300::30/64
gateway4: 17.25.111.1
gateway6: 1701:5740:5000:3300::1
nameservers:
search:
- example.at
- intern.example.at
addresses:
- 10.10.0.1
- 1701:5740::66
我切换回了eth0之类的可预测设备,并且在启动后所有设备均已正确命名,但未配置。
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: lan: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:12:34:a8:29:e8 brd ff:ff:ff:ff:ff:ff
3: failover: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:45:57:89:27:e8 brd ff:ff:ff:ff:ff:ff
登录并启动systemctl后,重新配置systemd- networked 设备。netplan也适用。
我在systemd-networkd.service和systemd-networkd.timer上玩了很多,但没有任何帮助。
每次重新启动后手动设置网络都非常令人沮丧。有谁知道如何解决这个问题?