Bird
Raised Fist0
Computer Networksknowledge~20 mins

DNS (Domain Name System) in Computer Networks - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
DNS Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How DNS Resolves a Domain Name

When you type a website address like www.example.com in your browser, how does DNS help your computer find the website?

Choose the best description of the DNS resolution process.

ADNS translates the domain name into an IP address by querying a series of DNS servers starting from the root, then top-level domain, and finally the authoritative server.
BDNS directly connects to the website server without any translation, using the domain name as the address.
CDNS stores the website content locally and sends it to your browser when you enter the domain name.
DDNS encrypts your domain name and sends it to the internet service provider to find the website.
Attempts:
2 left
💡 Hint

Think about how computers use numbers (IP addresses) to find each other, not names.

📋 Factual
intermediate
1:30remaining
Purpose of a DNS Cache

What is the main purpose of a DNS cache on your computer or network?

ATo block access to certain websites by storing their IP addresses.
BTo store IP addresses of recently visited domain names to speed up future lookups.
CTo permanently save all domain names and their IP addresses for offline use.
DTo encrypt DNS queries to protect user privacy.
Attempts:
2 left
💡 Hint

Think about how remembering something recently used can make things faster.

🔍 Analysis
advanced
2:30remaining
Identifying DNS Record Types

Given the following DNS record, what type of record is it and what does it do?

example.com. 3600 IN MX 10 mail.example.com.
AA record; it maps a domain to an IPv4 address.
BCNAME record; it aliases one domain name to another.
CMX record; it specifies the mail server responsible for receiving email for the domain.
DTXT record; it stores text information for the domain.
Attempts:
2 left
💡 Hint

Look at the record type abbreviation and think about email.

❓ Comparison
advanced
2:30remaining
Difference Between Recursive and Iterative DNS Queries

Which statement correctly describes the difference between recursive and iterative DNS queries?

AIn a recursive query, the DNS server fully resolves the domain name and returns the final IP address; in an iterative query, the server returns the best answer it has or a referral to another server.
BIn a recursive query, the client resolves the domain name by itself; in an iterative query, the server resolves it fully for the client.
CRecursive queries are used only for email servers; iterative queries are used for websites.
DRecursive queries always return multiple IP addresses; iterative queries return only one.
Attempts:
2 left
💡 Hint

Consider who does the work of finding the final answer in each query type.

❓ Reasoning
expert
3:00remaining
Impact of DNS TTL on Website Accessibility

If a website's DNS record has a very high TTL (Time To Live) value, what could be a potential downside when the website's IP address changes?

AHigh TTL values cause DNS queries to fail more often.
BThe website will immediately update for all users, causing no downtime.
CThe DNS servers will ignore the TTL and update instantly to the new IP address.
DUsers may continue to be directed to the old IP address for a long time, causing access problems until caches expire.
Attempts:
2 left
💡 Hint

Think about how caching works and what happens when information changes.

Practice

(1/5)
1. What is the main purpose of the DNS in computer networks?
easy
A. To store website content
B. To translate website names into IP addresses
C. To secure internet connections
D. To speed up internet downloads

Solution

  1. Step 1: Understand what DNS stands for

    DNS means Domain Name System, which helps computers find websites.
  2. Step 2: Identify DNS function

    DNS translates easy-to-remember website names (like example.com) into IP addresses that computers use to connect.
  3. Final Answer:

    To translate website names into IP addresses -> Option B
  4. Quick Check:

    DNS translates names to IPs = A [OK]
Hint: DNS matches names to numbers (IP addresses) [OK]
Common Mistakes:
  • Thinking DNS stores website content
  • Confusing DNS with security protocols
  • Believing DNS speeds up downloads
2. Which of the following is the correct format of a DNS record that maps a domain to an IP address?
easy
A. TXT record
B. MX record
C. CNAME record
D. A record

Solution

  1. Step 1: Recall DNS record types

    DNS uses different record types for different purposes: A records map domains to IP addresses, MX records handle mail servers, TXT records store text info, and CNAME records alias domains.
  2. Step 2: Identify record for IP mapping

    The A record specifically maps a domain name to an IPv4 address.
  3. Final Answer:

    A record -> Option D
  4. Quick Check:

    A record = IP mapping [OK]
Hint: A record = Address (IP) mapping [OK]
Common Mistakes:
  • Confusing MX with IP mapping
  • Thinking TXT stores IP addresses
  • Mixing CNAME with direct IP mapping
3. If you type www.example.com in your browser, which sequence correctly describes what DNS does?
medium
A. Browser sends IP to DNS server -> DNS returns IP -> Browser connects to IP
B. Browser sends IP to DNS server -> DNS returns domain -> Browser connects to domain
C. Browser sends domain to DNS server -> DNS returns IP -> Browser connects to IP
D. Browser sends domain to DNS server -> DNS returns website content -> Browser displays content

Solution

  1. Step 1: Understand DNS query process

    When you enter a domain, the browser asks DNS servers for the IP address of that domain.
  2. Step 2: Follow DNS response and connection

    The DNS server replies with the IP address, then the browser uses that IP to connect to the website.
  3. Final Answer:

    Browser sends domain to DNS server -> DNS returns IP -> Browser connects to IP -> Option C
  4. Quick Check:

    Domain to IP to connect = D [OK]
Hint: DNS translates domain to IP before connecting [OK]
Common Mistakes:
  • Thinking DNS returns website content
  • Confusing domain and IP roles
  • Assuming DNS returns domain from IP
4. A user cannot access a website even though the internet connection is fine. Which DNS-related issue is most likely the cause?
medium
A. Incorrect IP address in DNS record
B. Slow internet speed
C. Browser cache is full
D. Website server is down

Solution

  1. Step 1: Analyze the problem context

    The internet connection works, so the problem is not network speed or browser cache.
  2. Step 2: Identify DNS issue

    If DNS has an incorrect IP address for the website, the browser cannot find the correct server, causing access failure.
  3. Final Answer:

    Incorrect IP address in DNS record -> Option A
  4. Quick Check:

    Wrong DNS IP causes access failure = B [OK]
Hint: Wrong IP in DNS stops website loading [OK]
Common Mistakes:
  • Blaming slow internet when connection is fine
  • Assuming browser cache causes DNS errors
  • Confusing server downtime with DNS issues
5. You want to create a DNS entry that points blog.example.com to example.com without assigning a new IP. Which DNS record type should you use?
hard
A. CNAME record
B. A record
C. MX record
D. PTR record

Solution

  1. Step 1: Understand DNS record purposes

    A records map domains to IPs, CNAME records alias one domain to another, MX records handle mail, PTR records map IPs to domains.
  2. Step 2: Choose record for aliasing

    To point blog.example.com to example.com without a new IP, a CNAME record creates an alias to the main domain.
  3. Final Answer:

    CNAME record -> Option A
  4. Quick Check:

    Alias domain uses CNAME record = A [OK]
Hint: Use CNAME to alias one domain to another [OK]
Common Mistakes:
  • Using A record for alias instead of IP
  • Confusing MX with domain aliasing
  • Thinking PTR is for forward DNS
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard