📖 ~1 min read
Table of contents
Symptom & Impact
Containers can reach IP addresses but fail hostname resolution, breaking service discovery.
Environment & Reproduction
Appears on NAT networks after DNS server changes or HNS policy drift.
docker run --rm mcr.microsoft.com/powershell:lts-nanoserver-1809 nslookup bing.com
Root Cause Analysis
Container endpoint DNS settings are stale or point to unreachable resolvers.
Quick Triage
Inspect container resolv.conf equivalent and host DNS reachability.
Get-DnsClientServerAddress
Test-NetConnection -Port 53
Step-by-Step Diagnosis
Review HNS network JSON and DNS policy fields for the NAT network.
Get-ContainerNetwork | ConvertTo-Json -Depth 5
Get-WinEvent -LogName Microsoft-Windows-DNS-Client/Operational -MaxEvents 200

Solution – Primary Fix
Recreate NAT network with explicit DNS server settings.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
docker network rm nat
docker network create -d nat --subnet 172.26.0.0/16 --gateway 172.26.0.1 nat

Solution – Alternative Approaches
Use transparent networking for workloads requiring direct enterprise DNS behavior.
Verification & Acceptance Criteria
Hostname lookups succeed from test containers and application dependencies resolve.
Rollback Plan
Restore prior network definition and host DNS policy if namespace collisions occur.
Prevention & Hardening
Version-control container network definitions and validate DNS after every host change.
Related Errors & Cross-Refs
Related to NRPT policy entries, DNS suffix mismatch, and outbound firewall DNS blocks.
Related tutorial: View the step-by-step tutorial for Windows Server 2016.
View all Windows Server 2016 tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Microsoft Learn: Windows container DNS behavior and NAT networking operations.
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.