- Blog Categories
- Project Management
- Agile Management
- IT Service Management
- Cloud Computing
- Business Management
- Business Intelligence
- Quality Engineer
- Cyber Security
- Career
- Big Data
- Programming
- Most Popular Blogs
- PMP Exam Schedule for 2024: Check PMP Exam Date
- Top 60+ PMP Exam Questions and Answers for 2024
- PMP Cheat Sheet and PMP Formulas To Use in 2024
- What is PMP Process? A Complete List of 49 Processes of PMP
- Top 15+ Project Management Case Studies with Examples 2024
- Top Picks by Authors
- Top 170 Project Management Research Topics
- What is Effective Communication: Definition
- How to Create a Project Plan in Excel in 2024?
- PMP Certification Exam Eligibility in 2024 [A Complete Checklist]
- PMP Certification Fees - All Aspects of PMP Certification Fee
- Most Popular Blogs
- CSM vs PSM: Which Certification to Choose in 2024?
- How Much Does Scrum Master Certification Cost in 2024?
- CSPO vs PSPO Certification: What to Choose in 2024?
- 8 Best Scrum Master Certifications to Pursue in 2024
- Safe Agilist Exam: A Complete Study Guide 2024
- Top Picks by Authors
- SAFe vs Agile: Difference Between Scaled Agile and Agile
- Top 21 Scrum Best Practices for Efficient Agile Workflow
- 30 User Story Examples and Templates to Use in 2024
- State of Agile: Things You Need to Know
- Top 24 Career Benefits of a Certifed Scrum Master
- Most Popular Blogs
- ITIL Certification Cost in 2024 [Exam Fee & Other Expenses]
- Top 17 Required Skills for System Administrator in 2024
- How Effective Is Itil Certification for a Job Switch?
- IT Service Management (ITSM) Role and Responsibilities
- Top 25 Service Based Companies in India in 2024
- Top Picks by Authors
- What is Escalation Matrix & How Does It Work? [Types, Process]
- ITIL Service Operation: Phases, Functions, Best Practices
- 10 Best Facility Management Software in 2024
- What is Service Request Management in ITIL? Example, Steps, Tips
- An Introduction To ITIL® Exam
- Most Popular Blogs
- A Complete AWS Cheat Sheet: Important Topics Covered
- Top AWS Solution Architect Projects in 2024
- 15 Best Azure Certifications 2024: Which one to Choose?
- Top 22 Cloud Computing Project Ideas in 2024 [Source Code]
- How to Become an Azure Data Engineer? 2024 Roadmap
- Top Picks by Authors
- Top 40 IoT Project Ideas and Topics in 2024 [Source Code]
- The Future of AWS: Top Trends & Predictions in 2024
- AWS Solutions Architect vs AWS Developer [Key Differences]
- Top 20 Azure Data Engineering Projects in 2024 [Source Code]
- 25 Best Cloud Computing Tools in 2024
- Most Popular Blogs
- Company Analysis Report: Examples, Templates, Components
- 400 Trending Business Management Research Topics
- Business Analysis Body of Knowledge (BABOK): Guide
- ECBA Certification: Is it Worth it?
- How to Become Business Analyst in 2024? Step-by-Step
- Top Picks by Authors
- Top 20 Business Analytics Project in 2024 [With Source Code]
- ECBA Certification Cost Across Countries
- Top 9 Free Business Requirements Document (BRD) Templates
- Business Analyst Job Description in 2024 [Key Responsibility]
- Business Analysis Framework: Elements, Process, Techniques
- Most Popular Blogs
- Best Career options after BA [2024]
- Top Career Options after BCom to Know in 2024
- Top 10 Power Bi Books of 2024 [Beginners to Experienced]
- Power BI Skills in Demand: How to Stand Out in the Job Market
- Top 15 Power BI Project Ideas
- Top Picks by Authors
- 10 Limitations of Power BI: You Must Know in 2024
- Top 45 Career Options After BBA in 2024 [With Salary]
- Top Power BI Dashboard Templates of 2024
- What is Power BI Used For - Practical Applications Of Power BI
- SSRS Vs Power BI - What are the Key Differences?
- Most Popular Blogs
- Data Collection Plan For Six Sigma: How to Create One?
- Quality Engineer Resume for 2024 [Examples + Tips]
- 20 Best Quality Management Certifications That Pay Well in 2024
- Six Sigma in Operations Management [A Brief Introduction]
- Top Picks by Authors
- Six Sigma Green Belt vs PMP: What's the Difference
- Quality Management: Definition, Importance, Components
- Adding Green Belt Certifications to Your Resume
- Six Sigma Green Belt in Healthcare: Concepts, Benefits and Examples
- Most Popular Blogs
- Latest CISSP Exam Dumps of 2024 [Free CISSP Dumps]
- CISSP vs Security+ Certifications: Which is Best in 2024?
- Best CISSP Study Guides for 2024 + CISSP Study Plan
- How to Become an Ethical Hacker in 2024?
- Top Picks by Authors
- CISSP vs Master's Degree: Which One to Choose in 2024?
- CISSP Endorsement Process: Requirements & Example
- OSCP vs CISSP | Top Cybersecurity Certifications
- How to Pass the CISSP Exam on Your 1st Attempt in 2024?
- Most Popular Blogs
- Best Career options after BA [2024]
- Top Picks by Authors
- Top Career Options & Courses After 12th Commerce in 2024
- Recommended Blogs
- 30 Best Answers for Your 'Reason for Job Change' in 2024
- Recommended Blogs
- Time Management Skills: How it Affects your Career
- Most Popular Blogs
- Top 28 Big Data Companies to Know in 2024
- Top Picks by Authors
- Top Big Data Tools You Need to Know in 2024
- Most Popular Blogs
- Web Development Using PHP And MySQL
- Top Picks by Authors
- Top 30 Software Engineering Projects in 2024 [Source Code]
- More
- Tutorials
- Practise Tests
- Interview Questions
- Free Courses
- Agile & PMP Practice Tests
- Agile Testing
- Agile Scrum Practice Exam
- CAPM Practice Test
- PRINCE2 Foundation Exam
- PMP Practice Exam
- Cloud Related Practice Test
- Azure Infrastructure Solutions
- AWS Solutions Architect
- AWS Developer Associate
- IT Related Pratice Test
- ITIL Practice Test
- Devops Practice Test
- TOGAF® Practice Test
- Other Practice Test
- Oracle Primavera P6 V8
- MS Project Practice Test
- Project Management & Agile
- Project Management Interview Questions
- Release Train Engineer Interview Questions
- Agile Coach Interview Questions
- Scrum Interview Questions
- IT Project Manager Interview Questions
- Cloud & Data
- Azure Databricks Interview Questions
- AWS architect Interview Questions
- Cloud Computing Interview Questions
- AWS Interview Questions
- Kubernetes Interview Questions
- Web Development
- CSS3 Free Course with Certificates
- Basics of Spring Core and MVC
- Javascript Free Course with Certificate
- React Free Course with Certificate
- Node JS Free Certification Course
- Data Science
- Python Machine Learning Course
- Python for Data Science Free Course
- NLP Free Course with Certificate
- Data Analysis Using SQL
- Home
- Blog
- Cloud Computing
- What Is DNS and How Does It Work?
What Is DNS and How Does It Work?
Updated on Aug 30, 2019 | 5 min read | 8.4k views
Share:
Table of Contents
DNS stands for “Domain Name System”, which is a massive directory distributed across the world. In other words, DNS serves the purpose of the phonebook for the internet. It functions so instantaneously and seamlessly that we don’t realize how much we use it every day.
We can understand DNS through a basic analogy. In a phonebook, we usually type a name whose number we need to check, we need not memorize the person’s contact number. The same service is provided by a DNS. Every device connected across the internet has a unique IP address. This IP address is used by the machines to interact with each other. Domain names are human-readable names that we enter into a web browser to access a website. Domain names are analogous to the names in the phonebook, while the IP address is the corresponding contact number. Computers interact through IP addresses which are complex strings of alphanumeric characters. Basically, DNS translates domain names to corresponding IP addresses to identify the different computers across the world. There can be more than one IP address associated with a domain name. Check out learning Cloud Computing for more information.
A Brief History of DNS
Around thirty years back, when the internet was introduced, people needed to memorize the IP address of the website that they wanted to visit. Computers being digital machines were able to communicate only through numbers. As the internet age began, the number of websites started to grow from hundreds to tens of thousands. The increasing number of IP addresses made it difficult for people to memorize. Paul Mockapetris in early 1980s introduced a system that was able to automatically map the domain names to its corresponding IP addresses. This led to the birth of the DNS which serves as a backbone of Internet till today.
Do You Want to Make Career in Cloud Computing? Find a list of top AWS Certifications.
Types of queries:
There are mainly 2 types of queries:
- Recursive DNS query: When the DNS user directly gets the IP address of the desired domain by querying the corresponding name server, this is called recursive query. During this process, the DNS server might also query other DNS servers on the internet.
- Non-recursive query: The DNS user navigates through various levels of servers like root name servers, TLDs, and authoritative name servers to query the required IP address corresponding to the domain name.
How does DNS work?
Master Right Skills & Boost Your Career
Avail your free 1:1 mentorship session
The basic function of a DNS is to convert the user-friendly domain name into a corresponding computer-friendly IP address. Let’s look at the various steps:
- Information request: When you type the domain name while visiting a website, you are asking your computer to resolve a particular hostname. The first step performed by your computer is that it looks for the IP address corresponding to your domain name in the local DNS cache, which stores information regarding your previously visited websites. In case you have not visited that website before, the computer performs a DNS query.
- Ask recursive DNS servers: If the information is not stored locally, your computer contacts the recursive DNS resolvers or servers from your Internet Service Providers(ISPs). These resolvers have their own cache. Since many users use the same ISP, chances are that the common and popular websites are already cached. In this case, the required information is returned to the user and the process ends here.
- Ask root name servers: In case the information is not provided by recursive servers or the data is outdated, they query the root name servers. The root name servers publish root zone file contents to the internet. The root name servers do not provide the IP addresses but redirect queries to other servers that might provide the required answer.
- Top-level domain(TLD) name servers: The root name servers read the request from right to left and direct you to the top-level domain name servers. For example, information like .com, org, etc, corresponds to a TLD which has its own set of servers for these. The TLDs don't provide the IP address directly but direct your queries to the appropriate server.
- Authoritative name servers: The TLD servers read the next part of the query and direct it to the particular name server called authoritative name servers. These DNS servers are configured for different zones and provide related information. They store the original zone records and don’t cache the query results. These name servers can be present at the DNS provider or where the website is hosted. The authoritative name servers have different kinds of records, for example, we want to know the IP address, so we ask for the address record. This server lies at the bottom of the DNS lookup chain.
- Retrieve the record: The recursive server retrieves the required record from the authoritative name servers and stores it in its local cache. This serves to reduce the effort for a new lookup process while visiting the same website again. All the records maintain a time to live (TTL) value, which determines when the data will get expired, which helps ensure the data is up to date always.
- Receive the answer: The recursive server returns the required answer to your local computer which further caches this record. Your computer reads this record and returns the IP address to your browser. The browser opens a particular website by connecting to the webserver. This entire process is completed within a fraction of a second.
What is a DNS address?
To understand this even better, we must have a precise knowledge of domain name and IP address. An Internet Protocol address (IP address) is a unique numeric address that is accredited to every single device that uses an Internet Protocol-based network. Basically, with the help of an IP address, devices recognise each other on a network. A simple example of an IP address is 67.81.32.3.
A domain name is an understandable way of identifying entities on a network; any particular website can be accessed by a domain name. For example, Microsoft is the domain for the website microsoft.com.
Every domain name has one or more than one IP addresses assigned to it. DNS matches the domain name with the IP address accredited to it and fetches the right webpage for the user. For a user, it is more convenient to remember a domain name than an IP address but the computer understands only in binary numbers hence the DNS transcripts the domain into IP addresses with the help of DNS servers.
What is a DNS server?
A DNS server is a vast storehouse of domain names and their relevant IP addresses and helps to retrieve the IP addresses from the domain name or the hostname. We can deduce that the DNS server is the major element that incorporates the DNS protocol and serves the Web Hosts and clients on an IP based network. It bridges the gap between the humans and the computers.
Primary and Secondary DNS server
There are two basic types of DNS servers: Primary and Secondary servers.
A primary server is responsible for the administration of the domain and it gets its information directly from the local files. It hosts the controlling zone file whereas Secondary servers get their information from a primary server in communication known as a zone transfer and contain read-only copies of the zone file.
DNS root servers
The Domain Name System is organised in a hierarchy with different managing areas also known as zones and root servers are at the top of this hierarchy. Thirteen root servers are used to query the different root server networks. These are arranged in alphabetical order from A to M, the first 13 letters of the alphabet.
Resolving DNS Server Queries
A DNS query without any caching is solved by the help of mainly four servers which are recursive resolvers, root nameservers, TLD nameservers, and authoritative nameservers. The query from the client is received by the DNS resolver which then looks up the IP address. The resolver then itself starts enacting as a client and then asks the rest three servers to fetch the correct IP address.
First, the root server converts the domain into IP address and responds the resolver with the Top Level Domain servers that stores all the details of the domain servers. Now the TLD responds to the resolver with the IP address of the domain’s authoritative nameserver. The authoritative nameserver responds with the IP address of the origin server on the query of the recursor.
Finally the resolver sends the origin server IP address to the client and in turn, the client can directly resolve its query with the origin server.
DNS caching
Cached data can also be used to resolve DNS queries apart from the above process used by the recursor. Once an IP address is obtained for the website, it can be saved as a cache for about 24 hours so that meanwhile any other user requests for the same IP address, it can be directly retrieved from the cache thus avoiding all the hassle. But after 24 hours, the resolver has to create a new cache.
DNS Server Failure
DNS server could fail due to varied reasons such as:
- Hardware malfunctions
- Malware attacks
- Power outage
- Cyber attacks etc.
Earlier DNS server outage had a significant impact on the business but today due to server monitoring TLD nameservers, root DNS servers and backup recursive, it has become more efficient in resolving the issues. Though most of the outage and failure may be solved, one must have a DNS failover implemented so that if there are any DNS server outage, one can very easily be transferred to another DNS server without the knowledge of the end-user.
DNS attack
- DNS spoofing - Also known as cache poisoning, DNS spoofing is a form of computer system hacking in which the malware creator secretly gains access to the information and alters the cache, such that the user may type an authentic domain name but the manipulated DNS system transfers the user to an alternate server fraudulently. Keeping your antivirus and anti-malware up to date and running a scan on a regular basis will help avoid the spoof.
- DNS Hijacking - It is a malicious attack in which the malware attacks the local computer and manipulates the TCP/IP settings and transfers the user to the hacker’s server. This can be easily prevented by the use of an antivirus.
- Phishing - It is a cybercrime in which atrocious hackers develop spam websites, which is similar to the common bank webpages, payment sites, or gaming sites to lure individuals into providing sensitive data such as passwords, banking details, etc. Many antivirus solutions provide a layer of protection designed to prevent phishing attacks. Also, it is important to keep an eye on the domain address and not fall for the fake ones.
- DNS reflection attacks - The malware creator floods the user with innumerable messages from DNS resolver servers and the attackers ask for large DNS files from the resolver using the fraud IP address of the victim. On responding to the messages by the resolver, the victim’s machine is swarmed by the unrequested DNS data which overburdens the machine.
How can you protect yourself?
These are the few precautions that can help you mitigate the effects of an attack. Some of these are:
- Monitor DNS servers for abnormal behaviour like: Increase in the number of unique subdomains being queried or increase in the number of timeouts or delayed response.
- Restricting packets with a spoofed IP address from exiting your network.
- Updating antivirus and anti-malware regularly.
- Keeping a keen eye on the address bar.
DNSSec
Internet Corporation for Assigned Names and Numbers (ICANN), the organization in charge of the DNS system invented DNS Security Extensions to secure and ease up the interaction between the various levels of servers during lookup. DNSSEC devised a system where each level of DNS server digitally sign its requests, which makes it certain that the requests sent in by end-users aren’t appropriated by attackers. Moreover, DNSSec can verify whether a domain name exists and if it doesn’t then it protects the client and the servers from the infiltrated domain.
Get Free Consultation
By submitting, I accept the T&C and
Privacy Policy