LPIC-1 Essential System Services and Networking Practice Question
A server uses systemd-resolved for DNS. Users report that name resolution works for external domains but fails for internal company hostnames. The administrator checks /etc/resolv.conf and sees 'nameserver 127.0.0.53'. Which action will resolve the issue?
⚠ Common exam trap
The trap here is editing /etc/resolv.conf manually on a system where it is a symlink managed by systemd-resolved, which will be overwritten.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Edit /etc/systemd/resolved.conf and add the internal DNS server to the DNS= line, then restart systemd-resolved.
systemd-resolved uses a stub listener at 127.0.0.53, and upstream DNS servers are configured in /etc/systemd/resolved.conf. To resolve internal domains, the internal DNS server must be added to the DNS= setting, followed by a restart of systemd-resolved. Editing /etc/resolv.conf directly, adjusting search domains, or modifying nsswitch.conf does not provide the correct upstream server and will not fix internal name resolution.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set the internal DNS server in /etc/nsswitch.conf by adding 'dns' after 'files' in the hosts line.
Why it's wrong here
The hosts line in nsswitch.conf already includes dns by default, and ordering files before dns is normal. Modifying nsswitch.conf does not tell systemd-resolved which upstream server to use. The problem is not the name service switch order but the lack of an internal DNS server in the resolver configuration.
- ✗
Add 'search company.internal' to /etc/resolv.conf and run systemd-resolve --flush-caches.
Why it's wrong here
Adding a search domain helps with unqualified names but does not provide the IP address of the internal DNS server that knows those domains. Since the stub resolver still forwards to the same upstream servers, queries for internal names will continue to fail. Flushing caches is irrelevant without proper upstream configuration.
- ✗
Replace 127.0.0.53 with the internal DNS server IP in /etc/resolv.conf and restart the network service.
Why it's wrong here
On a system using systemd-resolved, /etc/resolv.conf is often a symlink to /run/systemd/resolve/stub-resolv.conf, which is managed automatically. Editing it directly will be overwritten on reboot or service restart. Moreover, bypassing the stub listener may break DNSSEC or caching features. The correct place to configure upstream DNS is resolved.conf.
- ✓
Edit /etc/systemd/resolved.conf and add the internal DNS server to the DNS= line, then restart systemd-resolved.
Why this is correct
With systemd-resolved, /etc/resolv.conf points to the stub listener at 127.0.0.53. Actual upstream DNS servers are configured in /etc/systemd/resolved.conf under the DNS= directive. Adding the internal DNS server there and restarting the service will make systemd-resolved forward internal queries to the correct server, fixing resolution for internal hostnames.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 402 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official LPI exam blueprint
This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.