linux配置dns


問題:在執行ping www.baidu.com時無法ping通

分析:可能是DNS配置文件/etc/resolv.conf的問題

1、添加DNS配置信息:

nameserver 202.96.134.33

2、然后執行systemctl restart network 

3、然后在ping www.baidu.com 

PING www.wshifen.com (103.235.46.39) 56(84) bytes of data.
64 bytes from 103.235.46.39 (103.235.46.39): icmp_seq=1 ttl=46 time=209 ms
64 bytes from 103.235.46.39 (103.235.46.39): icmp_seq=2 ttl=46 time=210 ms

說明已經可以上網了!!!!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM