📖 ~1 min read
Table of contents
Symptom & Impact
Name lookups fail randomly, causing package, API, and service connectivity outages.
Environment & Reproduction
Affected hosts use DHCP and local caching resolvers; run repeated `drill` queries to reproduce timeouts.
Root Cause Analysis
`/etc/resolv.conf` may be overwritten by DHCP hooks, or upstream DNS latency exceeds default retry windows.
Quick Triage
Inspect resolver file and active DNS daemons.
cat /etc/resolv.conf
service local_unbound status
service named status
Step-by-Step Diagnosis
Capture DNS traffic and compare successful vs failed lookups.
drill freebsd.org
tcpdump -ni em0 port 53 -c 50
grep -i resolv /var/log/messages

Solution – Primary Fix
Pin reliable resolvers and prevent accidental overwrite when appropriate.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sysrc ifconfig_em0='DHCP'
chflags schg /etc/resolv.conf
service local_unbound restart

Solution – Alternative Approaches
Use `local_unbound` with forward-zone configuration and keep DHCP-managed resolver updates disabled.
Verification & Acceptance Criteria
100 consecutive `drill` calls succeed and dependent services reconnect without retries.
Rollback Plan
Remove immutable flag from resolver file, restore DHCP defaults, and restart networking.
Prevention & Hardening
Alert on resolver timeout rate and maintain at least two upstream DNS servers.
Related Errors & Cross-Refs
`Host name lookup failure`, `temporary failure in name resolution`, `SERVFAIL` spikes.
Related tutorial: View the step-by-step tutorial for freebsd-12.
View all freebsd-12 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
`resolv.conf(5)`, `drill(1)`, FreeBSD Handbook networking chapter.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.