首页 > 代码库 > FreeBSD network connect

FreeBSD network connect

  在安装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 ,发现一切正常.

  ping 127.0.0.1 一切OK,但是ping 不通过本地局域网,更不用说是外网.

  ping www.baidu.com 

  ping: cannot resolve www.baidu.com:Host name lookup failure

此时:

  编辑/etc/resolv.conf 

  将#nameserver 192.168.80.2 本行的注释去掉

  修改后为

----------------------------------------

#Generated by resolvconf

search localdomain

nameserver 192.168.80.2

nameserver 127.0.0.1

options edns0

----------------------------------------

 

成功解决问题.

FreeBSD network connect