页次: 1
我在 /etc/hosts 修改了 google,youtube 的 ip, 终端下即时生效
ping google.com
PING google.com (202.39.143.81) 56(84) bytes of data.
64 bytes from google.com (202.39.143.81): icmp_seq=1 ttl=52 time=89.2 ms
64 bytes from google.com (202.39.143.81): icmp_seq=2 ttl=52 time=87.6 ms
64 bytes from google.com (202.39.143.81): icmp_seq=3 ttl=52 time=89.2 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3004ms
rtt min/avg/max/mdev = 87.612/88.707/89.298/0.848 ms
浏览器还是访问 hk 的地址,并没有用 /etc/hosts 的设置,
但是 /etc/hosts 修改百度的地址,浏览器却使用了
请问什么原因,怎么设置
最近编辑记录 小空 (2014-06-16 14:00:30)
离线
Google 主站有跳转机制...
离线
离线
我用chromium测试的结果, chrome://net-internals/#dns,清空了缓存,但是访问 google.com, 还是会被转到 hk。
ping的ip和hosts一致
ping google.com
PING google.com (202.39.143.81) 56(84) bytes of data.
64 bytes from google.com (202.39.143.81): icmp_seq=1 ttl=52 time=69.8 ms
64 bytes from google.com (202.39.143.81): icmp_seq=2 ttl=52 time=72.2 ms
64 bytes from google.com (202.39.143.81): icmp_seq=3 ttl=52 time=69.3 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3004ms
rtt min/avg/max/mdev = 69.300/70.474/72.251/1.296 ms
ma ~ $ ping -c 3 www.google.com
PING www.google.com (202.39.143.81) 56(84) bytes of data.
64 bytes from google.com (202.39.143.81): icmp_seq=1 ttl=52 time=73.7 ms
64 bytes from google.com (202.39.143.81): icmp_seq=2 ttl=52 time=71.5 ms
64 bytes from google.com (202.39.143.81): icmp_seq=3 ttl=52 time=70.7 ms
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 70.793/72.005/73.711/1.241 ms
hosts里设置ip和我直接在地址栏输入ip有什么区别?202.39.143.81在地址栏输入是可以正常访问的
最近编辑记录 小空 (2014-06-16 13:53:18)
离线
如果google设置跳转的话hosts岂不作废了,hosts里设置ip和我直接在地址栏输入ip有什么区别?202.39.143.81在地址栏输入是可以正常访问的
ncr = no country redirect.
离线
多谢楼上3位回复,虽然没完全清楚。
离线
需要刷新浏览器缓存的dns信息啊
离线
下载地址:https://github.com/wangchunming/2017hosts
离线
页次: 1