Skip to content

Cloud DNS and Name Resolution

Cloud workloads should not depend on people remembering IP addresses. DNS provides the naming layer that allows users, applications, and services to locate resources reliably.

Welcome to Lab 06 of the CompTIA Cloud+ practical lab sequence.

In the previous labs, you built:

  • a cloud virtual network
  • public, application, and database subnets
  • route tables
  • public and private connectivity
  • network security controls

You can now answer:

Can traffic reach the destination?

Now you will add the naming layer and answer:

Can the workload find the destination by name?

You will move from:

10.10.20.15

to:

app.cloudplus.lab

and understand how that hostname is resolved to the correct IP address.

Item Details
Lab 06 β€” Cloud DNS and Name Resolution
Difficulty Beginner β†’ Intermediate
Estimated Time 60–90 Minutes
Certification Alignment CompTIA Cloud+
Primary Focus DNS & Service Name Resolution
Previous Lab 05 β€” Cloud Security Groups and Network Access Controls
Career Alignment Cloud Administrator, Cloud Engineer, Cloud Support Engineer, Cloud Security Engineer
Major Skills DNS Records, Public DNS, Private DNS, Resolution, Troubleshooting
Deliverable Cloud DNS Design + Name Resolution Validation Report

Your cloud environment now contains:

Internet
↓
Web Tier
↓
Application Tier
↓
Database Tier

The application team has been using IP addresses during initial testing.

For example:

Web Server:
10.10.10.10
Application Server:
10.10.20.10
Database:
10.10.30.10

This approach becomes difficult to maintain because:

  • addresses may change

  • workloads may be replaced

  • applications should not hard-code infrastructure IPs

  • troubleshooting becomes harder

Your manager asks you to implement DNS-based naming.

The desired model is:

web.cloudplus.lab
↓
10.10.10.x
app.cloudplus.lab
↓
10.10.20.x
db.cloudplus.lab
↓
10.10.30.x

The web application should locate the application server by name, and the application server should locate the database by name.

By completing this lab, you should be able to:

  • explain DNS

  • understand hostname-to-IP resolution

  • distinguish public and private DNS

  • understand DNS zones

  • explain common DNS record types

  • create DNS records

  • understand cloud DNS resolvers

  • configure internal service names

  • validate name resolution

  • distinguish DNS failures from routing failures

  • identify incorrect DNS records

  • understand TTL concepts

  • troubleshoot cloud DNS systematically

  • document cloud DNS architecture

  • explain DNS during cloud technical interviews

A beginner may configure an application using:

Database Server:
10.10.30.25

That works until:

Database Rebuilt
↓
New IP
↓
Application Breaks

A stronger model uses:

db.cloudplus.lab
↓
DNS
↓
Current Database IP

Then applications depend on:

a stable service name

rather than:

a potentially changing infrastructure address.

DNS stands for:

Domain Name System

Its basic purpose is to translate names into network information.

A simplified process is:

User / Application
↓
Hostname
↓
DNS Query
↓
DNS Resolver
↓
DNS Record
↓
IP Address

A user enters:

portal.example.com

DNS may return:

203.0.113.20

The network connection then uses the IP address.

DNS performs:

name resolution.

Routing performs:

packet forwarding.

Security controls determine:

whether communication is permitted.

Use this model:

Hostname
↓
DNS
↓
IP Address
↓
Routing
↓
Security
↓
Service

A DNS record can resolve correctly while the application remains unreachable.

Likewise, the network can work perfectly while DNS is broken.

Your environment should resemble:

10.10.0.0/16
|
β”œβ”€β”€ Public
β”‚ 10.10.10.0/24
|
β”œβ”€β”€ Application
β”‚ 10.10.20.0/24
|
└── Database
10.10.30.0/24

Identify the private IP addresses currently assigned to your test workloads.

Web VM:
Private IP:
Application VM:
Private IP:
Database VM:
Private IP:

A DNS zone represents an administrative namespace.

For this lab, use a private training namespace such as:

cloudplus.lab

The zone can contain records such as:

web.cloudplus.lab
app.cloudplus.lab
db.cloudplus.lab

Conceptually:

cloudplus.lab
|
β”œβ”€β”€ web.cloudplus.lab
β”œβ”€β”€ app.cloudplus.lab
└── db.cloudplus.lab

Public DNS provides records accessible from public DNS infrastructure.

Example:

www.example.com
↓
Public DNS
↓
Public IP

Public DNS is appropriate for services intended to be publicly discoverable.

Private DNS provides naming inside controlled environments.

Example:

