免费注册 查看新帖 |

Chinaunix

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

紧急求助:/usr/sbin/ping不同主机名 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-21 14:51 |只看该作者 |倒序浏览
# cat /etc/hosts
# @(#)B.11.11_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
# <internet address>    <official hostname> <aliases>
#
# For example:
# 192.1.2.34    hpfcrm  loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
#       The format described in this file is the correct format.
#       The original Berkeley manual page contains an error in
#       the format description.
#

192.168.10.242  sol9.vsc.com  sol9
192.168.50.49   batool
127.0.0.1       localhost       loopback

可见我的主机名为:batool,ip地址为:192.168.50.49
但是我ping主机名就是ping不通
# /usr/sbin/ping batool
/usr/sbin/ping: unknown host batool
如果我ping那个对应的ip地址倒是通了
# /usr/sbin/ping 192.168.50.49
PING 192.168.50.49: 64 byte packets
64 bytes from 192.168.50.49: icmp_seq=0. time=0. ms
64 bytes from 192.168.50.49: icmp_seq=1. time=0. ms

----192.168.50.49 PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0/0/0

哪位大虾能告诉我为什么阿?该怎样ping通主机名,因为要用xmanager

论坛徽章:
0
2 [报告]
发表于 2008-02-21 17:28 |只看该作者
nslookup

论坛徽章:
0
3 [报告]
发表于 2008-02-22 12:05 |只看该作者
修改hosts文件

论坛徽章:
0
4 [报告]
发表于 2008-02-24 22:40 |只看该作者
修改nsswitch.conf & reslov.conf可能解析顺序问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP