/etc/netplan/00-installer-config.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
nameservers:
addresses: [223.5.5.5, 114.114.114.114, 8.8.8.8]
eno2:
dhcp4: false
addresses: [192.168.1.25/24]
gateway4: 192.168.1.1
nameservers:
addresses: [114.114.114.114, 8.8.8.8]
修改完成后使用netplan apply命令应用网络配置
网友评论