Symptoms
- Applications fail with
Name or service not known,Temporary failure in name resolution,UnknownHostExceptionorORA-12545. - Connections by IP address still work, so this is name resolution, not routing.
*.oraclevcn.comnames, private DNS zones, Object Storage and Autonomous Database endpoints all fail together.- It hits instances as their DHCP lease renews or when they reboot, so the outage spreads over minutes to hours instead of all at once.
1. Confirm scope and impact (2 minutes)
From an affected instance (serial console or Bastion if your SSH goes through names):
cat /etc/resolv.conf
dig +short objectstorage.us-ashburn-1.oraclecloud.com
dig +short @169.254.169.254 objectstorage.us-ashburn-1.oraclecloud.com
If the query to the default resolver fails but the query directly to 169.254.169.254 works, the VCN resolver is fine and the instance is pointed somewhere else. Check resolv.conf: a wrong nameserver or a missing search line is the giveaway.
On Windows:
Get-DnsClientServerAddress -AddressFamily IPv4
Resolve-DnsName objectstorage.us-ashburn-1.oraclecloud.com
Resolve-DnsName objectstorage.us-ashburn-1.oraclecloud.com -Server 169.254.169.254
Now find the DHCP options set the subnet uses and what it contains:
export SUBNET=ocid1.subnet.oc1..xxxx
DHCP=$(oci network subnet get --subnet-id $SUBNET --query 'data."dhcp-options-id"' --raw-output)
oci network dhcp-options get --dhcp-id $DHCP --query 'data.{name:"display-name", options:options}'
The healthy default looks like this:
[
{ "type": "DomainNameServer", "serverType": "VcnLocalPlusInternet" },
{ "type": "SearchDomain", "searchDomainNames": ["<vcn-dns-label>.oraclevcn.com"] }
]
List every subnet using the same options set, since they are all affected:
oci network subnet list --compartment-id $COMP --vcn-id $VCN --all \
--query 'data[?"dhcp-options-id"==`'"$DHCP"'`].{name:"display-name", cidr:"cidr-block"}' --output table
2. Common causes
| What you find | Cause | Fix |
|---|---|---|
serverType: CustomDnsServer with an on-prem DNS IP | Someone pointed the subnet at on-prem DNS; path or firewall to it is down, or it cannot resolve OCI names | Go back to VcnLocalPlusInternet and use resolver forwarding rules for on-prem zones |
| Custom DNS IP of an instance that was terminated | DNS server VM replaced, IP changed | Point back to the VCN resolver |
SearchDomain missing or wrong | Short host names no longer resolve | Restore the subnet's search domain |
| Subnet now uses a different DHCP options set | UpdateSubnet swapped the options set | Point the subnet back at the previous set |
resolv.conf hand-edited on images | Configuration management overwrote it | Fix the template, not the subnet |
Check what changed and who changed it:
oci logging-search search-logs \
--search-query 'search "'"$COMP"'/_Audit" | where data.eventName = '"'UpdateDhcpOptions'"' or data.eventName = '"'UpdateSubnet'"' | sort by datetime desc' \
--time-start $(date -u -d '-24 hours' +%Y-%m-%dT%H:%M:%SZ) \
--time-end $(date -u +%Y-%m-%dT%H:%M:%SZ) \
--query 'data.results[].data.{time:datetime, event:data.eventName, who:data.identity.principalName, resource:data.resourceName}'
3. The fix: restore the VCN resolver
Warning
oci network dhcp-options update --optionsreplaces the whole list. Include every option you want to keep, including the search domain. Save the current JSON first so you can put it back.
oci network dhcp-options get --dhcp-id $DHCP --query 'data.options' > /tmp/dhcp-before.json
oci network dhcp-options update --dhcp-id $DHCP --force --options '[
{"type":"DomainNameServer","serverType":"VcnLocalPlusInternet"},
{"type":"SearchDomain","searchDomainNames":["prodvcn.oraclevcn.com"]}
]'
If on-prem names must resolve too, keep VcnLocalPlusInternet and add forwarding rules on the VCN's private DNS resolver to send those zones to on-prem DNS through a forwarding endpoint, rather than pointing instances at on-prem DNS directly.
If the subnet was switched to another options set, switch it back instead:
oci network subnet update --subnet-id $SUBNET --dhcp-options-id ocid1.dhcpoptions.oc1..previous
4. Get instances to pick up the fix
Instances read DHCP options when they renew their lease or reboot. You do not have to wait.
Caution
Releasing the DHCP lease (
dhclient -r,ipconfig /release) on the primary VNIC drops the network, including your SSH or RDP session, and can leave the instance unreachable. Use the safe methods below, and do fleets through Run Command or your config tool, not interactive sessions.
Oracle Linux 8/9 (NetworkManager), re-applying the connection without a release:
nmcli -t -f NAME,DEVICE connection show --active
sudo nmcli device reapply ens3 # device name varies; check the output above
cat /etc/resolv.conf
If reapply does not refresh DNS on your build, a reboot from the console during the incident is safe and predictable. As a temporary stopgap on critical hosts, put nameserver 169.254.169.254 in /etc/resolv.conf by hand; NetworkManager overwrites it at the next renewal, which is fine once the DHCP options are fixed.
Windows Server, from Run Command or the serial console:
ipconfig /renew
Clear-DnsClientCache
Resolve-DnsName objectstorage.us-ashburn-1.oraclecloud.com
ipconfig /renew without a prior release keeps the address; check it on one host first.
For OKE worker nodes, restart CoreDNS after the nodes have the right resolver, because CoreDNS forwards to the node's resolv.conf:
kubectl -n kube-system rollout restart deployment/coredns
5. Verify recovery
dig +short <host>.<subnet-label>.<vcn-label>.oraclevcn.com
dig +short objectstorage.us-ashburn-1.oraclecloud.com
getent hosts <short-hostname>
- Every subnet using the options set resolves internal, private zone and public names.
- Application error rates for name resolution return to zero.
- Run the same check from one instance in each affected subnet, not only the first host you fixed.
Communicate
Tell users: "From
Prevent it next time
- Manage DHCP options and subnets in Terraform, so a change shows up as a plan diff that someone reviews.
- Leave instances on
VcnLocalPlusInternetand handle hybrid DNS with resolver endpoints and forwarding rules, not custom DNS servers in DHCP options. - Create an Events rule on
UpdateDhcpOptionsandUpdateSubnetin production compartments that notifies the network team. - Add a synthetic check that resolves an internal name and an Object Storage endpoint from each production subnet.
- Restrict
manage virtual-network-familyin production to the network team and pipeline.
Get the weekly HubDatAI email
One email a week with everything new: posts, learning sessions and videos. Free, no spam, unsubscribe in one click. What you get