DNS
DNS
DNS Query: A user’s device (DNS client) sends a query to resolve a domain
name into an IP address.
Recursive Query: The DNS resolver contacts multiple DNS servers in a
sequence to resolve the domain name.
Iterative Query: The DNS resolver sends a query to a server, and if it doesn’t
know the answer, it responds with a referral to another DNS server.
DNS Caching: DNS resolvers and browsers cache DNS records to improve
performance and reduce query times. Cached entries have a Time-to-Live (TTL)
value indicating how long they are valid.
Types of DNS Servers:
DNS Resolver: The first point of contact for a DNS query, typically provided by
the ISP. It queries other DNS servers to resolve a name.
Authoritative DNS Server: Holds the actual DNS records for a domain. It
provides the final answer for a domain query.
Root DNS Server: The highest level of DNS servers, responsible for directing
queries to appropriate TLD DNS servers.
Caching DNS Server: Temporarily stores DNS results to improve response
times for repeated queries.
DNS Zones:
It contains DNS records for one or more domains, and each zone is managed by
a set of authoritative DNS servers.
DNS Resolver Query: If not cached, the query is sent to the DNS resolver
(usually the ISP’s DNS server).
Root DNS Query: If the resolver doesn’t know the IP, it queries the root DNS
server.
TLD Server Query: The root server redirects the resolver to the appropriate TLD
server (.com in this case).
Authoritative DNS Server Query: The TLD server directs the query to the
authoritative DNS server for example.com.
IP Address Resolution: The authoritative server responds with the IP address
for www.example.com.
Result Sent to Client: The resolver returns the IP address to the client, which
then accesses the website.