vi /etc/netplan/00-installer-config.yaml
network:
ethernets:
ens33:
addresses: [192.168.66.106/24]
gateway4: 192.168.66.254
nameservers:
addresses: [8.8.8.8, 114.114.114.114]
dhcp4: false
version: 2
netplan apply
报错的意思是说,gateway4
已被弃用,请改用默认路由。默认路由就是通过 routes
配置IP。
# This is the network config written by 'subiquity'
network:
ethernets:
ens33:
addresses: [192.168.66.106/24]
optional: true
routes:
- to: default
via: 192.168.66.254
nameservers:
addresses: [8.8.8.8, 114.114.114.114]
dhcp4: false
version: 2
netplan apply
ok
标签:LTS,10,use,addresses,8.8,netplan,192.168,114.114,network From: https://blog.51cto.com/u_15217675/6101590