免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6970 | 回复: 10
打印 上一主题 下一主题

[系统管理] 请问各位高手,RHEL 6.4 DNS该如何设置? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-11-30 09:28 |只看该作者 |倒序浏览
本帖最后由 stoneyzjw 于 2013-11-30 21:45 编辑

最近在lenovo Thinkpad t61的笔记本上安装了RHEL6.4,发现奇怪的问题。测试过程如下:
1、nslookup能够正常工作。

  1. [root@devStation work]# nslookup
  2. > [url]www.sina.com.cn[/url]
  3. Server:                218.85.152.99
  4. Address:        218.85.152.99#53

  5. Non-authoritative answer:
  6. [url]www.sina.com.cn[/url]        canonical name = jupiter.sina.com.cn.
  7. jupiter.sina.com.cn        canonical name = auriga.sina.com.cn.
  8. Name:        auriga.sina.com.cn
  9. Address: 61.172.201.195
  10. Name:        auriga.sina.com.cn
  11. Address: 61.172.201.194
复制代码
2、ping www.sina.com.cn也能正常

  1. [root@devStation work]# ping -c 5 [url]www.sina.com.cn[/url]
  2. PING auriga.sina.com.cn (61.172.201.194) 56(84) bytes of data.
  3. 64 bytes from 61.172.201.194: icmp_seq=1 ttl=246 time=23.6 ms
  4. 64 bytes from 61.172.201.194: icmp_seq=2 ttl=246 time=23.1 ms
  5. 64 bytes from 61.172.201.194: icmp_seq=3 ttl=246 time=24.2 ms
  6. 64 bytes from 61.172.201.194: icmp_seq=4 ttl=246 time=23.3 ms
  7. 64 bytes from 61.172.201.194: icmp_seq=5 ttl=246 time=24.3 ms

  8. --- auriga.sina.com.cn ping statistics ---
复制代码
3、ping DNS服务器也正常。

  1. [root@devStation work]# ping -c 5 218.85.152.99
  2. PING 218.85.152.99 (218.85.152.99) 56(84) bytes of data.
  3. 64 bytes from 218.85.152.99: icmp_seq=1 ttl=250 time=4.82 ms
  4. 64 bytes from 218.85.152.99: icmp_seq=2 ttl=250 time=5.31 ms
  5. 64 bytes from 218.85.152.99: icmp_seq=3 ttl=250 time=5.31 ms
  6. 64 bytes from 218.85.152.99: icmp_seq=4 ttl=250 time=5.40 ms
  7. 64 bytes from 218.85.152.99: icmp_seq=5 ttl=250 time=5.30 ms

  8. --- 218.85.152.99 ping statistics ---
复制代码
4、无法通过域名访问外网访问外网。

  1. [root@devStation work]# telnet [url]www.sina.com.cn[/url] 80
  2. telnet: [url]www.sina.com.cn:[/url] Name or service not known
  3. [url]www.sina.com.cn:[/url] No address associated with name
复制代码
5、但通过IP地址可以正常。

  1. [root@devStation work]# telnet 61.172.201.195 80
  2. Trying 61.172.201.195...
  3. Connected to 61.172.201.195.
  4. Escape character is '^]'.

  5. Connection closed by foreign host.
复制代码
6、在gnome桌面firefox无法正常浏览网页,通过IP地址可以正常。

请各位大侠帮我诊断一下是为什么? 我在vmware上安装的rhel6.4也是出现同样的问题。

在线等待中......

论坛徽章:
39
辰龙
日期:2013-08-21 15:45:192015亚冠之广州富力
日期:2015-05-12 16:34:52亥猪
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17双鱼座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亚冠之卡尔希纳萨夫
日期:2015-05-24 15:24:35黄金圣斗士
日期:2015-12-02 17:25:0815-16赛季CBA联赛之吉林
日期:2017-06-24 16:43:52
2 [报告]
发表于 2013-11-30 12:47 |只看该作者
把/etc/resolv.conf 文件的内容贴一下,dns 是在这里设置的:内容类似于:
nameserver 202.96.134.133

论坛徽章:
0
3 [报告]
发表于 2013-11-30 16:43 |只看该作者
关阴月飞 发表于 2013-11-30 12:47
把/etc/resolv.conf 文件的内容贴一下,dns 是在这里设置的:内容类似于:
nameserver 202.96.134.133


我的/etc/resolv.conf设置如下:

  1. [root@rhel6 ~]# more /etc/resolv.conf
  2. # Generated by NetworkManager
  3. nameserver 218.85.152.99
  4. [root@rhel6 ~]#
复制代码
218.85.152.99是我这儿电信提供的DNS服务器.

论坛徽章:
3
狮子座
日期:2013-11-08 20:54:51酉鸡
日期:2013-11-28 13:44:39IT运维版块每日发帖之星
日期:2015-12-18 06:20:00
4 [报告]
发表于 2013-11-30 17:40 |只看该作者
重启下network服务试试看