db.cloudplus.lab
↓
Private DNS
↓
10.10.30.10

This name should not necessarily need to exist on the public internet.

Private DNS helps keep internal service names and addresses within the environment where they are required.

Use:

Public DNS Private DNS
Internet-facing names Internal service names
Publicly resolvable Private-network resolvable
Often maps to public services Often maps to private IPs
Used by external users Used by internal workloads

A DNS resolver receives DNS queries from clients and attempts to find the answer.

Conceptually:

Application
↓
DNS Resolver
↓
DNS Namespace
↓
Record

Cloud providers often provide built-in DNS-resolution services for workloads.

On a Linux VM, inspect the current resolver configuration.

Depending on the system, use:

Terminal window
cat /etc/resolv.conf

or appropriate system-resolution tooling.

Record:

DNS Resolver:
Search Domain:
Notes:

Modern Linux distributions may use local resolver components, so the address visible in /etc/resolv.conf may not always be the upstream DNS server directly.

Focus on understanding:

which resolution path the system uses.

From a lab VM, test a known hostname.

For example:

Terminal window
nslookup example.com

or:

Terminal window
dig example.com

if available.

Observe:

  • query name

  • returned IP

  • responding resolver

An A record maps a hostname to an IPv4 address.

Example:

app.cloudplus.lab
↓
A
↓
10.10.20.10

An AAAA record maps a hostname to an IPv6 address.

Conceptually:

app.example
↓
AAAA
↓
IPv6 Address

A CNAME creates an alias to another hostname.

Example:

portal.cloudplus.lab
↓
CNAME
↓
web.cloudplus.lab

CNAME can help when:

multiple user-friendly names should reference another canonical hostname.

MX records identify mail servers for a domain.

They are not the focus of this lab, but you should understand their purpose for Cloud+.

TXT records can store text-based information.

They are commonly used for:

  • domain verification

  • security-related configuration

  • email-related validation

PTR records support reverse lookup.

Instead of:

Name β†’ IP

reverse DNS can support:

IP β†’ Name

TTL means:

Time To Live

It determines how long DNS information may be cached.

Conceptually:

DNS Record
↓
TTL
↓
Cache Duration

A long TTL may:

  • reduce DNS queries

  • make changes take longer to propagate through caches

A short TTL may:

  • support faster change

  • increase DNS-query frequency

Using your provider’s supported private DNS service, create a lab zone.

Example:

Zone:
cloudplus.lab

Associate it with:

cloudplus-lab-net-01

or your equivalent virtual network where required.

Private DNS association determines:

which networks can resolve the private namespace.

Use your lab standards.

Example:

Tag Value
Environment Lab
Course CompTIA-CloudPlus
Purpose DNS
Owner Student

Create:

Name:
web.cloudplus.lab
Type:
A
Value:
<Web Private IP>

Internal workload-to-workload communication should generally use the private network where appropriate.

Create:

Name:
app.cloudplus.lab
Type:
A
Value:
<Application Private IP>

Create:

Name:
db.cloudplus.lab
Type:
A
Value:
<Database Private IP>
Hostname Record Address Purpose
web.cloudplus.lab A 10.10.10.x Web Tier
app.cloudplus.lab A 10.10.20.x App Tier
db.cloudplus.lab A 10.10.30.x DB Tier

From an appropriate VM, run:

Terminal window
nslookup web.cloudplus.lab

or:

Terminal window
dig web.cloudplus.lab

Expected:

web.cloudplus.lab
↓
Web Private IP

Run:

Terminal window
nslookup app.cloudplus.lab

Expected:

application server private IP.

Run:

Terminal window
nslookup db.cloudplus.lab

Expected:

database private IP.

From the web workload, test:

app.cloudplus.lab

This validates the intended service-discovery path:

Web
↓
DNS
↓
Application IP

From the application workload, test:

db.cloudplus.lab

The intended path is:

Application
↓
DNS
↓
Database IP

Suppose:

db.cloudplus.lab

resolves correctly to:

10.10.30.10

but the application cannot connect.

DNS is probably not the root cause.

Check:

DNS
βœ“
↓
Routing
↓
Security Group
↓
Host Firewall
↓
Database Service

For a workload service, perform both:

Connection by IP

and:

Connection by Hostname

Use the results to narrow the problem.

IP Hostname Likely Area
Works Works Connectivity Healthy
Works Fails DNS
Fails Fails Routing/Security/Service
Fails Resolves DNS Works; Connectivity Issue

Applications should ideally use names such as:

db.cloudplus.lab

rather than hard-coded IPs.

This allows infrastructure to change underneath the application.

