1. What is DNS?
DNS is the Domain Name System, which translates human-friendly domain names (e.g., google.com
) into IP addresses (e.g., 142.250.190.14
) so computers can communicate.
2. Why is DNS important?
Without DNS, users would need to remember IP addresses instead of names. It’s like a phonebook of the Internet.
3. Which port does DNS use?
-
UDP port 53 for most queries (faster).
-
TCP port 53 for zone transfers and when responses are too large.
4. What are the types of DNS servers?
-
Root Servers → Top of DNS hierarchy.
-
TLD Servers → Handle domains like
.com
,.org
,.net
. -
Authoritative DNS Servers → Store actual domain records.
-
Recursive DNS Resolvers → Query other DNS servers on behalf of client.
5. What are common DNS record types?
-
A → Maps domain to IPv4 address.
-
AAAA → Maps domain to IPv6 address.
-
CNAME → Alias to another domain name.
-
MX → Mail exchange server.
-
NS → Name servers for a domain.
-
PTR → Reverse lookup (IP → Domain).
-
TXT → Stores arbitrary text (SPF, DKIM).
6. What is the difference between Recursive and Iterative DNS queries?
-
Recursive → Resolver does all the work, contacting other servers until it finds the answer.
-
Iterative → Resolver asks each server, and the server responds with a referral to the next server.
7. What is DNS caching?
-
To reduce load, resolvers and clients store responses temporarily.
-
Controlled by TTL (Time to Live) value in DNS records.
8. What is a DNS zone and zone transfer?
-
Zone → A portion of the DNS namespace managed by an organization.
-
Zone Transfer → Copying zone file data from primary DNS server to secondary server (uses TCP 53).
9. What is Split-Horizon DNS?
Different DNS answers depending on where the query comes from (internal vs external clients).
10. What is DNSSEC?
DNS Security Extensions — adds authentication and integrity using digital signatures to prevent attacks like spoofing.
11. What is a DNS forwarder?
A DNS server configured to forward queries it can’t resolve locally to another DNS server (often ISP’s DNS).
12. What are common DNS attacks?
-
DNS Spoofing / Cache Poisoning → Inserting fake records into cache.
-
DNS Amplification → DDoS using open resolvers.
-
Domain Hijacking → Unauthorized changes to domain registration.
Quick Recap:
-
DNS = Phonebook of Internet.
-
Uses Port 53 (UDP for queries, TCP for transfers).
-
Records: A, AAAA, CNAME, MX, NS, PTR, TXT.
-
Recursive vs Iterative.
-
Vulnerable to spoofing → mitigated by DNSSEC.
The Full DNS Resolution Process
The Domain Name System (DNS) resolution process is how your computer translates a human-readable domain name (like www.google.com
) into a machine-readable IP address (like 142.250.191.132
). The process involves a chain of different servers working together to find the correct information.
Here is a step-by-step diagram and explanation of the full DNS lookup process:
The Resolution Chain
Client (Your Device) Query: When you type a domain name into your browser, your computer first checks its own local cache and the host file. If the IP address is not found, the query is sent to a Recursive DNS Server (also known as a DNS Resolver). This is typically a server provided by your Internet Service Provider (ISP).
Resolver Queries the Root Server: The Recursive Server does not know the answer, so it queries a Root DNS Server. There are 13 logical Root servers globally, and they are responsible for the entire DNS hierarchy.
Root Server Directs to TLD Server: The Root server doesn't know the IP address for
www.example.com
, but it knows which server handles the.com
Top-Level Domain (TLD). It responds with a referral to the.com
TLD server.Resolver Queries the TLD Server: The Recursive Server now queries the
.com
TLD DNS Server.TLD Server Directs to Authoritative Server: The TLD server knows which server is responsible for the
example.com
domain. It responds with a referral to that specific Authoritative DNS Server.Resolver Queries the Authoritative Server: The Recursive Server queries the
example.com
Authoritative DNS Server. This server is the final authority for the domain and holds the specific DNS records (e.g., A, CNAME, MX records).Authoritative Server Provides IP Address: The Authoritative server finds the
A
record forwww.example.com
and responds to the Recursive Server with the corresponding IP address.Resolver Returns IP to Client: The Recursive Server receives the IP address, caches it for future use, and sends the IP address back to your computer.
Client Connects to Server: Your computer now has the IP address and can establish a direct connection with the web server to load the website.
No comments:
Post a Comment