Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

DNS concepts


πŸ“˜ 1. Basics of DNS

What Is DNS?

The Domain Name System (DNS) is the Internet’s phonebook. It translates human-friendly domain names (like www.example.com) into IP addresses (like 192.0.2.1) that computers use to identify each other on the network.

How DNS Resolution Works

When you enter a URL into your browser, the DNS resolution process unfolds as follows:

  1. Recursive Resolver: Your device queries a recursive DNS resolver, typically provided by your ISP or a public DNS service.
  2. Root Name Server: The resolver contacts a root name server, which directs it to the appropriate Top-Level Domain (TLD) server (e.g., .com, .org).
  3. TLD Name Server: The resolver then queries the TLD server, which provides the authoritative name server for the specific domain.
  4. Authoritative Name Server: Finally, the resolver contacts the authoritative name server, which returns the IP address associated with the domain name.
  5. Caching: The resolver caches this information for a duration specified by the Time to Live (TTL) value to expedite future requests.
DNS Resolution Process

Image Source: ResearchGate


πŸ“˜ 2. DNS Record Types

DNS records are instructions stored in DNS servers that provide information about a domain. Here are some common types:

Record TypePurposeExample
AMaps a domain to an IPv4 addressexample.com β†’ 192.0.2.1
AAAAMaps a domain to an IPv6 addressexample.com β†’ 2001:db8::1
CNAMEAlias of one domain to anotherwww.example.com β†’ example.com
MXMail exchange; directs email to a mail serverexample.com β†’ mail.example.com
TXTHolds text information, often for verificationexample.com β†’ "v=spf1 include:_spf.example.com ~all"
SRVSpecifies a port for services like SIP or XMPP_sip._tcp.example.com β†’ sipserver.example.com:5060
NSIndicates authoritative name servers for the domainexample.com β†’ ns1.example.com
SOAStart of authority; provides administrative information about the zoneContains details like the primary name server, email of the domain admin, domain serial number, etc.
DNS Record Types

Image Source: ASMED


πŸ“˜ 3. TTL and DNS Propagation

What Is TTL?

Time to Live (TTL) is a value in a DNS record that tells DNS resolvers how long to cache a query before requesting a new one. It’s measured in seconds.

  • High TTL (e.g., 86400 seconds / 24 hours): Reduces load on DNS servers but delays propagation of changes.
  • Low TTL (e.g., 300 seconds / 5 minutes): Allows quicker propagation of changes but increases DNS query traffic.

DNS Propagation

When a DNS record is updated, the change doesn’t take effect immediately across the Internet. Instead, it propagates as cached records expire based on their TTL values.

DNS Propagation

Image Source: ClouDNS


πŸ“˜ 4. Public vs. Private DNS

Public DNS

  • Accessible to anyone on the Internet.
  • Used to resolve domain names of public websites.
  • Examples: Google Public DNS (8.8.8.8), Cloudflare (1.1.1.1).

Private DNS

  • Restricted to a private network.
  • Used within organizations to resolve internal hostnames.
  • Enhances security by preventing exposure of internal DNS records.
Public vs. Private DNS

Image Source: NordLayer


πŸ“˜ 5. Reverse DNS (PTR Records)

What Is Reverse DNS?

Reverse DNS (rDNS) translates an IP address back into a domain name, the opposite of the usual DNS lookup.

PTR Records

  • Pointer (PTR) records are used for reverse DNS lookups.
  • They map an IP address to a domain name.
  • Commonly used in email servers to verify the domain name associated with an IP address, helping to prevent spam.
Reverse DNS Lookup

Certainly! Here’s a comprehensive explanation of how the Domain Name System (DNS) works, accompanied by a detailed diagram to illustrate the process.


🌐 How DNS Works: Step-by-Step Explanation

The Domain Name System (DNS) functions as the Internet’s phonebook, translating human-readable domain names (like www.example.com) into machine-readable IP addresses (like 192.0.2.1). This translation is essential for locating and accessing websites.

πŸ”„ DNS Resolution Process

When you enter a URL into your browser, the DNS resolution process unfolds as follows:

  1. Browser Cache Check: The browser checks its cache to see if it has recently resolved the domain. If found, it uses the cached IP address. (DNS Resolution Process | Cycle.io)
  2. Operating System Cache Check: If not in the browser cache, the operating system checks its own cache. (DNS Resolution Process | Cycle.io)
  3. Recursive DNS Resolver Query: If the IP address isn’t cached locally, the query is sent to a recursive DNS resolver, typically provided by your Internet Service Provider (ISP). (DNS Resolution Process | Cycle.io)
  4. Root Name Server Query: The resolver queries a root name server, which responds with the address of the appropriate Top-Level Domain (TLD) name server (e.g., .com, .org).
  5. TLD Name Server Query: The resolver then queries the TLD name server, which responds with the address of the domain’s authoritative name server.
  6. Authoritative Name Server Query: The resolver queries the authoritative name server, which responds with the IP address of the requested domain. (How does the Domain Name System (DNS) lookup work?)
  7. Response to Client: The resolver returns the IP address to the browser. (DNS Resolution Process | Cycle.io)
  8. Website Access: The browser uses the IP address to access the website. (Como funciona o DNS? – ManageEngine Blog)

Throughout this process, each server caches the response for a duration specified by the Time to Live (TTL) value, improving efficiency for future queries.


πŸ–ΌοΈ DNS Resolution Diagram

To visualize this process, here’s a diagram illustrating each step of the DNS resolution:

DNS Resolution Process

Image Source: ResearchGate


Understanding this process is crucial for anyone working with networked systems, as DNS plays a vital role in the functionality of the Internet.

If you have further questions or need more detailed explanations on any part of this process, feel free to ask!

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x