What is DNS (Domain Name System)?

A system, managed in a distributed way by servers around the world, that maps domain names such as www.example.com to the IP addresses used for communication.

Japanese name: DNS

DNS (Domain Name System) appears in 9 practice questions across 2 topics, including Computer Networking Basics, Cloud and Container Basics.

Field: Computer Networking Basics

How name resolution works

A device sends its query to a full-service resolver (caching DNS server) run by its ISP or organization. If the answer is not cached, the resolver asks a root server, then a TLD server such as the one for .com, then the domain's authoritative DNS server, and returns the answer to the device. Each server only says "ask this server next," so no server needs to hold all the data.

Caching and TTL

A resolver caches each answer for the validity period attached to the record (its TTL) and answers repeated queries immediately. This cuts the number of queries and the waiting time, but after a DNS setting changes, the old value may still be used until cached answers expire. That is why the TTL is lowered before moving a server.

Main records and transport

Record types include A for IPv4 addresses, AAAA for IPv6 addresses, CNAME for aliases, MX for mail delivery and NS for a domain's authoritative DNS servers. Queries mainly use UDP port 53, and TCP is also used, for example when responses are large. Against eavesdropping and forged responses, DNSSEC signatures and encryption such as DNS over HTTPS (DoH) are used.

Try it: questions about DNS (Domain Name System)

A client makes a new HTTPS connection (TLS 1.3 over TCP) to a web server with a round-trip time (RTT) of 100 ms. Roughly how long does it take until the response to the first request starts to arrive? Assume DNS resolution is already done, and ignore server processing time and data transfer time.

  1. AAbout 100 ms
  2. BAbout 300 ms
  3. CAbout 200 ms
Show answer and explanation

Answer: B. About 300 ms

First, the TCP three-way handshake takes one round trip (the client can send its first TLS message together with the final ACK). Next, the TLS 1.3 handshake takes one round trip, and then the HTTP request and response take one more, for three round trips in total: 3 × 100 = 300 ms. With TLS 1.2 the key exchange takes two round trips, giving four round trips, or 400 ms. This waiting time depends on the number of RTTs, which is set by distance, so adding link bandwidth does not shorten it. QUIC, used by HTTP/3, combines the transport and cryptographic handshakes into one round trip and also offers a way to send data in the first flight when reconnecting (0-RTT).

What is the main role of DNS (Domain Name System)?

  1. AIt finds the MAC address of a device on the same network from its IP address
  2. BIt translates domain names such as www.example.com into the IP addresses used for communication (name resolution)
  3. CIt encrypts communication and verifies whether a connected website is genuine
Show answer and explanation

Answer: B. It translates domain names such as www.example.com into the IP addresses used for communication (name resolution)

DNS (Domain Name System) is the system that maps human-friendly domain names to the IP addresses used for communication. When you open a URL in a browser, the device first asks DNS for the server's IP address and then connects to that address. DNS data is not held on one server; it is divided by levels of the domain name hierarchy and managed in a distributed way by servers around the world. Queries mainly use UDP port 53, and TCP is also used, for example when responses are large.

FAQ

Which port does DNS use?

Port 53 by default. Ordinary queries mainly use UDP, and TCP is also used for large responses or for zone transfers between servers.

Why doesn't a DNS change take effect immediately?

Resolvers and devices cache the previous answer for the record's TTL. Until the cache expires and they query again, the old address may still be used.

DNS (Domain Name System) in the explanations

Questions that mention DNS (Domain Name System) (9)

  1. A client makes a new HTTPS connection (TLS 1.3 over TCP) to a web server with a round-trip time (RTT) of 100 ms. Roughly how long does it take until the response to the first request starts to arrive? Assume DNS resolution is already done, and ignore server processing time and data transfer time.
  2. What is the main role of DNS (Domain Name System)?
  3. A full-service resolver (caching DNS server) with an empty cache looks up the IP address of www.example.com. In what order does it query servers?
  4. In the four-layer TCP/IP model, which layer do TCP and UDP belong to?
  5. Which correctly describes the role of ARP?
  6. Which correctly describes UDP?
  7. Which correctly pairs protocols with the standard port numbers their servers use?
  8. When a device obtains an IP address with DHCP, what is the correct order of messages?
  9. In Kubernetes, a Pod gets a different IP address every time it is recreated. Which of the following resources lets other applications connect, through a name and address that do not change, to several Pods selected by labels, with the load spread across them?

Books on Computer Networking Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

HTTP (Hypertext Transfer Protocol) DHCP TLS Three-way handshake OSI reference model ARP MAC address Port number SSH Subnet mask

Back to the glossary