πŸ‘¨β€πŸ’»
Mike's Notes
  • Introduction
  • MacOs Setup
    • System Preferences
    • Homebrew
      • Usage
    • iTerm
      • VIM
      • Tree
      • ZSH
    • Visual Studio Code
    • Git
    • SSH Keys
  • DevOps Knowledge
    • SRE
      • Scaling Reliably
        • Splitting a Monolith into Microservices
      • Troubleshooting Common Issues
      • Service Level Terminology
      • Toil
      • Monitoring
      • Release Engineering
      • Best Practices
      • On-Call
      • Alerting
    • Containers
      • Docker
        • Best Practices
          • Image Building
          • Docker Development
        • CLI Cheat Sheet
      • Container Orchestration
        • Kubernetes
          • Benefits
          • Cheat Sheet
          • Components
          • Pods
          • Workload Resources
          • Best Practices
    • Developer Portal πŸ‘¨β€πŸ’»
      • Solution Overview 🎯
      • System Architecture πŸ—οΈ
      • Implementation Journey πŸ› οΈ
      • Cross-team Collaboration 🀝
      • Lessons & Future πŸŽ“
    • Provisioning
      • Terraform
        • Installation
        • Usage
    • Configuration Management
      • Ansible
        • Benefits
        • Installation
    • Build Systems
      • Bazel
        • Features
  • Security
    • Secure Software Engineering
    • Core Concepts
    • Security Design Principles
    • Software Security Requirements
    • Compliance Standards and Policies
      • Sarbanes-Oxley (SOX)
      • HIPAA and HITECH
      • Payment Card Industry Data Security Standard (PCI-DSS)
      • General Data Protection Regulation (GDPR)
      • California Consumer Privacy Act (CCPA)
      • Federal Risk and Authorization Management Program (FedRAMP)
    • Privacy & Data
  • Linux Fundamentals
    • Introduction to Linux
    • Architecture
    • Server Administration
      • User / Groups
      • File Permissions
      • SSH
      • Process Management
    • Networking
      • Diagrams
      • Browser URL Example
      • Network Topologies
      • Signal Routing
      • DNS (Domain Name System)
      • SSL (Secure Sockets Layer)
      • TLS (Transport Layer Security)
  • System Design
    • Process
    • Kafka
      • Advanced Topics
    • URL Shortener
Powered by GitBook
On this page
  • What is DNS?
  • What layer of the OSI model does it operate at?
  • How Does DNS Work?
  • DNS Lookup Steps:
  • Types of DNS Queries:
  • DNS Caching:

Was this helpful?

  1. Linux Fundamentals
  2. Networking

DNS (Domain Name System)

PreviousSignal RoutingNextSSL (Secure Sockets Layer)

Last updated 7 months ago

Was this helpful?

What is DNS?

The Domain Name System (DNS) is a decentralized naming system for devices and services connected to the internet or private networks. It translates human-friendly domain names (like google.com) into machine-friendly IP addresses (such as 192.168.0.1). This allows browsers to locate and load resources on the internet without needing to memorize numerical IP addresses.

What layer of the OSI model does it operate at?

DNS (Domain Name System) operates at the Application Layer (Layer 7) of the OSI model.

How Does DNS Work?

DNS resolves human-readable domain names into IP addresses. This process involves four main components:

  1. DNS Recursor: A server acting as a "librarian" that receives queries from browsers and initiates additional requests to fulfill the DNS query.

  2. Root Nameserver: The first step in finding an IP address, similar to a library index, directing the query to more specific servers.

  3. TLD Nameserver: Points to servers associated with the top-level domain (like .com or .net).

  4. Authoritative Nameserver: The final stop that stores the actual IP address for the requested domain.

DNS Lookup Steps:

  1. A user types in a domain like "example.com."

  2. The browser queries a DNS resolver.

  3. The recursor asks the root nameserver, which points to the relevant TLD server.

  4. The TLD server provides the IP address of the domain’s nameserver.

  5. The recursor gets the IP address from the authoritative nameserver and returns it to the browser.

The browser can now load the web page by sending a request to that IP.

Here's another image showing the step by step process:

Types of DNS Queries:

  1. Recursive Query: The DNS client expects a definitive answer (either the record or an error).

  2. Iterative Query: The DNS server returns the best possible answer or a referral to another server.

  3. Non-Recursive Query: This occurs when the DNS resolver already has the information cached and returns it without needing further queries.

DNS Caching:

To speed up the process, DNS records are cached in various locations:

  • Browser Cache: Modern browsers store DNS records locally for a short time.

  • Operating System Cache: The OS also caches DNS records to avoid repetitive queries.

  • ISP Caching: ISPs store frequently requested DNS records to reduce query time further.

In some cases, Cloudflare DNS optimizes this process with infrastructure designed to handle high traffic, such as root DNS servers.

https://www.iotforall.com/a-simple-explanation-of-the-domain-name-system
https://bluecatnetworks.com/glossary/what-is-a-dns-server/