论坛徽章:
0
5 [报告]
发表于 2013-11-30 19:43 |只看该作者
eva2021hd 发表于 2013-11-30 17:40
重启下network服务试试看


试过了,还是不行.

论坛徽章:
381
CU十二周年纪念徽章
日期:2014-01-04 22:46:58CU大牛徽章
日期:2013-03-13 15:32:35CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55CU大牛徽章
日期:2013-04-17 11:17:19CU大牛徽章
日期:2013-04-17 11:17:32CU大牛徽章
日期:2013-04-17 11:17:37CU大牛徽章
日期:2013-04-17 11:17:42CU大牛徽章
日期:2013-04-17 11:17:47CU大牛徽章
日期:2013-04-17 11:17:52CU大牛徽章
日期:2013-04-17 11:17:56
6 [报告]
发表于 2013-11-30 20:38 |只看该作者
这个也太诡异了,ping域名能解析,网页访问不了。
楼主检查下firefox是不是设置代理了?

论坛徽章:
48
15-16赛季CBA联赛之青岛
日期:2021-01-07 13:41:2315-16赛季CBA联赛之上海
日期:2020-12-01 18:02:0720周年集字徽章-20	
日期:2020-10-28 14:14:2620周年集字徽章-20	
日期:2020-10-28 14:04:3015-16赛季CBA联赛之天津
日期:2020-10-18 22:51:412016猴年福章徽章
日期:2016-02-18 15:30:3415-16赛季CBA联赛之北控
日期:2015-12-22 13:30:48操作系统版块每日发帖之星
日期:2015-12-07 06:20:00操作系统版块每日发帖之星
日期:2015-09-04 06:20:002015亚冠之德黑兰石油
日期:2015-08-05 18:46:082015年亚洲杯之巴勒斯坦
日期:2015-04-19 10:42:502015年亚洲杯之巴林
日期:2015-04-09 08:03:23
7 [报告]
发表于 2013-11-30 21:03 |只看该作者
本帖最后由 lbseraph 于 2013-11-30 21:06 编辑

从报错看应该是无法正常解析域名了(telnet都不可以,和浏览器关系不大吧?),多试几个IP解析看看~不行让换一个DNS的IP看看~

论坛徽章:
0
8 [报告]
发表于 2013-11-30 21:37 |只看该作者
chenyx 发表于 2013-11-30 20:38
这个也太诡异了,ping域名能解析,网页访问不了。
楼主检查下firefox是不是设置代理了?

firefox 没有设置代理.

论坛徽章:
0
9 [报告]
发表于 2013-11-30 21:39 |只看该作者
本帖最后由 stoneyzjw 于 2013-11-30 21:42 编辑
lbseraph 发表于 2013-11-30 21:03
从报错看应该是无法正常解析域名了(telnet都不可以,和浏览器关系不大吧?),多试几个IP解析看看~不行让换 ...

DNS应该没问题,我的windows机器都可以正常访问。
我试了其它的地址也一样。

  1. [root@rhel6 ~]# telnet www.chinaunix.net 80
  2. telnet: www.chinaunix.net: No address associated with hostname
  3. www.chinaunix.net: No address associated with name
  4. [root@rhel6 ~]# ping www.chinaunix.net 80
  5. PING 80 (0.0.0.80) 56(124) bytes of data.
  6. ^C
  7. --- 80 ping statistics ---
  8. 3 packets transmitted, 0 received, 100% packet loss, time 2871ms

  9. [root@rhel6 ~]# ping www.chinaunix.net -c 5
  10. PING www.chinaunix.net (219.148.35.60) 56(84) bytes of data.
  11. 64 bytes from 219.148.35.60: icmp_seq=1 ttl=247 time=50.2 ms
  12. 64 bytes from 219.148.35.60: icmp_seq=2 ttl=247 time=51.0 ms
  13. 64 bytes from 219.148.35.60: icmp_seq=3 ttl=247 time=49.8 ms
  14. 64 bytes from 219.148.35.60: icmp_seq=4 ttl=247 time=49.7 ms
  15. 64 bytes from 219.148.35.60: icmp_seq=5 ttl=247 time=50.3 ms

  16. --- www.chinaunix.net ping statistics ---
  17. 5 packets transmitted, 5 received, 0% packet loss, time 4058ms
  18. rtt min/avg/max/mdev = 49.760/50.250/51.067/0.538 ms
  19. [root@rhel6 ~]# telnet www.chinaunix.net 80
  20. telnet: www.chinaunix.net: No address associated with hostname
  21. www.chinaunix.net: No address associated with name
  22. [root@rhel6 ~]# telnet 219.148.35.60 80
  23. Trying 219.148.35.60...
  24. Connected to 219.148.35.60.
  25. Escape character is '^]'.
复制代码

论坛徽章:
0
10 [报告]
发表于 2014-02-11 09:31 |只看该作者
问题解决了,但不知为什么?还望高手指点。
方法:dns服务器改为:google DNS server 8.8.8.8 8.8.4.4
为什么本地电信的DNS服务器就不行呢?windows下都正常啊。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP