Rakesh Jain
Rakesh Jain

@devops_tech

37 Tweets 5 reads Oct 11, 2023
Mastering DNS (Domain Name System)!
A Thread explaining DNS Terminology and its Workflow 👇💻
1/ 💡 DNS, or Domain Name System, is like the internet's phonebook. It translates human-friendly domain names (like google[dot]com) into IP addresses, which computers use to identify each other. Let's dive into some key concepts!
2/ 🌐 Domain Name:
A domain name, e.g., amazon[com]com, is a user-friendly alias for an IP address. DNS associates this name with the server's IP, making it easy for us to access websites.
3/ 🏢 Nameservers:
Think of nameservers as DNS librarians. They store and manage domain-to-IP mappings. Your hosting provider typically runs them.
4/ 🔄 DNS Resolution:
When you type a domain name in your browser, your computer performs DNS resolution. It asks the DNS server to find the corresponding IP address.
5/ 📡 DNS Server:
DNS servers store records of domain-to-IP mappings. There are authoritative DNS servers, like the source, and recursive DNS servers that help you find it.
6/ 📬 DNS Query:
This is like sending a letter. Your computer sends a query to a DNS server, asking for the IP address associated with a domain name.
7/ 🏁 DNS Record:
DNS servers keep records that include the domain name, IP address, and other information like mail server settings (MX records).
8/ 🌍 Top-Level Domain (TLD):
.com, .org, .net are examples. These are at the highest level of the DNS hierarchy, just under the root domain.
9/ 🔀 Caching:
DNS servers cache records to speed up future requests. It's like bookmarking frequently visited sites for quick access.
10/ ⏳ Time-to-Live (TTL):
TTL in DNS records specifies how long the record can be cached. Short TTLs are like post-its; long TTLs are like sticky notes.
11/ 🧑‍💻 Recursive DNS Resolver:
Your ISP's DNS server or public DNS services like Google's act as your computer's middlemen, finding the IP for you.
12/ 🧭 Root Server:
The highest level of DNS. There are 13 root servers worldwide. They point to TLD servers, helping resolve queries step by step.
13/ 🔐 DNSSEC:
DNS Security Extensions add a layer of security by verifying the authenticity of DNS data, protecting against DNS spoofing and attacks.
14/ 🆔 A Record:
It's a fundamental DNS record, mapping a domain to an IPv4 address. For example, google[dot]com resolves to 172.217.20.142.
15/ 💌 MX Record:
This points to the mail server responsible for receiving email for a domain. It's essential for email delivery.
16/ 📈 DNS Load Balancing:
Websites use DNS to distribute traffic across multiple servers, ensuring better performance and redundancy.
17/ 🚀 Anycast:
It's a technique where multiple servers share the same IP address. The closest one to the user responds, enhancing speed and reliability.
18/ 📃 CNAME Record:
A Canonical Name record is like a shortcut. It maps one domain name to another. Useful when one domain points to the same place as another.
19/ 🛡️ DDoS Mitigation:
DNS providers can protect against Distributed Denial of Service attacks by routing traffic through scrubbing centers to filter malicious traffic.
20/ 🏪 Geolocation:
DNS can be used to route users to the nearest server based on their geographic location, ensuring faster loading times.
21/ 🔍 Reverse DNS:
Instead of translating domain names to IP addresses, reverse DNS resolves IP addresses to domain names, useful for verifying server identity.
22/ 🌐 Dynamic DNS:
Handy for home networks. It automatically updates DNS records when your dynamic IP address changes, allowing remote access to your devices.
Remember, DNS is the unsung hero of the internet, working behind the scenes to make your web browsing experience seamless. 🌐 #DNSExplained #Tech #Internet
How DNS (Domain Name System) works in 10 steps 👇
1/ 🌐 DNS Resolution Initiation:
When you enter a web address (like google[dot]com) in your browser, your computer initiates DNS resolution to find the IP address of the server hosting that website.
2/ 🔄 Your Device's Query:
Your computer first checks its local cache (a sort of memory) to see if it already knows the IP for google[dot]com. If not, it sends a DNS query to your ISP's DNS server.
3/ 🔗 ISP's DNS Server:
Your Internet Service Provider's DNS server is like a librarian. It may have the answer or it'll reach out to other DNS servers to find it.
4/ 🔍 Recursive Query:
The ISP's DNS server makes a "recursive" query on your behalf. If it knows the IP address, it responds immediately; otherwise, it continues the search.
5/ 🔗 Root DNS Server:
If the ISP's server doesn't have the answer, it queries the root DNS servers. These servers point the way to the Top-Level Domain (TLD) servers.
6/ 🌍 TLD Server Query:
The TLD servers (like .com) are queried next. They provide info about which authoritative DNS server handles the specific domain (e.g., google[dot]com).
7/ 🏢 Authoritative DNS Server:
The authoritative DNS server for google[dot]com is queried. It holds the IP address associated with the domain.
8/ 📃 DNS Record Retrieval:
The authoritative server sends the requested DNS record (A record) containing the IP address for google[dot]com back to the ISP's DNS server.
9/ 🚀 Returning the IP:
The ISP's DNS server caches this information and returns the IP address to your computer.
10/ 🌐 Successful Resolution:
Your computer now knows the IP address for google[dot]com and can connect to the website's server to load the page. The DNS process is complete!
In these 10 steps, DNS efficiently translates human-readable domain names into the IP addresses necessary for data to flow on the internet. #DNSExplained #Internet #Tech
Repost the thread if you find it useful. Thanks!

Loading suggestions...