以下是配置ubuntu网络的一个参考
文件路径:/etc/netplan/***.yaml
先去 /etc/netplan/ 查看***的具体文件名字。
network: version: 2 renderer: networkd ethernets: ens18: addresses: - 192.168.1.88/24 - "2a01:4f8:221:3839::88/64" routes: - to: "0.0.0.0/0" via: 192.168.1.1 - to: "::/0" via: "2a01:4f8:221:3839::3" nameservers: addresses: [8.8.8.8] accept-ra: no dhcp4: no dhcp6: no
重启网络:
systemctl start netplan-ovs-cleanup.service
查看IP
IP a