免费注册 查看新帖 |

Chinaunix

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

可以ping通IP但是无法解析hostname [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-02 09:59 |只看该作者 |倒序浏览
最近安装了Solaris 10 x86,发现网络方面的问题.通过nslookup可以找到主机和对应的IP,但是直接ping主机名就解析不了,ping IP是OK的,哪位大虾帮助小弟一下,跪谢!\r\n\r\n\r\n\r\n\r\nLast login: Wed Jul  1 14:37:29 2009 from 10.182.114.187\r\nSun Microsystems Inc.   SunOS 5.10      Generic January 2005\r\n\r\nbash-3.00# ping db10g\r\nping: unknown host db10g\r\n\r\nbash-3.00# ping 10.182.112.73\r\n10.182.112.73 is alive\r\n\r\n-----------------------------------------------------以下是配置----------------------------------------------------\r\n\r\nbash-3.00# cat /etc/resolv.conf \r\nsearch cn.xxxxx.com\r\nnameserver 10.182.122.37\r\nnameserver 10.182.244.34\r\nnameserver 146.56.237.50\r\nbash-3.00# nslookup db10g\r\nServer:         10.182.122.37\r\nAddress:        10.182.122.37#53\r\n\r\nName:   db10g.cn.xxxxx.com\r\nAddress: 10.182.112.73\r\n\r\nbash-3.00# cat /etc/defaultdomain \r\ncn.xxxxx.com\r\n\r\nbash-3.00# cat /etc/hosts\r\n#\r\n# Internet host table\r\n#\r\n127.0.0.1       localhost       \r\n10.182.112.64   aquarius        loghost\r\n10.182.112.64   aquarius.cn.xxxxx.com

论坛徽章:
0
2 [报告]
发表于 2009-07-02 10:32 |只看该作者
bash-3.00# cat /etc/nsswitch.conf \r\n#\r\n# /etc/nsswitch.files:\r\n#\r\n# An example file that could be copied over to /etc/nsswitch.conf; it\r\n# does not use any naming service.\r\n#\r\n# \"hosts:\" and \"services:\" in this file are used only if the\r\n# /etc/netconfig file has a \"-\" for nametoaddr_libs of \"inet\" transports.\r\n\r\npasswd:     files\r\ngroup:      files\r\nhosts:      files \r\nipnodes:    files\r\nnetworks:   files\r\nprotocols:  files\r\nrpc:        files\r\nethers:     files\r\nnetmasks:   files\r\nbootparams: files\r\npublickey:  files\r\n# At present there isn\'t a \'files\' backend for netgroup;  the system will \r\n#   figure it out pretty quickly, and won\'t use netgroups at all.\r\nnetgroup:   files\r\nautomount:  files\r\naliases:    files\r\nservices:   files\r\nprinters:       user files\r\n\r\nauth_attr:  files\r\nprof_attr:  files\r\nproject:    files\r\nbash-3.00#

论坛徽章:
2
丑牛
日期:2014-06-11 13:55:04ChinaUnix元老
日期:2015-02-06 15:16:14
3 [报告]
发表于 2009-07-02 10:34 |只看该作者

回复 #3 zg2000 的帖子

这行改一下\r\nhosts: files\r\n改成\r\nhosts: files dns

论坛徽章:
0
4 [报告]
发表于 2009-07-02 10:54 |只看该作者
thks,work.谢谢各位兄弟姐妹!!!

论坛徽章:
0
5 [报告]
发表于 2009-07-02 11:13 |只看该作者
直接在/etc/hosts上加一条不就OK了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP