User Tools

Site Tools


networking:dns

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
networking:dns [2026/07/21 15:32] – created - external edit 127.0.0.1networking:dns [2026/07/21 18:18] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== DNS Explained ====== ====== DNS Explained ======
  
-The Domain Name System (DNS) is like the phonebook of the internet. It translates human-readable domain names (like `example.com`) into IP addresses (like `93.184.216.34`) that computers use to communicate.+The **Domain Name System (DNS)** is often described as the "phonebook of the Internet.It translates human-readable domain names (such as `example.com`) into IP addresses (such as `93.184.216.34`) that computers use to communicate
 + 
 +Without DNS, users would have to remember the IP address of every website they visit.
  
 ----- -----
Line 7: Line 9:
 ===== How DNS Works ===== ===== How DNS Works =====
  
-When you type a domain name in your browser, a series of queries happens:+When you enter a domain name into your browser, the following steps occur:
  
-  1. **Resolver** (your ISP or public DNS like 8.8.8.8) receives the query +  **Resolver** (usually your ISP's DNS server or public resolver such as Google DNS `8.8.8.8` or Cloudflare DNS `1.1.1.1`) receives the query. 
-  2. **Root Server** tells which TLD server to ask +  - The resolver checks whether it already has the answer cached. 
-  3. **TLD Server** (.com, .org, .ir) tells which authoritative server to ask +  - If not cached, the resolver queries a **Root DNS Server**. 
-  4. **Authoritative Server** provides the final answer+  - The root server directs the resolver to the appropriate **Top-Level Domain (TLDServer** (such as `.com``.org`or `.ir`). 
 +  - The TLD server tells the resolver which **Authoritative DNS Server** is responsible for the domain. 
 +  - The authoritative server returns the requested DNS record (A, AAAA, MX, TXT, etc.). 
 +  - The resolver caches the answer according to its **TTL (Time To Live)** and returns it to your browser. 
 + 
 +<code> 
 +Browser 
 +   │ 
 +   ▼ 
 +Recursive Resolver 
 +   │ 
 +   ▼ 
 +Root Server 
 +   │ 
 +   ▼ 
 +TLD Server 
 +   │ 
 +   ▼ 
 +Authoritative DNS Server 
 +   │ 
 +   ▼ 
 +DNS Record 
 +</code>
  
 ----- -----
  
-===== DNS Record Types =====+===== Common DNS Record Types =====
  
-^ Record Type ^ Purpose ^ Example ^ +^ Record ^ Purpose ^ Example ^ 
-| **A** | Maps domain to IPv4 address | `example.com → 93.184.216.34` | +| **A** | Maps a hostname to an IPv4 address | `example.com → 93.184.216.34` | 
-| **AAAA** | Maps domain to IPv6 address | `example.com → 2606:2800:220:1:248:1893:25c8:1946` | +| **AAAA** | Maps a hostname to an IPv6 address | `example.com → 2606:2800:220:1:248:1893:25c8:1946` | 
-| **CNAME** | Alias (canonical name) | `www.example.com → example.com` | +| **CNAME** | Alias for another hostname | `www.example.com → example.com` | 
-| **MX** | Mail exchange server | `mail.example.com` | +| **MX** | Mail server for a domain | `10 mail.example.com` | 
-| **TXT** | Text records (SPF, DKIM, etc.) | `v=spf1 include:_spf.example.com ~all` | +| **TXT** | Text information (SPF, DKIM, DMARC, ownership verification, etc.) | `v=spf1 include:_spf.example.com ~all` | 
-| **NS** | Name server | `ns1.example.com` | +| **NS** | Authoritative name servers for a zone | `ns1.example.com` | 
-| **SOA** | Start of authority (zone info) | `ns1.example.com admin.example.com 2026072001` |+| **SOA** | Zone configuration and serial number | `ns1.example.com admin.example.com 2026072001` | 
 +| **PTR** | Reverse DNS (IP → hostname) | `93.184.216.34 → example.com` | 
 +| **CAA** | Specifies which Certificate Authorities may issue TLS certificates | `0 issue "letsencrypt.org"` |
  
 ----- -----
  
-===== What is an Authoritative Server=====+===== Recursive Resolver vs Authoritative Server =====
  
-An **authoritative DNS server** is the final authority for a domain's DNS recordsIt holds the "official" records that are published in the DNS zone file.+It is important to distinguish between these two server types. 
 + 
 +^ Recursive Resolver ^ Authoritative Server ^ 
 +| Receives queries from users | Stores the official DNS records | 
 +| Performs recursive lookups | Answers only for its own domains | 
 +| Caches results | Does not perform recursion | 
 +| Usually operated by ISPs or public DNS providers | Usually operated by the domain owner or DNS provider | 
 + 
 +----- 
 + 
 +===== What is an Authoritative DNS Server? ===== 
 + 
 +An **authoritative DNS server** stores the official DNS records for a domain
 + 
 +Example: 
 + 
 +<code> 
 +example.com 
 +    │ 
 +    └── ns1.example.com 
 +            ├── A      → 93.184.216.34 
 +            ├── AAAA   → 2606:... 
 +            ├── MX     → mail.example.com 
 +            ├── TXT    → v=spf1 include:_spf.example.com ~all 
 +            └── CAA    → letsencrypt.org 
 +</code> 
 + 
 +Whenever DNS information changes, these servers are the source of truth. 
 + 
 +----- 
 + 
 +===== What is TTL? ===== 
 + 
 +**TTL (Time To Live)** specifies how long a DNS record may be cached before it must be queried again. 
 + 
 +Example: 
 + 
 +| TTL | Meaning | 
 +| 300 | Cache for 5 minutes | 
 +| 3600 | Cache for 1 hour | 
 +| 86400 | Cache for 24 hours | 
 + 
 +Short TTL values allow DNS changes to propagate more quickly but increase the number of DNS queries. 
 + 
 +----- 
 + 
 +===== Why do different DNS servers sometimes return different answers? ===== 
 + 
 +DNS responses may vary because: 
 + 
 +  * Different resolvers may still have cached records. 
 +  * CDN providers return different IP addresses based on the user'geographic location. 
 +  * DNS propagation may still be in progress after a recent change. 
 +  * Some providers implement GeoDNS or Anycast routing. 
 + 
 +This is why querying multiple DNS servers is useful when troubleshooting DNS issues. 
 + 
 +----- 
 + 
 +===== DNS Propagation ===== 
 + 
 +After changing a DNS record, not all users will see the change immediately. 
 + 
 +Propagation time depends on: 
 + 
 +  * The TTL of the previous record. 
 +  * Resolver cache expiration. 
 +  * ISP caching policies. 
 + 
 +Although changes are published immediately on the authoritative server, recursive resolvers around the world may continue serving cached data until the TTL expires. 
 + 
 +----- 
 + 
 +===== Telenegar DNS Check ===== 
 + 
 +**Telenegar DNS Check** queries DNS records from multiple DNS providers and geographic locations, allowing you to: 
 + 
 +  * Compare responses from different DNS servers. 
 +  * Detect DNS propagation issues. 
 +  * Verify GeoDNS and CDN behavior. 
 +  * Query A, AAAA, MX, TXT, NS, SOA, PTR, CNAME, and other DNS record types. 
 + 
 +Use our [[https://telenegar.ir/dnscheck/|DNS Check]] tool to investigate DNS resolution from multiple locations. 
 + 
 +-----
  
-**Example:**+{{tag>dns networking dnssec authoritative resolver propagation ttl}}
networking/dns.1784647936.txt.gz · Last modified: by 127.0.0.1