User Tools

Site Tools


networking:dns

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
networking:dns [2026/07/21 15:48] – 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 records. It holds the "official" records that are published in the DNS zone file.+It is important to distinguish between these two server types.
  
-**Example:**+^ 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 |
  
-| Domain | Authoritative Server | Records | +----- 
-|--------|---------------------|---------| + 
-| `example.com` | `ns1.example.com` | A → `93.184.216.34` | +===== What is an Authoritative DNS Server? ===== 
-| | | MX → `mail.example.com` | + 
-| | | TXT → `v=spf1 include:_spf.example.com ~all` |+An **authoritative DNS server** stores the official DNS records for a domain.
  
-Or visually:+Example:
  
 <code> <code>
 example.com example.com
-  └── authoritative: ns1.example.com +    │ 
-        ├── A     → 93.184.216.34 +    └── ns1.example.com 
-        ├── MX    → mail.example.com +            ├── A      → 93.184.216.34 
-        └── TXT   → v=spf1 include:_spf.example.com ~all+            ├── AAAA   → 2606:... 
 +            ├── MX     → mail.example.com 
 +            ├── TXT    → v=spf1 include:_spf.example.com ~all 
 +            └── CAA    → letsencrypt.org
 </code> </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's 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.
  
 ----- -----
Line 55: Line 132:
 ===== Telenegar DNS Check ===== ===== Telenegar DNS Check =====
  
-Use our [[https://telenegar.ir/dnscheck/|DNS Check tool]] to query DNS records from global probes.+**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.
  
 ----- -----
  
-{{tag>dns networking dnssec}}+{{tag>dns networking dnssec authoritative resolver propagation ttl}}
networking/dns.1784648931.txt.gz · Last modified: by 127.0.0.1