我的配置是如此,但是当我尝试sudo netplan try
或sudo netplan generate
它时会出现错误。
# This is the network config written by 'subiquity'
network:
ethernets:
eno1:
addresses: [10.18.100.12/24]
gateway4: 10.18.100.1
nameservers:
addresses: [10.18.27.10, 10.17.27.10]
eno2:
dhcp4: true
eno3:
dhcp4: true
eno4:
dhcp4: true
version: 2
它一直卡在名称服务器上:看来,我没有使用制表符,只使用空格,不确定为什么它不起作用。
谢谢
答案1
用这个:
network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses: [10.18.100.12/24]
gateway4: 10.18.100.1
nameservers:
addresses: [10.18.27.10, 10.17.27.10]
eno2:
dhcp4: true
eno3:
dhcp4: true
eno4:
dhcp4: true
sudo netplan generate
sudo netplan apply
reboot