我在家有一个4端口wifi路由器。网络上的所有内容都通过该网络连接。
我的网络上有5台计算机。其中之一是新鲜的Debian 8(Jessie)。
在Debian以外的所有设备上,我都可以按主机名ping其他设备。在Debian上,我做不到。我可以通过IP进行ping操作,但是当我通过主机名尝试时会显示“未知主机”。
[email protected]:~$ ping comp1
ping: unknown host comp1
[email protected]:~$ ping 192.168.1.100
PING 192.168.1.100 (192.168.1.100) 56(84) byes of data.
64 bytes from 192.168.1.100: icmp_seq=1 ttl=64 time=1.24 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=64 time=1.04 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=64 time=0.965 ms
...
我不知道如何解决它。有任何想法吗?
这是我的/ etc / hostname,/ etc / hosts和/etc/resolv.conf
[email protected]:~$ cat /etc/hostname
debian
[email protected]:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 debian
127.0.0.1 debian
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
[email protected]:~$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
nameserver 127.0.0.1
nameserver 127.0.1.1
是其他主机Windows服务器。如果是这样,他们可能正在使用WINS来解析名称。安装主机winbind
并将其添加wins
到/etc/nsswitch.conf
主机的文件行中即可解决此问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句