Name Resolution - Many Steps of Name Resolution
DNS Overview
- The Domain Name System (DNS) converts human-readable domain names into machine-readable IP addresses.
- This process is referred to as name resolution, facilitating easier navigation of the internet for users who prefer names over numerical addresses.
Configuration of Computers on a Network
- For a computer to operate on a network, it requires several configurations:
- MAC Address: Hard-coded and unique to the network interface.
- IP Address: Assigned to identify the device on the network.
- Subnet Mask: Defines the network's subnetwork.
- Gateway: The access point for external networks (internet).
- DNS Server: The final piece required to resolve domain names to IP addresses.
- While a computer can function without a DNS server, it complicates user interactions as users cannot easily access websites by name.
Types of DNS Servers
- Caching Name Servers: Store responses to DNS queries temporarily to speed up future requests.
- Recursive Name Servers: Carry out full DNS resolution requests on behalf of clients.
- Root Name Servers: The top-level DNS servers that direct queries to appropriate TLD name servers.
- TLD Name Servers: Manage domain registrations for top-level domains (e.g., .com, .org).
- Authoritative Name Servers: Provide the actual IPs of domain names for specific organizations.
- Notably, a single DNS server can serve multiple roles simultaneously.
Recursive Name Resolution Example
- Scenario:
- You and a friend both want to visit facebook.com.
- Your friend's computer queries the local DNS server for the IP of www.facebook.com and does not find it in its cache, prompting a full resolution process.
- The DNS resolution involves the server querying root servers and then TLD servers until it reaches the authoritative server, obtaining the necessary IP.
- After the first resolution, the local DNS server caches the result, allowing your computer to retrieve the IP without repeating the full resolution process when you query the same website.
Time to Live (TTL)
- Each DNS entry has a TTL value, indicating how long a DNS server can cache that entry before needing to refresh it.
- TTL is set in seconds and can vary, often ranging from a few minutes to several hours, depending on the domain owner's preferences.
- Shorter TTLs can lead to quicker updates to DNS records across the internet, while longer TTLs help conserve bandwidth during a time of less internet speed.
DNS Lookup Process
- Contact Root Name Server:
- There are 13 root name servers globally, using Anycast for routing queries based on the client’s location.
- TLD Name Server:
- Responds with the TLD name server for the given domain (e.g., for www.facebook.com, it would be .com).
- Authoritative Name Server:
- Finally returns the IP address for the specific domain.
- Caching:
- The resolved IP is cached for future requests, improving efficiency.
Importance of Hierarchical DNS
- The hierarchical structure ensures stability and security in DNS lookups.
- Prevents malicious redirects as queries traverse through trusted entities before reaching an authoritative source.
- Local devices (e.g., phones, computers) often maintain their own temporary DNS cache to reduce load on local DNS servers.
Conclusion
- Understanding the DNS resolution process, server roles, and the importance of caching helps highlight the system's complexity and its significance in internet functionality.