📖 ~1 min read
Table of contents
Symptom & Impact
Applications randomly fail name lookups, causing partial outages and difficult incident triage.
Environment & Reproduction
Often triggered by flaky upstream resolvers or packet drops to DNS servers.
cat /etc/resolv.conf
host example.com
dig +tries=1 +time=2 example.com
Root Cause Analysis
Unstable upstream responses, timeout settings, or firewall policies disrupt DNS query completion.
Quick Triage
Confirm if failures are network-wide or specific to one resolver.
drill example.com @8.8.8.8
drill example.com @1.1.1.1
netstat -s -p udp
Step-by-Step Diagnosis
Capture query traffic and compare response timing distributions.
tcpdump -ni em0 port 53
dig +trace example.com
route -n get 8.8.8.8

Solution – Primary Fix
Use reliable resolver set and tune timeout/retry behavior for workload profile.
Still having issues? Our Network Design team can diagnose and resolve this for you. Get in touch for a free consultation.
cp -a /etc/resolv.conf /etc/resolv.conf.bak
printf 'nameserver 1.1.1.1
nameserver 8.8.8.8
options timeout:2 attempts:2
' > /etc/resolv.conf

Solution – Alternative Approaches
Deploy local caching resolver with health-checked upstream rotation.
Verification & Acceptance Criteria
Lookup latency and failure rate return to expected SLO.
for i in 1 2 3 4 5; do host example.com; done
service local_unbound status || true
Rollback Plan
Restore prior resolver config if new DNS path introduces policy conflicts.
cp /etc/resolv.conf.bak /etc/resolv.conf
Prevention & Hardening
Monitor DNS error budgets and keep at least two independent recursive resolvers configured.
Related Errors & Cross-Refs
Related to package fetch timeouts, TLS handshake failures, and intermittent API endpoint errors.
Related tutorial: View the step-by-step tutorial for freebsd-14.
View all freebsd-14 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
resolv.conf(5), drill(1), and FreeBSD resolver best practices.
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.