systemd-resolved (short: "sDrD") is a all-in-one name resolution manager which is somewhat tied to NetworkManager. Specifics of this tie-in are horrifically complex and cause endless trouble.
It can act as a service for applications and resolve regular DNS, multi-cast DNS.
systemd-resolved is configured in the file
/etc/systemd/resolved.conf where the basic options are
A basic example would be:
The systemd-resolved manual has more details if the above isn't obvious enough for you and you want to wade through tons of nonsensical gibberish not addressing administrators interests.
Do note that there isn't much it can do in terms of multicast beyond resolving
.local hostnames. You need to disable systemd-resolved's multicast DNS feature and use
avahi-daemon for advanced uses like announcing services.
Turning sDrD off permanently
If you have setup your own DNS server using Unbound or something else and you do NOT want to use systemd-resolved then this is desired and required:
You need to make sure systemd-resolved is not set to listen on 127.0.0.1 with
DNSStubListener=no or mDNS with
MulticastDNS=no even if you have disabled it with:
systemctl disable systemd-resolved.service
It will start when certain applications make API requests to systemd when it is disabled and even when you have masked it with
systemctl mask systemd-resolved.service
systemd-resolved will also need to be disabled in NetworkManagers configuration file.
Disabling sDrD in the configuration files in this fashion is the recommended way, short of removing the binary – which works too – if you want sDrD disabled.