Uploaded by cse programmer

Shamim Assignment 2 CSE4132 Principle of Distributed System

advertisement
Bangladesh Open University
Study CenterDhaka University of Engineering & Technology, Gazipur
Department of CSE
Assignment
Principles of Distributed Systems
Course code: CSE4132
Assignment no:
Submission Date:
02
3 November 2021
Submitted To
Submitted By
Dr. Mohammod Abul Kashem
Shamim Ahammad
Professor
Department of CSE
DUET, Gazipur-1707.
ID: 16-0-52-020-017
Year/Semester: 4th year 1st semester
Term: 201
Brefly discuss on Domain Name System
DNS:
The Domain Name System (DNS) is the Internet's system for mapping alphabetic names to
numeric Internet Protocol (IP) addresses like a phone book maps a person's name to a phone number.
For example, when a Web address (URL) is typed into a browser, a DNS query is made to learn an IP
address of a Web server associated with that name. Using the URL, is the domain name, and www is the
hostname. DNS resolution maps www.example.com into an IP address (such as 192.0.2.1). When a user
needs to load a webpage, a conversion must occur between what a user types into their web browser
into an IP address required to locate the site. The DNS system is an open worldwide network of
database name servers that include 13 authoritative name servers that serve the DNS root zone level,
known as "root servers". A root server (also called a DNS root nameserver) receives a DNS query that
includes a domain name and responds by directing that request to a toplevel domain (TLD) nameserver,
based on the TLD of that domain such as .com, .net, and .org. It directly responds to requests for DNS
records in the root zone by returning an appropriate list of the authoritative TLD name servers for the
appropriate TLD that can resolve the initial DNS lookup request for an IP address of that domain name.
The 3 types of DNS servers and how they work
The three DNS server types server are the following:



DNS stub resolver server.
DNS recursive resolver server.
DNS authoritative server.
DNS stub resolver server-A DNS resolver (recursive resolver), is designed to receive DNS queries, which
include a human-readable hostname such as “www.example.com”, and is responsible for tracking the IP
address for that hostname.
DNS recursive resolver server-A recursive resolver (also known as a DNS recursor) is the first stop in a
DNS query. The recursive resolver acts as a middleman between a client and a DNS name server. During
this process, the recursive resolver will cache information received from authoritative name servers.
DNS authoritative server- The authoritative DNS server is the final holder of the IP of the domain you
are looking for. When you write a domain name in your browser, a DNS query is sent to your internet
service provider (ISP). The ISP has a recursive server, which might have the needed information cached
in its memory.
There are three types of queries in the DNS system:
Recursive Query
In a recursive query, a DNS client provides a hostname, and the DNS Resolver “must” provide an
answer—it responds with either a relevant resource record, or an error message if it can't be found. The
resolver starts a recursive query process, starting from the DNS Root Server, until it finds the
Authoritative Name Server (for more on Authoritative Name Servers see DNS Server Types below) that
holds the IP address and other information for the requested hostname.
Iterative Query
In an iterative query, a DNS client provides a hostname, and the DNS Resolver returns the best answer it
can. If the DNS resolver has the relevant DNS records in its cache, it returns them. If not, it refers the
DNS client to the Root Server, or another Authoritative Name Server which is nearest to the required
DNS zone. The DNS client must then repeat the query directly against the DNS server it was referred to.
Non-Recursive Query
A non-recursive query is a query in which the DNS Resolver already knows the answer. It either
immediately returns a DNS record because it already stores it in local cache, or queries a DNS Name
Server which is authoritative for the record, meaning it definitely holds the correct IP for that hostname.
In both cases, there is no need for additional rounds of queries (like in recursive or iterative queries).
Rather, a response is immediately returned to the client.
10 Top DNS Record Types
DNS servers create a DNS record to provide important information about a domain or hostname,
particularly its current IP address. The most common DNS record types are:










Address Mapping record (A Record)—also known as a DNS host record, stores a hostname and
its corresponding IPv4 address.
IP Version 6 Address record (AAAA Record)—stores a hostname and its corresponding IPv6
address.
Canonical Name record (CNAME Record)—can be used to alias a hostname to another
hostname. When a DNS client requests a record that contains a CNAME, which points to another
hostname, the DNS resolution process is repeated with the new hostname.
Mail exchanger record (MX Record)—specifies an SMTP email server for the domain, used to
route outgoing emails to an email server.
Name Server records (NS Record)—specifies that a DNS Zone, such as “example.com” is
delegated to a specific Authoritative Name Server, and provides the address of the name server.
Reverse-lookup Pointer records (PTR Record)—allows a DNS resolver to provide an IP address
and receive a hostname (reverse DNS lookup).
Certificate record (CERT Record)—stores encryption certificates—PKIX, SPKI, PGP, and so on.
Service Location (SRV Record)—a service location record, like MX but for other communication
protocols.
Text Record (TXT Record)—typically carries machine-readable data such as opportunistic
encryption, sender policy framework, DKIM, DMARC, etc.
Start of Authority (SOA Record)—this record appears at the beginning of a DNS zone file, and
indicates the Authoritative Name Server for the current DNS zone, contact details for the
domain administrator, domain serial number, and information on how frequently DNS
information for this zone should be refreshed.
How DNS Servers Work
The DNS directory is distributed worldwide, stored in special servers called dns servers (i.e., “domain
name servers”) that are interconnected and communicate regularly to synchronize directory
information and create redundancy.
The DNS Lookup Process
The purpose of DNS is to translate a domain name into the appropriate IP address. This is done by
looking up the dns records of the requested domain. There are typically eight steps in this DNS lookup
process that follow the information path from the originating web browser to the DNS server and back
again. In practice, DNS information is often cached to reduce the DNS lookup response time. When the
DNS information is not cached, the eight-step lookup process is as follows:
The eight steps in a DNS lookup:
1. A user enters a domain name (e.g., facebook.com) into their browser, and the browser sends
the query via their internet service provider ISP to a DNS recursive resolver.
2. The DNS recursive resolver, in turn, sends a query to the root DNS nameserver.
3. The root server returns to the resolver the address of the top-level domain (i.e., “TLD”) DNS root
server, which has the needed information for the facebook.com domain. (Examples of a toplevel domain tld include “.com”, “.net”, and “.org,” which each TLD having its own root DNS
server.)
4. In turn, the resolver then sends the information request to the Top-Level Domain server (In this
case, the “.com” TLD nameserver).
5. The TLD name server responds to the resolver with the targeted IP address of the domain’s
nameserver. (In this case, the DNS server for “facebook.com”.)
6. Next, the DNS recursive resolver sends the query to the domain’s DNS server.
7. The domain’s DNS server then returns the IP address to the DNS resolver for the requested
domain (e.g.,“facebook.com”).
8. Finally, the DNS resolver returns the IP address of the requested domain to the requesting web
browser. The browser sends the HTTPS request to the targeted IP address, and the server with
that address returns the webpage, which renders in the user’s browser.
DNS servers and IP addresses
A DNS server stores specific information that pairs a domain name with particular IP addresses. A
domain may have one or hundreds of IP addresses associated with it. Amazon.com, for example, has
thousands of servers across the globe, and the physical server that a user connects within one country is
likely completely different from another user elsewhere around the world. The global nature of Internet
services requires a network of distributed and scalable DNS servers to ensure that users can quickly look
up and resolve the requested server’s location, wherever they are around the globe.
Download