Today:

db.cloudplus.lab
↓
10.10.30.10

Tomorrow:

db.cloudplus.lab
↓
10.10.30.25

The application configuration can remain the same if DNS is updated correctly.

In your lab, modify one test record to another approved test address or secondary workload.

Observe that:

Hostname

remains unchanged while:

Resolved IP

changes.

Immediately query the record again.

Depending on:

  • TTL

  • resolver

  • local cache

you may temporarily see the previous result.

After DNS changes, ask:

Could I be seeing cached information?

Return the hostname to its intended workload IP.

Validate again.

Public DNS changes may take time to appear consistently because of caching.

Private cloud DNS environments may behave differently depending on implementation.

Do not assume:

DNS update means every client instantly sees the change.

Where supported, create or document an alias such as:

portal.cloudplus.lab
↓
web.cloudplus.lab

This demonstrates:

one service can have more than one logical name.

Resolve:

portal.cloudplus.lab

Confirm it ultimately maps to the expected web workload.

Confirm the DNS zone is associated with the correct:

  • virtual network

  • project

  • private environment

The zone and records may be correct, but if the private network is not associated:

workloads may not be able to resolve them.

Where safe and practical, attempt to resolve:

db.cloudplus.lab

from outside the associated private environment.

Expected:

private DNS should not necessarily resolve publicly.

Internal DNS should generally not expose unnecessary internal names to external users.

Some architectures use different answers depending on where a query originates.

Conceptually:

Internal User
↓
app.example.com
↓
Private IP

while:

External User
↓
app.example.com
↓
Public IP

This is sometimes called:

  • split DNS

  • split-horizon DNS

Later, when you introduce load balancing, DNS may point to:

Application Name
↓
Load Balancer
↓
Multiple Workloads

rather than directly to one VM.

Your current model:

web.cloudplus.lab
↓
Single VM

may later become:

web.cloudplus.lab
↓
Load Balancer
↓
VM 1
VM 2

Common DNS symptoms include:

  • hostname not found

  • wrong IP returned

  • intermittent resolution

  • stale IP

  • public name works but private name fails

  • one VM resolves while another does not

43 β€” Troubleshooting Scenario β€” IP Works, Hostname Fails

Section titled β€œ43 β€” Troubleshooting Scenario β€” IP Works, Hostname Fails”

This is the classic DNS scenario.

Use:

Application Works by IP
↓
Hostname Fails
↓
Check DNS

Do not immediately modify:

  • route tables

  • security groups

without evidence.

Confirm there is no typing error.

Example:

Expected:

app.cloudplus.lab

Entered:

apps.cloudplus.lab

Use:

Terminal window
nslookup app.cloudplus.lab

or:

Terminal window
dig app.cloudplus.lab

Check whether:

  • response exists

  • address is correct

Verify the client is using the expected DNS resolver.

Ask:

Is this workload actually sending its queries to the cloud/private DNS service?

Verify:

Private DNS Zone
↓
Correct Cloud Network

Review:

  • hostname

  • record type

  • IP value

  • TTL

49 β€” Troubleshooting Scenario β€” Wrong Address Returned

Section titled β€œ49 β€” Troubleshooting Scenario β€” Wrong Address Returned”

Suppose:

app.cloudplus.lab

returns:

10.10.30.10

instead of the application address.

This is primarily:

a DNS-record configuration problem.

Update it to the intended application IP.

Re-query the name.

If the old answer remains temporarily:

consider caching.

51 β€” Troubleshooting Scenario β€” One VM Resolves, Another Does Not

Section titled β€œ51 β€” Troubleshooting Scenario β€” One VM Resolves, Another Does Not”

Compare:

VM A Resolver
vs
VM B Resolver

Also check:

  • subnet

  • virtual network

  • DNS configuration

  • zone association

52 β€” Troubleshooting Scenario β€” Resolution Works, Connection Fails

Section titled β€œ52 β€” Troubleshooting Scenario β€” Resolution Works, Connection Fails”

Suppose:

app.cloudplus.lab
↓
10.10.20.10

resolves successfully.

But TCP connectivity fails.

Move down the stack:

DNS
βœ“
↓
Routing
↓
Cloud Security
↓
Host Firewall
↓
Service

53 β€” Troubleshooting Scenario β€” Public DNS Works, Private DNS Fails

Section titled β€œ53 β€” Troubleshooting Scenario β€” Public DNS Works, Private DNS Fails”

Investigate:

  • private DNS zone

  • network association

  • resolver settings

  • private record

54 β€” Troubleshooting Scenario β€” DNS Recently Changed

