当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 5 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 域名解析的问题
帖子发表于 : 2016-04-07 15:30 

注册: 2008-04-12 12:44
帖子: 980
送出感谢: 1
接收感谢: 2
我的/etc/hosts设置如下

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 hwy.local/wp
127.0.0.1 hwy.local/test

本机ip是192.168.1.101。
ping hwy.local/wp
PING hwy.local/wp (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.035 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.035 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.034 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.037 ms
^C
--- hwy.local/wp ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.029/0.034/0.037/0.002 ms
root@hwy:/home/debian8# ping hwy.local/test
PING hwy.local/test (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.114 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.040 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.038 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.041 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.036 ms
^C
--- hwy.local/test ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5000ms
rtt min/avg/max/mdev = 0.031/0.050/0.114/0.028 ms
root@hwy:/home/debian8# ping hwy.local
PING hwy.local (192.168.1.101) 56(84) bytes of data.
64 bytes from 192.168.1.101: icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from 192.168.1.101: icmp_seq=2 ttl=64 time=0.028 ms
64 bytes from 192.168.1.101: icmp_seq=3 ttl=64 time=0.032 ms

为何 ping hwy.local 不会解析成 127.0.0.1 ?


页首
 用户资料  
 
2 楼 
 文章标题 : Re: 域名解析的问题
帖子发表于 : 2016-04-07 16:06 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10149
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 130
127.0.0.1 hwy.local 才会将 hwy.local 解析为 127.0.0.1

后面的域名必需完整和规范,你上面的配置带路径,是错的。


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 域名解析的问题
帖子发表于 : 2016-04-07 17:27 

注册: 2008-04-12 12:44
帖子: 980
送出感谢: 1
接收感谢: 2
为何 ping hwy.local 被解析成 192.168.1.101?


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 域名解析的问题
帖子发表于 : 2016-04-07 18:00 
论坛管理员

注册: 2005-03-27 0:06
帖子: 10149
系统: Ubuntu 12.04
送出感谢: 7
接收感谢: 130
需要去查你的上一级dns服务器。


页首
 用户资料  
 
5 楼 
 文章标题 : Re: 域名解析的问题
帖子发表于 : 2016-04-08 8:47 

注册: 2008-04-12 12:44
帖子: 980
送出感谢: 1
接收感谢: 2
谢谢,上层绑定。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 5 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 0 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译