尝试为旧Linux机器配置DNS服务。网络运行良好,ip平接入互联网。但是,如果我点名为ping,ping www.google.com
命令就会挂起很长时间,并带来答案:ping: unknown host www.google.com
/etc/network/interfaces:
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface uses static address
auto eth0
iface eth0 inet static
address 192.168.1.99
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
如何修复DNS服务?
发布于 2018-09-26 13:23:27
你能换一下线路吗?
dns-nameservers 192.168.1.1
至
dns-nameservers 8.8.8.8
并在终端执行
sudo service networking restart
在此之后,ping www.google.com
还能工作吗?
https://askubuntu.com/questions/1078600
复制相似问题