Ubuntu16.04 DNS配置
添加DNS设置
vim /etc/resolv.conf
#在文件中添加两行并保存
nameserver 8.8.8.8
nameserver 8.8.4.4测试DNS配置
root@localhost:~# nslookup example.com
Server:		8.8.8.8
Address:	8.8.8.8#53
Non-authoritative answer:
Name:	example.com
Address: 93.184.215.14
root@localhost:~# ping example.com
PING example.com (93.184.215.14) 56(84) bytes of data.
64 bytes from 93.184.215.14: icmp_seq=1 ttl=50 time=255 ms
64 bytes from 93.184.215.14: icmp_seq=2 ttl=50 time=254 ms可以正常ping通域名
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号