我配置了一个 avahi 服务,可以使用 avahi-browse 查看该服务。但是我想指定该服务通告中使用哪个 ipv6 地址。
我希望它使用“2001:db8:1234:1:594b:8731:6f7e:6f5a”,但是我没有看到在中指定地址的方法avahi.服务或者让服务在所有 ipv6 地址上通告该服务。
ip-6a
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2001:db8:1234:1::be48:c89c/128 scope global dynamic noprefixroute
valid_lft 33855sec preferred_lft 33855sec
inet6 2001:db8:1234:1:594b:8731:6f7e:6f5a/64 scope global dynamic noprefixroute
valid_lft 43190sec preferred_lft 43190sec
inet6 fe80::609b:458e:7bbb:a183/64 scope link noprefixroute
valid_lft forever preferred_lft forever
avahi 浏览
= wlan0 IPv6 fhfs
_broker._tcp local
hostname = [fhfs.local]
address = [2001:db8:1234:1::be48:c89c]
port = [8883]
txt = []
猫 /etc/avahi/services/broker.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service protocol="ipv6">
<type>_broker._tcp</type>
<port>8883</port>
</service>
</service-group>