Section titled β€œ54 β€” Troubleshooting Scenario β€” DNS Recently Changed”

Consider:

Cached Record

before repeatedly changing the DNS configuration.

In your isolated lab, temporarily change:

app.cloudplus.lab

to an incorrect test IP.

Attempt to use the application name.

Observe the failure.

Use:

Hostname
↓
DNS Query
↓
Returned IP
↓
Expected IP Comparison

Identify:

incorrect DNS record.

Return:

app.cloudplus.lab

to the correct application IP.

Re-test until the correct result is returned.

Use:

Problem:
Affected Hostname:
Expected IP:
Resolved IP:
Root Cause:
Corrective Action:
Validation:
Lesson Learned:

Use:

Hostname Correct?
↓
DNS Query Sent?
↓
Resolver Correct?
↓
Record Exists?
↓
Record Value Correct?
↓
Zone Association Correct?
↓
Cache?
↓
Resolved IP Reachable?

DNS is part of the security architecture.

Consider:

  • who can modify DNS records

  • whether administrative changes are logged

  • which zones are public

  • which zones are private

An unauthorized DNS change could redirect:

Users
↓
Trusted Hostname
↓
Wrong Destination

DNS modification should therefore be protected by:

  • IAM

  • logging

  • change control

Do not publish internal records publicly without requirement.

Avoid exposing unnecessary information such as:

internal-db.example.com

if it provides no business benefit.

Where your provider supports DNS query or administrative logging, identify what telemetry is available.

Possible events include:

  • DNS query activity

  • record creation

  • record modification

  • record deletion

DNS logs can help answer:

Which domain did this workload attempt to contact?

Security teams often use DNS activity to investigate:

  • unusual domains

  • newly contacted destinations

  • suspicious external communication

This becomes more important later in:

  • CySA+

  • incident-response labs

  • cloud incident investigation

Private DNS Zone
cloudplus.lab
|
+--------------+--------------+
| | |
v v v
web.cloudplus.lab app.cloudplus.lab db.cloudplus.lab
| | |
v v v
10.10.10.x 10.10.20.x 10.10.30.x
| | |
v v v
Web Tier App Tier DB Tier
User / Client
↓
web.cloudplus.lab
↓
Web Tier
↓
app.cloudplus.lab
↓
Application Tier
↓
db.cloudplus.lab
↓
Database Tier
Name Type Value Scope Purpose
web.cloudplus.lab A 10.10.10.x Private Web
app.cloudplus.lab A 10.10.20.x Private Application
db.cloudplus.lab A 10.10.30.x Private Database
portal.cloudplus.lab Alias/CNAME web.cloudplus.lab Private Friendly Name

Add:

Resource Type Purpose Status
cloudplus.lab Private DNS Zone Internal Naming Active
web.cloudplus.lab DNS Record Web Tier Active
app.cloudplus.lab DNS Record App Tier Active
db.cloudplus.lab DNS Record Database Tier Active

Capture sanitized evidence of:

  • DNS zone

  • records

  • network association

  • successful name resolution

  • intentionally broken resolution

  • restored resolution

Do not capture:

  • private credentials

  • account secrets

  • sensitive production names

Verify:

web.cloudplus.lab
↓
Correct Web IP
app.cloudplus.lab
↓
Correct App IP
db.cloudplus.lab
↓
Correct DB IP

Then verify:

Name Resolution
↓
Routing
↓
Security
↓
Application Connectivity
Validation Status
Private DNS zone created
Network association configured
Web DNS record created
App DNS record created
DB DNS record created
Web record resolves correctly
App record resolves correctly
DB record resolves correctly
Public/private DNS understood
TTL reviewed
Alias concept tested
DNS vs routing differentiated
Broken record tested
Root cause identified
Record restored
DNS documentation completed
Resource inventory updated

Keep the private DNS zone and core records if you are continuing the Cloud+ sequence.

They will be useful in later labs involving:

  • three-tier architecture

  • load balancing

  • high availability

  • monitoring

  • troubleshooting

Remove only temporary test records that are no longer required.

A Cloud+ scenario may say:

A user can access a server by IP but not by hostname.

Think:

IP Works
Hostname Fails
↓
DNS

Another may say:

The hostname resolves correctly, but the application still cannot connect.

Think:

DNS
βœ“
↓
Routing
↓
Security
↓
Service

The key is learning to isolate:

which layer is failing.

Practice without notes.

11. Why should applications use hostnames instead of hard-coded IP addresses?

Section titled β€œ11. Why should applications use hostnames instead of hard-coded IP addresses?”

