openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
419 stars 232 forks source link

mdns through thread networks / border routing #2578

Open dakhnod opened 2 hours ago

dakhnod commented 2 hours ago

I have the following setup:

A <--thread--> B <--Ethernet--> C

All of the nodes have avahi running, with ipv4 enabled for B and C. B(avahi) is configured as a reflector. It is supposed to bridge avahi between A and C. A and B have point-to-point interfaces enabled.

My issue is that A can simply not resolve C.local. Is there any quirks for mdns through thread? Maybe multicast ff00::fb doesn't work in thread?

Thanks you so much!

jwhui commented 2 hours ago

Thread supports DNS-based Service Discovery using the Service Registration Protocol and unicast DNS. Thread Border Routers implement both a DNS Discovery Proxy and Advertising Proxy to support discovery across the Thread and Ethernet/Wi-Fi segments.

The Thread Border Router Codelab may be useful to provide more information.

dakhnod commented 2 hours ago

Thanks, this is great! Yet, does thread anyhow stand in the way of mdns? For our setup, it would be great to avoid having an a centralized dns server...

jwhui commented 1 hour ago

With SRP, the Thread Border Router serves as a DNS an SRP server. Thread devices publish their DNS service names to the SRP server and the Thread Border Router publishes them using mDNS on the Ethernet side. This allows Ethernet/Wi-Fi hosts to use mDNS to discover services published by Thread devices.

dakhnod commented 1 hour ago

Okay, this sounds useful. But what about the other side? Are thread devices able to discover mdns devices from the ethernet network?

jwhui commented 1 hour ago

Yes, Thread devices use unicast DNS to the Thread Border Router, which then uses mDNS via a Discovery Proxy to discover services on the Ethernet/Wi-Fi side.

dakhnod commented 1 hour ago

Ah, so the following apply?

  1. I don't need to have avahi running on my thread devices
  2. I don't need to configure avahi as reflector, since the BR does the mDNS bridging?

Do I still have to request .local addresses?