
我已經設定了我的
/etc/hosts
和
/etc/hostname
在我的 Debian 系統上。我還安裝並執行了 Avahi 守護程式。
我從我的 Mac 上運行
arp -a
這列出了所有 IP,但主機名稱應該在哪裡,我看到一個
?
如何讓 Avahi 廣播我的主機名稱?
答案1
您應該使用ip -r neigh
,arp
實用程式現在已過時。看網路工具。這個透過使用 glibc 的名稱服務開關來支援 mdns 名稱解析。因此你需要有
mdns_minimal [NOTFOUND=return]
在hosts:
的行中/etc/nsswitch.conf
。
如果您使用 IPv6,請不要忘記設定
use-ipv6=yes
並/etc/avahi/avahi-daemon.conf
檢查您的機器是否使用
mdns_minimal
並不是
mdns4_minimal
在/etc/nsswitch.conf
。