蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 系统管理


    

蓝森林 http://www.lslnet.com 2006年8月18日 15:18


 Fedora Core 3不能Ping自己的hostname

经过Google,查找过本论坛精华贴,没有找男人(似乎对本案例没有用)。由于本人能力所限,没有解决,请有空的大虾帮帮忙。

背景:

局域网上有若干windows XP机器,一台Linksys的Router,型号是:BEFW11S4,Firmware Version 是 1.45。

Linksys router 通过 ADSL Modem连接Internet,并对本局域网提供DHCP服务。在每台XP的DOS命令行窗口,可以互相ping,也可以ping自己的机器名,也可以ping yahoo.com。在Linksys router里的DHCP Client Table里可以看到每个机器的Client Hostnames, IP addresses, MAC addresses等。

问题:

安装了一台Fedora Core 3 机器到本局域网,名字叫tools。选择通过DHCP 获得IP地址。机器启动后。通过ifconfig命令看到获得的ip地址。能ping yahoo.com等,但不能ping 其Windows XP机器的名字,从xp的机器也不能ping tools,但可以直接ping 它的IP 地址。

我忘了我还尝试过做了些什么,但我可以把我目前能看到的都尽量多地写出来。

我在tools上配置并启动了Samba,然后从XP的机器就能ping tools了,也就是说windows XP的机器通过Samba,认识了Fedora Cora 3的名字,但从tools里还是不能ping 到Windows XP的机器名。同时,ping tools的时候,出现错误:Unknown host tools. Ping localhost的时候也一样,unknown host localhost.


由于以前多使用windows所以习惯了图形界面。下面的配置会影响tools是否出现在Linksys router里的DHCP Client Table里。

System Settings ->; Network
然后看到一个network configuration 的窗口

在Devices里双击“Device Eth0”
得到一个叫 Ethernet Device 的窗口

在这个窗口的中间有:

Automatically obtain IP address Setting with DHCP (其中DHCP 可选)
Hostname(optional): tools

如果在这个窗口不填那个tools在Linksys router里的DHCP Client Table里就看不到tools,只能看到它的ip地址。

但是,无论是否能在router里看到tools.在tools机器上,都不能ping自己或者localhost.


请问如何解决,谢谢!

 Fedora Core 3不能Ping自己的hostname

DHCP server不等于DNS,不是说能够提供IP就能提供域名解析的功能的。你可以试试用/etc/hosts或者看看samba是不是有这扬的功能

 Fedora Core 3不能Ping自己的hostname

-->

# add "127.0.0.1 localhost" to /etc/hosts
#service smb restart
#smbclient -L localhost -N
#smbtree -U "Vaid User Name in windows domain"

 Fedora Core 3不能Ping自己的hostname

修改hosts文件,加上tools项(localhost就不要加了,徒惹麻烦,因为0.0.0.0才是本机地址,127.0.0.1是回环地址,如果加上有可能导致某些DNS服务混淆)。
然后加上WindowsXP的相关项,你就可以ping通了。

 Fedora Core 3不能Ping自己的hostname

-->

兄弟, 不要害了楼主.

/etc/hosts 里的 127.0.0.1  localhost.localdomain localhost 这一行一定不能删

自己再写一行 x.x.x.x tools 吧

 Fedora Core 3不能Ping自己的hostname

谢谢各位!

兄弟这里现在是晚上,只好明天到公司试试。

 Fedora Core 3不能Ping自己的hostname

-->


x.x.x.x是由DHCP分配的,如果写上就固定了。

 Fedora Core 3不能Ping自己的hostname

-->

这两行已经工作。我可以ping localhost了。

-->

smbclient -L localhost -N后,我看到:


[code]Anonymous login successful
Domain=[FEDORA] OS=[Unix] Server=[Samba 3.0.8pre1-0.pre1.3]

        Sharename       Type      Comment
        ---------       ----      -------
        home            Disk
        IPC$            IPC       IPC Service (Samba Server)
        ADMIN$          IPC       IPC Service (Samba Server)
Anonymous login successful
Domain=[FEDORA] OS=[Unix] Server=[Samba 3.0.8pre1-0.pre1.3]

        Server               Comment
        ---------            -------
        TOOLS                Samba Server

        Workgroup            Master
        ---------            -------
        FEDORA
[/code]


smbtree -U "administrator“后,我看到:



[code]
"Windows Workgroup Name"
        \\R-XP-DT2                      R-XP-DT2
                \\R-XP-DT2\C$                   Default share
                \\R-XP-DT2\ADMIN$               Remote Admin
                \\R-XP-DT2\D$                   Default share
                \\R-XP-DT2\IPC$                 Remote IPC
        \\PHYLLIS
                \\PHYLLIS\IPC$                  Remote Inter Process Communication
                \\PHYLLIS\C
                \\LONGXP
cli_full_connection: failed to connect to LONGXP<20>; (0.0.0.0)
        \\JOSEPH-KFYZV14V
                \\JOSEPH-KFYZV14V\C$                    Default share
                \\JOSEPH-KFYZV14V\ADMIN$                Remote Admin
                \\JOSEPH-KFYZV14V\IPC$                  Remote IPC
        \\JASON
                \\JASON\C$              Default share
                \\JASON\ADMIN$          Remote Admin
                \\JASON\SharedDocs
                \\JASON\IPC$            Remote IPC
        \\FAX-PRN
        \\ANNIE
                \\ANNIE\IPC$            Remote Inter Process Communication
                \\ANNIE\HP
                \\ANNIE\PRINTER$
                \\ANNIE\COPY
FEDORA
        \\TOOLS                         Samba Server
                \\TOOLS\ADMIN$          IPC Service (Samba Server)
                \\TOOLS\IPC$            IPC Service (Samba Server)
                \\TOOLS\home
[/code]


但还不能ping tools,也不能ping "windows workgroup" 里的机器名,例如:ANNIE

 Fedora Core 3不能Ping自己的hostname

dhcp可以分配hostname下来的,不知道你那路由器支持不

 Fedora Core 3不能Ping自己的hostname

 Fedora Core 3不能Ping自己的hostname

难道必须得装DNS服务么?

 Fedora Core 3不能Ping自己的hostname

-->
分配是一回事,解析又是另外一回事
DHCP分配hostname可以解决以下问题:
-->

 Fedora Core 3不能Ping自己的hostname

 Fedora Core 3不能Ping自己的hostname

-->

请问如何解决?

 Fedora Core 3不能Ping自己的hostname

up once

 Fedora Core 3不能Ping自己的hostname

windows的dhcp会带着机器名注册的,Linux下似乎需要一个autodns-dhcp。

 Fedora Core 3不能Ping自己的hostname



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com