networking:dns
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| networking:dns [2026/07/21 15:44] – external edit 127.0.0.1 | networking: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." |
| + | |||
| + | 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, | + | When you enter a domain name into your browser, |
| - | | + | |
| - | | + | |
| - | | + | - If not cached, the resolver queries a **Root |
| - | | + | |
| + | | ||
| + | - The authoritative server returns the requested DNS record (A, AAAA, MX, TXT, etc.). | ||
| + | - The resolver caches | ||
| + | |||
| + | < | ||
| + | Browser | ||
| + | │ | ||
| + | ▼ | ||
| + | Recursive Resolver | ||
| + | │ | ||
| + | ▼ | ||
| + | Root Server | ||
| + | │ | ||
| + | ▼ | ||
| + | TLD Server | ||
| + | │ | ||
| + | ▼ | ||
| + | Authoritative DNS Server | ||
| + | │ | ||
| + | ▼ | ||
| + | DNS Record | ||
| + | </ | ||
| ----- | ----- | ||
| - | ===== DNS Record Types ===== | + | ===== Common |
| - | ^ Record | + | ^ Record ^ Purpose ^ Example ^ |
| - | | **A** | Maps domain | + | | **A** | Maps a hostname |
| - | | **AAAA** | Maps domain | + | | **AAAA** | Maps a hostname |
| - | | **CNAME** | Alias (canonical name) | `www.example.com → example.com` | | + | | **CNAME** | Alias for another hostname |
| - | | **MX** | Mail exchange | + | | **MX** | Mail server |
| - | | **TXT** | Text records | + | | **TXT** | Text information |
| - | | **NS** | Name server | + | | **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 |
| + | | **PTR** | Reverse DNS (IP → hostname) | `93.184.216.34 → example.com` | | ||
| + | | **CAA** | Specifies which Certificate Authorities may issue TLS certificates | `0 issue " | ||
| ----- | ----- | ||
| - | ===== What is an Authoritative Server? ===== | + | ===== Recursive Resolver vs Authoritative Server ===== |
| - | An **authoritative DNS server** is the final authority for a domain' | + | 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: | + | An **authoritative DNS server** stores the official DNS records for a domain. |
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | example.com | ||
| + | │ | ||
| + | └── | ||
| + | ├── | ||
| + | | ||
| + | ├── | ||
| + | | ||
| + | └── CAA → letsencrypt.org | ||
| + | </ | ||
| + | |||
| + | 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 45: | Line 132: | ||
| ===== Telenegar DNS Check ===== | ===== Telenegar DNS Check ===== | ||
| - | Our [[https:// | + | **Telenegar |
| + | |||
| + | * 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. | ||
| - | * **Record Type** — A, AAAA, MX, NS, CNAME, TXT, SOA, PTR | + | Use our [[https:// |
| - | * **DNS Server** — Test specific resolvers (Google, Cloudflare, etc.) | + | |
| - | * **DNSSEC** — Verify DNSSEC signatures | + | |
| ----- | ----- | ||
| - | {{tag> | + | {{tag> |
networking/dns.1784648666.txt.gz · Last modified: by 127.0.0.1
