Domain Name System
Table of Contents
Domain Name System
Key Features
- Domain name resolution: Translates domain names into IP addresses.
- Hierarchical structure: Organizes domain names in a hierarchical structure.
- Works over both TCP and UDP: DNS uses UDP for most queries, but switches to TCP for larger messages or zone transfers.
- Caching: Stores DNS records locally to improve query performance.
- DNSSEC: Provides cryptographic signatures to prevent DNS spoofing and other attacks.
- DNS over HTTPS: Encrypts DNS queries and responses for added security.
- Load balancing: Distributes traffic across multiple servers based on load.
- Failover: Provides redundancy and fault tolerance by directing traffic to backup servers in case of failures.
NS Record Types
- A record: Maps a domain name to an IPv4 address.
- AAAA record: Maps a domain name to an IPv6 address.
- CNAME record: Creates an alias for another domain name.
- MX record: Specifies the mail exchange servers for a domain.
- TXT record: Stores text information about a domain, such as SPF records for email authentication.
NS Servers
- Authoritative DNS servers: Store the authoritative records for a specific domain.
- Recursive DNS resolvers: Handle DNS queries from clients and may query other DNS servers to find the requested information.
- Caching DNS resolvers: Store DNS records locally to improve query performance.
NS Resolution Process
@startuml participant "Client" participant "DNS Resolver" participant "DNS Root Server" participant "TLD Server" participant "Authoritative DNS Server" "Client" -> "DNS Resolver": "DNS Query (e.g., example.com)" "DNS Resolver" -> "DNS Root Server": "Query Root (.)" "DNS Root Server" -> "DNS Resolver": "Response (Refer to .com TLD)" "DNS Resolver" -> "TLD Server": "Query TLD (.com)" "TLD Server" -> "DNS Resolver": "Response (Refer to authoritative server)" "DNS Resolver" -> "Authoritative DNS Server": "Query (example.com)" "Authoritative DNS Server" -> "DNS Resolver": "Response (IP address)" "DNS Resolver" -> "Client": "Response (IP address)" @enduml