• It would be nice if Davdroid supported multicast DNS for address resolution.

    I am running Radicale (CalDAV & CardDAV server) on my Linux laptop and sync my mobile with it. IP addresses are assigned as usual by DHCP. Problem is that I want to sync in various networks (at home, at work, …), and the IP address the laptop gets from the DHCP server varies.

    I am currently have to configure the IP address of the laptop in dotted notation (192.168.x.y) for each LAN I want to sync in. Not very convenient:

    • The DHCP server occasionally changes the address assigned to the laptop.
    • Davdroid sees multiple accounts and hence multiple calenders.

    On the laptop runs a Avahi, an mDNS server, advertising an xxx.local hostname. Couldn’t Davdoid support these addresses in addition to normal DNS lookup?

    It doesn’t have to be a complete zeroconfig as in Managed Davdroid.

  • developer

    So the networks don’t support dynamic DNS updates (like RFC 2136)? Because if they do, it should be possible to resolve the laptop host name by normal DNS…


  • @rfc2822 The problem with dynamic DNS (if I understand your suggestion correctly) is that the client must connect with a globally routeable IP address.

    In my use case, I want to use a firewall rule to limit the DAV server to be reachable only by local addresses, which rules out using dynamic DNS. This would be very simple if DAVx⁵ resolved mDNS hostnames.

  • developer

    @bauermann No, I don’t mean dynamic DNS (maybe I have quoted the wrong RFC). Home routers usually resolve the host names of attached devices locally, that’s what I mean. For instance, if you have a machine “laptop” and it registers at the router over DHCP in order to get an IP address, the router usually then resolves “laptop[.localdomain as configured]” to the dynamic IP address of the machine. Why do you need mDNS for that?

    DAVx5 uses the operating system DNS, like any other app.



  • Right, multicast DNS is mDNS. If DAVx5 supported that, it would enable my use case. In Apple operating systems and most Linux systems, using the standard DNS resolver would be enough to resolve mDNS but for some unfortunate reason (probably business related), Google decided that if an Android app wants to resolve mDNS hostnames, then it needs to use a separate API.

    Unfortunately the modem/router provided by my ISP doesn’t have that functionality of registering the client hostname via DHCP. Besides, even if it did I use a separate DNS server (1.1.1.1) for privacy reasons so it wouldn’t work for me.

    So mDNS is the only option I can think of (apart from setting up my own local DNS server just for this, which would be more complex and overkill IMHO).

    Obviously it’s your call whether to add this functionality to DAVx5 or not, and I don’t mean to insist on it. I just decided to chime in here to point out that it would be useful, and I can’t think of an alternative solution that doesn’t have its own set of downsides.

  • developer

    @bauermann said in Support mDNS for address resolution:

    Unfortunately the modem/router provided by my ISP doesn’t have that functionality of registering the client hostname via DHCP. Besides, even if it did I use a separate DNS server (1.1.1.1) for privacy reasons so it wouldn’t work for me.

    Normally, you can set this DNS in your router and then it forwards non-local requests, while answering local-domain requests itself. Often you can also replace the modem/router from your provider by an own one (I usually do) and then do your own settings. Of course this may be too much for your use case.


  • @bauermann I can imagine that Android uses a separate API for mDNS because the latter publishes both IP addresses and services. See https://tools.ietf.org/html/rfc6763.


  • @rfc2822 said in Support mDNS for address resolution:

    @bauermann said in Support mDNS for address resolution:

    Unfortunately the modem/router provided by my ISP doesn’t have that functionality of registering the client hostname via DHCP. Besides, even if it did I use a separate DNS server (1.1.1.1) for privacy reasons so it wouldn’t work for me.

    Normally, you can set this DNS in your router and then it forwards non-local requests, while answering local-domain requests itself. Often you can also replace the modem/router from your provider by an own one (I usually do) and then do your own settings. Of course this may be too much for your use case.

    Indeed. I’ll investigate both of those options. Initially I was aiming for a solution which didn’t rely on any device apart from the DAV server and the client. My use case is having my cell phone sync directly with my laptop, and I wanted it to work on any network, not only the one at home. I ended up having to configure the router to give a fixed IP address to my laptop, and “hard code” that in the cell phone, so I might as well use one of the solutions you suggested.

    Thank you very much for your help with this topic, and especially for DAVx5. It’s amazingly useful!


  • By the way, sorry about confusing RFC 2136 with dynamic DNS. I hadn’t checked the RFC, I just read the word “dynamic” and my mind went straight to DDNS. I should have searched for DNS updates and RFC 2136 before replying.

Similar topics

  • 3
  • 23
  • 7