DNS出错,软件都可以上网,在终端wget显示错误的IP,但是可以请求成功。

$:host www.baidu.com
www.baidu.com has address 0.0.0.90
www.baidu.com has IPv6 address ::0.0.0.91
$:dig +trace www.baidu.com
;; Question section mismatch: got ./RESERVED0/CLASS512
;; Question section mismatch: got ./RESERVED0/CLASS512

; <<>> DiG 9.8.3-P1 <<>> +trace www.baidu.com
;; global options: +cmd
;; connection timed out; no servers could be reached
$:wget www.baidu.com
--2017-07-01 15:34:44--  http://www.baidu.com/
Resolving www.baidu.com... 0.0.0.146, ::0.0.0.147
Connecting to www.baidu.com|0.0.0.146|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2381 (2.3K) [text/html]
Saving to: ‘index.html.1’

index.html.1        100%[===================>]   2.33K  --.-KB/s    in 0s

2017-07-01 15:34:44 (66.8 MB/s) - ‘index.html.1’ saved [2381/2381]
阅读 3.6k
1 个回答

终于解决了。原来macproxy的缘故,dns默认是采用remote的形式,改成local问题解决。差点要重装系统了,笑哭~

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题