A Linux workstation running a recent distribution uses systemd-resolved for name resolution. You confirm that /etc/resolv.conf is a symbolic link to /run/systemd/resolve/stub-resolv.conf, which is the recommended stub mode. When an application such as curl performs a conventional DNS query, to which local IP address is the request sent before it is forwarded to an upstream DNS server?
The IP address of the system's default gateway on port 53
The first DNS server configured on the interface with the lowest metric
127.0.0.1 on port 5353 (the local mDNS multicast port)
127.0.0.53 on port 53 (the local stub resolver provided by systemd-resolved)
In stub mode, /etc/resolv.conf points to /run/systemd/resolve/stub-resolv.conf, a file generated by systemd-resolved that lists a single DNS server: 127.0.0.53. systemd-resolved listens on that loopback address (port 53) and acts as a local caching resolver, forwarding the request to the configured upstream servers. Therefore applications contact 127.0.0.53. The other options are incorrect: 127.0.0.1:5353 is used for multicast DNS, selecting the first interface's DNS server bypasses the stub, and the default gateway's IP is unrelated to the local stub listener.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is systemd-resolved, and how does it work in Linux?
Open an interactive chat with Bash
Why does /etc/resolv.conf point to /run/systemd/resolve/stub-resolv.conf in stub mode?
Open an interactive chat with Bash
How does systemd-resolved handle upstream DNS servers?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access