在我的局域网上,我有三个基本相同的运行Avahi的Debian Linux机器。 其中一个有IPv4地址和IPv6地址,另外两个只有IPv6地址。 他们都出现在我的Mac上的Bonjour Browser中,像这样:
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工作,
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
….似乎Bonjour for Windows根本不会识别发布的主机,除非它有一个IPv4地址。 这是一个错误在Windows的Bonjour,或者我做错了什么? FWIW,我的Windows 7机器正在运行Bonjour 2.0.2.0
dig @224.0.0.251 -p 5353 ptr _ssh._tcp.local报告您查询的任何计算机的地址?
如果你不能dig Windows,然后尝试
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