LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 967|回复: 8

ARCH在域名解析上出现问题

[复制链接]
发表于 2005-12-16 09:33:48 | 显示全部楼层 |阅读模式
首先证明如下事情:
我的网卡是没有问题的
网卡的驱动正常挂载了
ping相同网段内的主机没有问题


我在resolve。conf中添加了我的DNS地址(地址没有问题),但是始终ping不通WWW.SINA.COM.CN

我在resolve。conf中添加的格式如下:
nameserver   203.81.25.19

请问各位看到哪里有错误吗?
发表于 2005-12-16 09:47:27 | 显示全部楼层
你用什么方式上网的??
adsl  ?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-16 11:11:19 | 显示全部楼层
光纤接入,局域网共享
回复 支持 反对

使用道具 举报

发表于 2005-12-16 11:44:59 | 显示全部楼层
这种问题原因可能有很多。
楼主把ifconfig,route,ping www.sina.com.cn 的结果都贴出来吧。最后再traceroute一下你的nameserver[/url]
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-16 13:09:50 | 显示全部楼层
ifconfig信息:
[root@shengchan etc]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0E:0C:5F:99:50  
          inet addr:192.168.20.152  Bcast:192.168.20.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1792 errors:0 dropped:0 overruns:0 frame:0
          TX packets:974 errors:0 dropped:0 overruns:0 carrier:0
          collisions:9 txqueuelen:1000
          RX bytes:190445 (185.9 Kb)  TX bytes:154815 (151.1 Kb)
          Interrupt:22 Base address:0xc000

lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

route信息:
[root@shengchan etc]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.20.0    *               255.255.255.0   U     0      0        0 eth0

ping信息:
[root@shengchan etc]# ping www.sina.com.cn
ping: unknown host www.sina.com.cn

traceroute信息:
[root@shengchan etc]# traceroute 203.81.25.19
traceroute: findsaddr: Can't find interface
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-16 14:31:58 | 显示全部楼层
问题已经解决,我的方法是,从DHCP获取IP地址和DNS,就可以上网了,但是我发现自动获取后resolve.conf文件的内容好像有点不一样
nameserver 203.81.25.19
nameserver 192.168.20.3
search shengchan

请问最后的那个search 是什么意思啊?shangchan 是我的机器名字。
回复 支持 反对

使用道具 举报

发表于 2005-12-16 15:43:32 | 显示全部楼层
最刚开始的应该不是域名解析的问题吧,是你没有正确设置网关吧。
回复 支持 反对

使用道具 举报

发表于 2005-12-16 16:49:26 | 显示全部楼层
嗯嗯,版主英明!:p
search在resol.conf的man page里有讲到。我看得有点懵。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-12-16 16:56:27 | 显示全部楼层
search Search list for host-name lookup.
              The search list is normally determined from the local domain name; by default, it contains only the local domain  name.   This
              may  be  changed  by  listing  the  desired domain search path following the search keyword with spaces or tabs separating the
              names.  Resolver queries having fewer than ndots dots (default is 1) in them will be attempted using  each  component  of  the
              search  path  in  turn until a match is found.  For environments with multiple subdomains please read options ndots:n below to
              avoid man-in-the-middle attacks and unnecessary traffic for the root-dns-servers.  Note that this process may be slow and will
              generate  a  lot  of network traffic if the servers for the listed domains are not local, and that queries will time out if no
              server is available for one of the domains.

              The search list is currently limited to six domains with a total of 256 characters.


大概看的差不多,但是哪位大哥能精辟的讲解一下呢?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表