注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 利用手机和电池实现反地心..
 帮助

内部DNS故障以及解决


2007-12-13 13:30:47
 标签:Windows   [推送到技术圈]

今天遇到了一个很奇怪的DNS问题同一个域名竟然返回不同的IP(这个域名只对应一个IP),具体的描述如下:
A电脑:
IP:192.168.0.12
子网掩码:255.255.255.0
网关:192.168.0.1
DNS:192.168.1.2
B电脑:
IP:192.168.0.105
子网掩码:255.255.255.0
网关:192.168.0.1
DNS:192.168.1.2
C电脑:
IP:192.168.1.22
子网掩码:255.255.255.0
网关:192.168.1.1
DNS:192.168.1.2
DNS服务器:
IP:192.168.1.2
子网掩码:255.255.255.0
网关:192.168.1.1
DNS:192.168.1.2
 
状况:这几台电脑都可以上网,公司的网站域名为 www.iyouhe.com IP为:202.88.5.45,公司内部一个WEBSever的域名为www.iyouhe.com  IP为:192.168.1.200,测试结果如下:
A:ping www.iyouhe.com  返回IP为:192.168.1.200
B:ping www.iyouhe.com  返回IP为:202.88.5.45
C:ping www.iyouhe.com  返回IP为:202.88.5.45
DNS服务器:ping www.iyouhe.com  返回IP为:202.88.5.45
 
感觉很是奇怪,其他的机器没有问题,为什A电脑有问题?后来有测试了另一台0网段的机器,也是这样返回内部的WEBSERVER的IP,感觉像是DNS的解析出了问题,,上网找了一些文章也没有找到问题所在,无意中看到一个修改HOSTS文件的内容,,突发奇想.
赶紧查看A电脑的hosts文件,目录位置:c:windows/system32/drivers/etc/hosts
如下:
# copyright (c) 1993-1999 microsoft corp.
#
# this is a sample hosts file used by microsoft tcp/ip for windows.
#
# this file contains the mappings of ip addresses to host names. each
# entry should be kept on an individual line. the ip address should
# be placed in the first column followed by the corresponding host name.
# the ip address and the host name should be separated by at least one
# space.
#
# additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# for example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
127.0.0.1       localhost
原来如此,添加一段上去
202.88.5.45 www.iyouhe.com
重新测试OK!
所以在内网设置DNS的时候一定要注意哦,相同的域名和不同的IP之间可能出问题了,呵呵!
 




    文章评论
 
2007-12-13 14:53:38
呵呵 原来问题处在host文件呀

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: