|
发表于 2020-7-2 16:11:41
只看该作者
地板
[ 本帖最后由 neutionwei 于 2020-7-2 16:13 编辑 ]\n\n1、/etc/netplan目录下$cat 01-network-manager-all.yaml
- #Let NetworkManager manage all devices on this system
- network:
- version: 2
- # renderer: NetworkManager
- ethernets:
- eth0:
- addresses: [168.168.100.111/16]
- gateway4: 168.168.0.1
- dhcp4: no
- dhcp6: no
- nameservers:
- addresses: [127.0.0.53, 114.114.114.114, 114.114.115.115, 8.8.8.8, 8.8.4.4]
复制代码
2、/etc/systemd目录下$cat resolved.conf
- # This file is part of systemd.
- #
- # systemd is free software; you can redistribute it and/or modify it
- # under the terms of the GNU Lesser General Public License as published by
- # the Free Software Foundation; either version 2.1 of the License, or
- # (at your option) any later version.
- #
- # Entries in this file show the compile time defaults.
- # You can change settings by editing this file.
- # Defaults can be restored by simply deleting this file.
- #
- # See resolved.conf(5) for details
- [Resolve]
- DNS=127.0.0.53 114.114.114.114 114.114.115.115 8.8.8.8 8.8.4.4
- #FallbackDNS=
- #Domains=
- #LLMNR=no
- #MulticastDNS=no
- #DNSSEC=no
- #Cache=yes
- #DNSStubListener=yes
复制代码
|
|