ubuntu18网卡配制

# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init’s
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
eth0:
addresses: [192.168.24.28/24]
dhcp4: false
gateway4: 192.168.24.1
nameservers:
addresses: [60.191.244.5]
version: 2

 

sudo netplan apply