Ubuntu设置静态ip

2023-08-07  本文已影响0人  Hemsl

/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命令应用网络配置

上一篇下一篇

猜你喜欢

热点阅读