vim /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
dhcp6: no
addresses: [ip/24]
gateway4: 网关
nameservers:
addresses: [202.96.209.5, 202.96.209.133]
ethernets:
eno2:
dhcp4: no
dhcp6: no
addresses: [ip/16]
netplan apply