caicre
caicre
2016-08-13 09:23

使用wpa_cli连接wifi,如何设置DNS服务器

su然后wpa_cli,

add_n
0
CTRL-EVENT-SCAN-STARTED
CTRL-EVENT-SCAN-RESULTS
set_n 0 ssid "home"
OK
set_n 0 psk "sw123456"
OK
enable_n 0
OK
select_n 0
OK
CTRL-EVENT-SCAN-STARTED
CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
CTRL-EVENT-SCAN-RESULTS
WPS-AP-AVAILABLE
Trying to associate with 1e:75:90:9d:a7:cc (SSID='home' freq=2437 MHz)
Associated with 1e:75:90:9d:a7:cc
WPA: Key negotiation completed with 1e:75:90:9d:a7:cc [PTK=CCMP GTK=CCMP]
CTRL-EVENT-CONNECTED - Connection to 1e:75:90:9d:a7:cc completed [id=0 id_str=]

在这之后在终端里 ping 192.168.1.1 和 180.97.33.108(百度)都可以都通了,但是ping www.baidu.com 或者在浏览器里用网址打开网页都做不到。请问该怎么处理?

我怀疑是没有设置 DNS 服务器,但是不知道该怎么设置。用 dhclient interface 提示
RTNETLINK answers: File exists

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换