The lack of answer suggested nobody was familiar enough with
avahi-autoipd, so I am giving more details.

According to the manpage, avahi-autoipd is an implementation of
https://tools.ietf.org/html/rfc3927.html. To achieve autoconfiguration
of their ip address, hosts randomly select an address "in the range
from to inclusive" (section 2.1), then
"test to see if the IPv4 Link-Local address is already in use"
(section 2.2) by "broadcasting an ARP Request for the desired address"
(section 2.2.1). The document also says that for this to work, "a
broadcast sent [...] by any host from that set of hosts can be
received by every other host" (section 1.2)

So the first question would be: any chance wireguard can broadcast ARP request?

Now for my question about resolving ".local" hosts, the concept is
called mDNS and maps to https://tools.ietf.org/html/rfc6762. The
protocol is summarized as "Clients performing DNS-like queries for
DNS-like resource records by sending DNS-like UDP query and response
messages over IP Multicast to UDP port 5353". The general idea is that
"Any DNS query for a name ending with ".local." MUST be sent to the
mDNS IPv4 link-local multicast address (or its IPv6
equivalent FF02::FB)" (section 3).

So the second question is about whether wireguard supports
broadcasting udp packets to or the ipv6 equivalent
ff02::fb (I don't know why the RFC used capital letters). Digging in
the mailing list, I found a thread from end of 2016
stating that this was currently not possible. Then, there is this
answer https://lists.zx2c4.com/pipermail/wireguard/2016-December/000813.html
which says that "It's not complicated in theory, but I wonder if this
would be genuinely useful".

I would like to say that the decentralized nature of wireguard would
make it ideal for combining it with decentralized protocols such as
avahi-autoipd or mDNS, so please support this!

WireGuard mailing list

Reply via email to