在安裝FreeBSD的過程當中,網絡設置部分我將其設置爲DHCP,在此期間,下載了en_us_freebsd_hanbook.txzen_us_freebsd_hanbook.txz,zh_cn_freebsd_hanbook.txz,zh_tw_freebsd_hanbook.txz,something like or so....網絡
可是安裝完成後,執行commend:dhclient ifconfig ,發現一切正常.dom
ping 127.0.0.1 一切OK,可是ping 不經過本地局域網,更不用說是外網.server
ping www.baidu.com dns
ping: cannot resolve www.baidu.com:Host name lookup failureio
此時:cli
編輯/etc/resolv.conf 下載
將#nameserver 192.168.80.2 本行的註釋去掉註釋
修改後爲ping
----------------------------------------co
#Generated by resolvconf
search localdomain
nameserver 192.168.80.2
nameserver 127.0.0.1
options edns0
----------------------------------------
成功解決問題.