12. How would you troubleshoot a hostname that does not resolve?

Section titled β€œ12. How would you troubleshoot a hostname that does not resolve?”
Section titled β€œ17. What logs can help investigate DNS-related activity?”

18. If DNS resolves correctly but the application is unreachable, what would you check?

Section titled β€œ18. If DNS resolves correctly but the application is unreachable, what would you check?”

19. Why might one VM resolve a private hostname while another cannot?

Section titled β€œ19. Why might one VM resolve a private hostname while another cannot?”

A user can access 10.10.20.10 but cannot access app.cloudplus.lab.

Focus on:

DNS Resolver
↓
DNS Record
↓
Zone Association
↓
Caching

db.cloudplus.lab resolves, but the application cannot connect to the database.

DNS is working.

Move to:

Route
↓
Security Group
↓
Host Firewall
↓
Database Listener
↓
Authentication

A DNS record was updated, but some clients still receive the old address.

Consider:

cached DNS information and TTL.

Internal workloads cannot resolve a private DNS record, but public DNS works.

Check:

  • private zone

  • virtual-network association

  • resolver configuration

  • record existence

The database server was replaced and received a new IP.

A strong design uses:

db.cloudplus.lab
↓
Update DNS
↓
New Database IP

rather than modifying every application configuration with a new IP.

A developer wants to publish all internal hostnames in public DNS because it makes troubleshooting easier.

Discuss:

  • whether public publication is required

  • information exposure

  • private DNS

  • operational alternatives

An unauthorized DNS record change redirects a production hostname.

Discuss:

  • IAM

  • audit logging

  • change history

  • immediate record restoration

  • impact assessment

  • prevention

Use:

Hostname
↓
Resolver
↓
Zone
↓
Record
↓
Returned IP
↓
Route
↓
Security
↓
Service

Avoid:

β€œI would restart DNS.”

A stronger answer is:

β€œI would first confirm the exact hostname and query it directly, verify which resolver the client is using, check the relevant public or private zone and record value, validate network or zone association, consider TTL and caching, and then test connectivity to the resolved IP to determine whether the remaining issue is DNS, routing, security, or the application.”

That demonstrates Cloud Support Engineer thinking.

Keep sanitized versions of:

Show:

Private DNS
↓
Web / App / DB Names
↓
Private IPs

Document:

  • hostname

  • record type

  • IP

  • scope

  • purpose

Show:

Incorrect Record
↓
Wrong IP
↓
Investigation
↓
Correction
↓
Validation

Explain which records belong in each namespace and why.

Show the application using:

app.cloudplus.lab
db.cloudplus.lab

rather than hard-coded addresses.

Instead of:

Configured DNS.

Use:

Implemented private cloud DNS for segmented web, application, and database workloads using internal service hostnames, DNS records, virtual-network association, and validated hostname-to-IP resolution.

Or:

Troubleshot cloud name-resolution failures by validating client resolver configuration, DNS zones, record values, caching, network associations, routing, and downstream service connectivity.

You should now be able to:

  • explain DNS clearly

  • describe hostname-to-IP resolution

  • understand DNS resolvers

  • distinguish public and private DNS

  • explain DNS zones

  • understand A and AAAA records

  • explain CNAME concepts

  • explain TTL

  • understand DNS caching

  • create internal service names

  • validate DNS queries

  • troubleshoot incorrect records

  • identify zone-association issues

  • distinguish DNS failures from routing failures

  • explain how DNS supports application flexibility

  • understand DNS security and audit concerns

  • document cloud DNS architecture professionally

You have now added the naming layer to your cloud environment.

Your architecture has progressed from:

IP Address

to:

Service Name
↓
DNS
↓
IP Address
↓
Network
↓
Workload

Your application can now follow a cleaner model:

web.cloudplus.lab
↓
app.cloudplus.lab
↓
db.cloudplus.lab

The key lesson from this lab is:

DNS solves naming. It does not replace routing, security, or application availability. Strong cloud troubleshooting requires identifying exactly which layer is failing.

Your environment now has:

  • compute

  • segmented networking

  • routing

  • network security

  • DNS

The next lab moves into another fundamental cloud capability:

storage.

You will work with:

  • block storage

  • object storage

  • file storage

  • storage use cases

  • capacity

  • performance

  • persistence

  • attachment and mounting

  • cloud storage selection

  • basic storage troubleshooting

You will compare:

Block Storage
vs
File Storage
vs
Object Storage

and learn when each model should be used.

➑️ Next: Lab 07 β€” Cloud Storage Fundamentals Lab