编辑文件 /etc/netplan/00-installer-config.yaml
,修改为以下格式:
network:
ethernets:
ens33: # 配置的网卡的名称
optional: true # 可选接口,找不到时不会报错
addresses: [192.168.253.133/24]
dhcp4: false # 关闭dhcp4
gateway4: 192.168.253.2
nameservers:
addresses: [192.168.253.2,114.114.114.114]
version: 2