为什么 Windows 版 Bonjour 看不到我的仅支持 IPv6 的 Linux 主机?

为什么 Windows 版 Bonjour 看不到我的仅支持 IPv6 的 Linux 主机?

在我的 LAN 上,我有三个基本相同的 Debian Linux 机器运行 Avahi。其中一个既有 IPv4 地址,又有 IPv6 地址,另外两个只有 IPv6 地址。它们都显示在我 Mac 上的 Bonjour 浏览器中,如下所示:

Workgroup Manager (_workstation._tcp.) - 4
  box-1 [00:60:2b:02:45:f8]
    [fe80::260:2bff:fe02:45f8]:9
    192.168.1.78:9
  box-2 [00:60:2b:02:46:1b]
    [fe80::260:2bff:fe02:461b]:9
  box-3 [00:60:2b:02:42:e2]
    [fe80::260:sbff:fe02:42e2]:9

从我的 Mac 来看,一切都很好...我可以解析 box-1.local.、box-2.local. 和 box-3.local.,ping6 到其中任何一个,ssh 到其中任何一个,等等。

但是,我的 Windows 7 计算机只能看到 box-1。例如,在命令提示符窗口中执行 dns-sd 会得到以下结果:

C:\>dns-sd -B _ssh._tcp
Browsing for _ssh._tcp
Timestamp     A/R Flags if Domain                    Service Type              Instance Name
12:41:14.492  Add     2 17 local.                    _ssh._tcp.                box-1 SSH

通过 Bonjour 名称和 IPv6 对该盒子进行 ping 操作,结果正常:

C:\>ping -6 msli-dcm-2-10330688.local.

Pinging msli-dcm-2-10330688.local. [fe80::260:2bff:fe02:45f8%17] with 32 bytes of data:
Reply from fe80::260:2bff:fe02:45f8%17: time=1ms
Reply from fe80::260:2bff:fe02:45f8%17: time<1ms
Reply from fe80::260:2bff:fe02:45f8%17: time<1ms

... 通过 IPv6 地址 ping 其他盒子也同样如此:

C:\>ping -6 fe80::260:2bff:fe02:461b

Pinging fe80::260:2bff:fe02:461b with 32 bytes of data:
Reply from fe80::260:2bff:fe02:461b: time=4ms
Reply from fe80::260:2bff:fe02:461b: time<1ms
Reply from fe80::260:2bff:fe02:461b: time<1ms
Reply from fe80::260:2bff:fe02:461b: time<1ms

Ping statistics for fe80::260:2bff:fe02:461b:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 4ms, Average = 1ms

C:\>ping -6 fe80::260:2bff:fe02:42e2

Pinging fe80::260:2bff:fe02:42e2 with 32 bytes of data:
Reply from fe80::260:2bff:fe02:42e2: time<1ms
Reply from fe80::260:2bff:fe02:42e2: time<1ms
Reply from fe80::260:2bff:fe02:42e2: time<1ms
Reply from fe80::260:2bff:fe02:42e2: time<1ms

Ping statistics for fe80::260:2bff:fe02:42e2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

.... 似乎除非已发布主机具有 IPv4 地址,否则 Bonjour for Windows 根本无法识别该主机。这是 Bonjour for Windows 中的错误,还是我做错了什么?顺便说一下,我的 Windows 7 计算机正在运行 Bonjour 2.0.2.0

答案1

dig @224.0.0.251 -p 5353 ptr _ssh._tcp.local无论您从哪台机器查询,都会报告两个地址吗?

如果你无法获得digWindows 版本,请尝试

nslookup -q=ptr -port=5353 _ssh._tcp.local 224.0.0.251

nslookup -q=any -port=5353 box-2.local 224.0.0.251

nslookup -q=aaaa -port=5353 box-2.local 224.0.0.251

相关内容