自从我昨天用最新的 Ubuntu 更新了我的计算机后,计算机之间的通信就出现了问题。最初,没有任何设备(无论是我的移动设备 [Android]、主驱动器笔记本电脑 [Kubuntu LTS] 还是存储笔记本电脑 [Kubuntu LTS])能够 ping 通我的媒体中心 [Xubuntu LTS]。一个小时后,我能够修复媒体中心,并且可以通过我的移动设备 [Android] 或存储笔记本电脑 [Kubuntu LTS] ping 通媒体中心并向其发送数据。
但是,我的主要驱动笔记本电脑 [Kubuntu LTS] 仍然无法通过 mdns6 使用主机名找到 IPv6 地址(无论是我的媒体中心 [Xubuntu LTS] 还是存储笔记本电脑 [Kubuntu LTS])。我可以 ping IPv4 地址,这可以正常工作,我可以 ping 多个 IPv6 地址,这可以正常工作,但我无法使用 nsswitch.conf 中优先考虑 mdns6 的主机名获取 IPv6 地址。
尝试从我的主驱动器笔记本电脑 ping 我的媒体中心时收到的消息:
dave@dave-laptop:~$ ping media-centre.local
ping: media-centre.local: Name or service not known
我的主机文件:
127.0.0.1 localhost
127.0.1.1 dave-laptop
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
我的 host.conf 文件:
# The "order" line is only used by old versions of the C library.
order hosts,bind
multi on
我的 nsswitch.conf 文件:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files systemd
group: files systemd
shadow: files
gshadow: files
hosts: files mdns6_minimal dns6 mdns_minimal dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
我的 avahi-daemon.conf:
# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
# See avahi-daemon.conf(5) for more information on this configuration
# file!
[server]
#host-name=foo
#domain-name=local
#browse-domains=0pointer.de, zeroconf.org
use-ipv4=yes
use-ipv6=yes
#allow-interfaces=eth0
#deny-interfaces=eth1
#check-response-ttl=no
#use-iff-running=no
#enable-dbus=yes
#disallow-other-stacks=no
#allow-point-to-point=no
#cache-entries-max=4096
#clients-max=4096
#objects-per-client-max=1024
#entries-per-entry-group-max=32
ratelimit-interval-usec=1000000
ratelimit-burst=1000
[wide-area]
enable-wide-area=yes
[publish]
#disable-publishing=no
#disable-user-service-publishing=no
#add-service-cookie=no
#publish-addresses=yes
publish-hinfo=no
publish-workstation=no
#publish-domain=yes
#publish-dns-servers=192.168.50.1, 192.168.50.2
#publish-resolv-conf-dns-servers=yes
#publish-aaaa-on-ipv4=yes
#publish-a-on-ipv6=no
[reflector]
#enable-reflector=no
#reflect-ipv=no
#reflect-filters=_airplay._tcp.local,_raop._tcp.local
[rlimits]
#rlimit-as=
#rlimit-core=0
#rlimit-data=8388608
#rlimit-fsize=0
#rlimit-nofile=768
#rlimit-stack=8388608
#rlimit-nproc=3
我还测试过先将 nsswitch.conf 首选项切换为 WINS。这可行,但当然是 IPv4。我希望一切都在 IPv6 和动态地址上运行。你能帮我吗?
谢谢。
答案1
看来我误解了该故障是 IPv6 上的 mDNS 的问题。相反,在 Ubuntu 更新(仅本地链接)后,我甚至没有为我的笔记本电脑分配正确的 IPv6 地址。因为这似乎是故障的根本原因,所以我在这里的网站上提出了一个新问题:Ubuntu 更新后仅支持 IPv6 链接本地地址。