0% found this document useful (0 votes)
36 views44 pages

Domain Name Service

PPT on DNS

Uploaded by

Sunita Bansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views44 pages

Domain Name Service

PPT on DNS

Uploaded by

Sunita Bansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Domain Name Service

Domain Name System


• DNS is a client/server application program used to help other application programs.
• DNS is used to map a host name in the application layer to an IP address in the network layer.
• To identify an entity, TCP/IP protocols use the IP address, which uniquely identifies
the connection of a host to the Internet. However, people prefer to use names
instead of numeric addresses. Therefore, we need a system that can map a name to
an address or an address to a name.
• When the internet was small host used to keep host file that maps the IP address
and Name.
• Today when internet is huge it is difficult to keep updated file for every change.
• One solution to keep one file and everyone will access this. But this will create huge
traffic on the internet.
• Another solution is to divide the huge information into smaller parts and store each
part on different computer.
• Host can map to closet computer holding the needed information. This method is
used by DNS.
• 1. The user passes the host name to the file transfer
DNS Working client.
• 2. The file transfer client passes the host name to the
DNS client.
• 3. Each computer , after being booted, knows the
address of one DNS server. The DNS client sends a
message to a DNS server with a query that gives the
file transfer server name using the known IP address
of the DNS server.
• 4. The DNS server responds with the IP address of the
desired file transfer server.
• 5. The DNS client passes the IP address to the file
transfer server.
• 6. The file transfer client now uses the received IP
address to access the file transfer server.
Name Space
• A name space that maps each address to a unique name can be organized in two ways:
Flat File System:
• A flat name space, a name is assigned to an address.
• A name in this space is a sequence of characters without structure.
• The names may or may not have a common section; if they do, it has no meaning.
• The main disadvantage of a flat name space is that it cannot be used in a large system such as the
Internet because it must be centrally controlled to avoid ambiguity and duplication or hierarchical.
Name Space
Hierarchical Name Space:
• In a hierarchical name space, each name is made of several parts.
• The first part can define the nature of the organization,
• The second part can define the name of an organization,
• The third part can define departments in the organization, and so on.
• In this case, the authority to assign and control the name spaces can be
decentralized.
• A central authority can assign the part of the name that defines the nature
of the organization and the name of the organization. The responsibility
of the rest of the name can be given to the organization.
Name Space
• The organization can add suffixes (or prefixes) to the name to define its host or resources.
• The management of the organization need not worry that the prefix chosen for a host is taken by another
organization because, even if part of an address is the same, the whole address is different.
• For example, assume two colleges and a company call one of their computer's challenger.
• The first college is given a name by the central authority such as fhda.edu, the second college is given the
name berkeley.edu, and the company is given the name smart.com.
• When each of these organizations adds the name challenger to the name they have already been given, the
end result is three distinguishable names: challenger.fhda.edu, challenger.berkeley.edu, and
challenger.smart.com.
• The names are unique without the need for assignment by a central authority. The central authority controls
only part of the name, not the whole
Domain Name Space
To have a hierarchical name space, a domain name space was designed. In this design the names are
defined in an inverted-tree structure with the root at the top. The tree can have only 128 levels: level 0
(root) to level
Label
Each node in the tree has a label, which is a string with a maximum of
63 characters. The root label is a null string (empty string). DNS
requires that children of a node (nodes that branch from the same node)
have different labels, which guarantees the uniqueness of the domain
names.

Domain Name
Each node in the tree has a domain name. A full domain name is a sequence of labels
separated by dots (.).
The domain names are always read from the node up to the root.
The last label is the label of the root (null). This means that a full domain name always
ends in a null label, which means the last character is a dot because the null string is
nothing.
Fully Qualified Name
•In the Domain Name System (DNS), a Fully Qualified Domain Name (FQDN) is the
complete, absolute address of a domain on the internet. It specifies the exact location of
a domain within the DNS hierarchy, providing a unique path from the root of the DNS tree
to the target hostname.
•An FQDN includes:
1. Hostname – The name of the specific host or server.
2. Domain Name – The name that identifies the domain (like example.com).
3. Top-Level Domain (TLD) – The highest level of the domain, such as .com, .net,
or .org.

• Root Domain – This is often implied as a trailing period at the end of the FQDN,
though it's typically not displayed
Fully Qualified Name
•Example
•If we take www.example.com., it breaks down as:
www (hostname)
example (domain)
.com (TLD)
. (root domain, often implied)
•So, www.example.com. is an FQDN because it gives the
exact address within the DNS hierarchy.
Fully Qualified Name
•Key Points
 An FQDN is necessary for locating resources on the internet accurately.
 It always ends with a root domain (even if the final period is implied).
 It differentiates the host from any other within the domain structure, ensuring there’s
no ambiguity in its location.
Partial Qualified Name
•A Partially Qualified Domain Name (PQDN) is an incomplete address within the
Domain Name System (DNS). Unlike a Fully Qualified Domain Name (FQDN), a PQDN
doesn’t specify the full path from the host to the DNS root and is therefore not globally
unique. PQDNs are typically used in local network settings or when the DNS context is
known, such as within an organization’s internal DNS setup.
•Example
•If the FQDN for a server is server1.sales.example.com., a PQDN might be just:
 server1 (hostname only)
 server1.sales (hostname and subdomain)
 server1.sales.example.com (missing the final . to indicate the root)
•In these cases, the DNS server infers the missing parts based on the local context or
appends a default domain suffix to complete the address.
Partial Qualified Name
•Key Points
 Not Globally Unique: PQDNs don’t specify the full DNS hierarchy, so they might not
work outside of the intended network context.
 Relative Reference: They rely on the DNS resolver to fill in missing components
based on search paths or suffixes configured in network settings.
 Common in Local Networks: Often used within internal networks where the context
(like example.com) is assumed.
Domain
• A domain is a subtree of the domain name space. The name of the domain is the name of the node at the top
of the subtree. A domain may itself be divided into domains (or subdomains as they are sometimes called).
Structure of a Domain Name

•A domain name typically includes:


1. Top-Level Domain (TLD): The highest level in the hierarchy, such as .com, .org, .net, or
country codes like .uk and .de.
2. Second-Level Domain (SLD): This is the unique name registered under a TLD, like
example in example.com.
3. Subdomains: Domains under the second-level domain, such as sales in sales.example.com.
4. Hostname: An individual device or service, like www in www.example.com, which points to
a specific IP address.
•In www.example.com:
 .com is the TLD.
 example is the SLD.
 www is a hostname or subdomain
Distribution of Name Space
• In the Domain Name System (DNS), the name space is distributed hierarchically to
manage internet addresses efficiently and ensure scalability. The distribution divides
the DNS into segments, with authority over each segment delegated to different
entities. This distributed, hierarchical approach allows different organizations to
manage their own namespaces under the global DNS framework.
Hierarchical Structure of the DNS Name Space

1. Root Domain:
o At the top of the hierarchy is the root domain, represented by an implied . (dot).
o The root domain contains the root servers, which manage information about the next level in the hierarchy,
the top-level domains (TLDs).
o There are a limited number of root servers globally, and they direct requests to the relevant TLD servers.

2. Top-Level Domains (TLDs):


o Directly beneath the root are TLDs such as .com, .org, .net, and country-specific codes like .uk and .jp.
o Each TLD is managed by a registry responsible for keeping records of second-level domains (SLDs) within
that TLD.
o TLDs are divided into generic TLDs (gTLDs) (e.g., .com, .org) and country-code TLDs (ccTLDs) (e.g., .us,
.de).
3. Second-Level Domains (SLDs):
o Beneath each TLD are second-level domains, like example in example.com.
o Organizations register these names with domain registrars and can manage all subdomains within their SLD.
Hierarchical Structure of the DNS Name Space

4. Subdomains:
o Subdomains (like sales.example.com) can be created by the owner of a second-level domain
to further organize resources.
o Subdomains can be distributed to represent different departments, services, or geographic
locations within an organization.
5. Hostnames:
o Hostnames identify specific machines or services within a domain, like www in
www.example.com.
o These ultimately resolve to IP addresses that direct internet traffic to specific servers.
•Delegation of Authority
•Each level of the hierarchy delegates control to the level below it, distributing authority and enabling
scalability:
1. Root servers delegate authority to TLD registries.
2. TLD registries delegate authority to organizations or individuals for specific second-level domains.
3. Organizations can create and manage their own subdomains and hostnames as they choose.
•Benefits of Distributed DNS Name Space
1. Scalability: The hierarchical and distributed model allows for virtually unlimited expansion.
2. Fault Tolerance: The distribution prevents any single point of failure, enhancing reliability.
3. Administrative Control: Each domain owner can manage their portion independently, allowing for
flexibility and autonomy.
•This distributed design is key to making the DNS system robust, scalable, and manageable across the
global internet.
Hierarchy of Name Server
• The solution to these problems is to distribute the information among many computers called DNS servers.
One way to do this is to divide the whole space into many domains based on the first level.
• In other words, we let the root stand alone and create as many domains (subtrees) as there are first-level
nodes. Because a domain created this way could be very large, DNS allows domains to be divided further into
smaller domains (subdomains). Each server can be responsible (authoritative) for either a large or small
domain. In other words, we have a hierarchy of servers in the same way that we have a hierarchy of names
Zone
• Instead, the hierarchy is divided among multiple servers, each responsible
for a specific section of the DNS namespace. This is managed through zones
and domains.
•Zones and Domains
 A domain is a specific part of the DNS hierarchy, like example.com, which may
include subdomains such as sales.example.com.

• A zone is a manageable part of the DNS namespace that a particular server has
authority over. In other words, a zone is a portion of the DNS hierarchy that a server is
responsible for. The server responsible for a zone is called the authoritative server
for that zone.
Scenario 1: No Subdivision of a
Domain
When a server takes responsibility for an entire domain and doesn’t delegate parts of it
to other servers:
 The domain and zone are the same.
 The authoritative server for that domain holds all DNS records in a zone file for every
node (or subdomain) within that domain.
 For example, if example.com is not divided, a single server will handle all DNS records
for example.com and any subdomains it may have, like www.example.com or
mail.example.com. Here, example.com represents both the domain and the zone.
Scenario 2: Division of a Domain into Subdomains

When a domain is large or complex, it may be beneficial to divide it into subdomains


and delegate parts of it to other servers:
 In this case, domain and zone refer to different things.
 The original server remains responsible for the domain (e.g., example.com), but it
delegates parts of the domain, such as sales.example.com, to another server.
 The zone for the original server then includes only the information it directly manages
and references (called delegation records) to point to the authoritative servers for
the delegated subdomains.
• Zone: The specific portion of the DNS tree that a server is directly responsible for.
•Domain: The broader DNS namespace, which might include multiple subdomains.
•Delegation: When a server delegates authority over a subdomain to another server, it references the lower-level
server instead of storing all subdomain data itself.
•Zone File: Contains detailed DNS records for the zone, but only references (delegations) for delegated
subdomains.
Root Server

• A root server is a server whose zone consists of the whole tree.


• A root server usually does not store any information about domains but delegates its authority to other
servers, keeping references to those servers.
• There are several root servers, each covering the whole domain name space. The root servers are distributed
all around the world.
Primary Server (Master Server)

•A primary DNS server (also called a master server) is the main server that holds the original, authoritative
copy of the DNS records for a particular zone. It is the primary source of information for all DNS queries about
the zone it manages.
 Zone File Management: The primary server has a writable zone file, meaning any updates or changes to
the DNS records are made directly on this server.
 Authority: It is authoritative for the DNS records in its zone and is responsible for propagating updates to
secondary servers.
 SOA (Start of Authority): The primary server includes an SOA record in its zone file, which indicates it is
the authoritative server for the zone.

Secondary Server (Slave Server)

• A secondary DNS server (or slave server) is a backup server that


contains a read-only copy of the DNS records for a zone. Secondary
servers provide redundancy and load balancing, improving the
reliability of DNS resolution for a zone.
• Replication from Primary Server: The secondary server
periodically receives updates from the primary server through a
process called zone transfer (AXFR or IXFR).
• Read-Only: Unlike the primary server, the secondary server cannot
modify the zone file; it simply mirrors the data provided by the
primary server.
• Failover and Redundancy: If the primary server becomes
unavailable, the secondary server can still respond to DNS queries,
ensuring continued resolution for the zone.
DNS in Internet
• Domain Name System (DNS) on the Internet, the domain name space is divided into three main sections:
generic domains, country domains, and the inverse domain.
•Generic Domains
•Generic domains represent broad categories or types of organizations and are primarily used for global or generic
purposes. These domains are designated by Top-Level Domains (TLDs) and fall under categories managed by
the Internet Corporation for Assigned Names and Numbers (ICANN).
•Examples of generic domains include:
 .com: Primarily used for commercial entities and businesses.
 .org: Originally intended for non-profit organizations.
 .net: Commonly used by network infrastructure entities but now open to general use.
 .edu: Reserved for accredited educational institutions, primarily in the United States.
 .gov: Reserved for government entities, primarily within the United States.

• .mil: Reserved for military organizations within the United States


• Newer gTLDs (generic Top-Level Domains) have also been introduced, like .info, .biz, and .online, allowing
more flexibility for specific types of organizations or businesses
Looking at the tree, we see that the first level in the generic domains section allows 14 possible labels
•Country Domains (ccTLDs)
•Country domains, or country-code Top-Level Domains (ccTLDs), are reserved for specific countries
or geographic regions, represented by two-letter codes based on the ISO 3166-1 standard. Each country
can control its ccTLD and set rules for usage, often managed by a designated national authority.
•Examples of country domains include:
 .us: United States
 .uk: United Kingdom
 .jp: Japan
 .ca: Canada
 .in: India
 .de: Germany
•Some countries have chosen to open their ccTLDs for broader usage, creating opportunities for domain
hacks (such as .co for companies or .io for tech startups) and unique branding.
Inverse Domain

•The inverse domain is used primarily for reverse DNS lookups. Instead of resolving a domain
name to an IP address (forward lookup), the inverse domain allows DNS to map an IP address
back to a domain name, which is useful for various network diagnostics, authentication, and
verification processes.
 Reverse DNS Lookup: The inverse domain is essential for reverse DNS lookups, where a
query uses an IP address to find the corresponding domain name. This can help verify the
identity of servers, assist with spam filtering, and facilitate logging for web services.
 Structure of the Inverse Domain: The inverse domain structure uses the in-addr.arpa
domain for IPv4 addresses and ip6.arpa for IPv6 addresses. IP addresses are stored in reverse
order under these domains:
o For IPv4, an address like 192.0.2.1 would be represented in the inverse domain as
1.2.0.192.in-addr.arpa.
o For IPv6, an address like 2001:0db8::1 would be represented in reverse notation under
ip6.arpa.
• Registrar
• How are the new domains added to DNS?
• This is done through a registrar, a commercial entity accredited by ICANN.
• A registrar first verifies that the requested domain name is unique and then enters it into the DNS database.
• A fee is charged
HTTP
HTTP
• HTTP (HyperText Transfer Protocol) is the foundation of data communication on the World
Wide Web. It is an application-layer protocol used for transmitting hypertext documents like
HTML. HTTP facilitates the communication between a client (browser) and a server (web
server).
•Key Features of HTTP
1. Stateless:
o Each HTTP request is independent. The server does not retain information about previous requests.
o State management can be implemented using cookies, sessions, or tokens.

2. Client-Server Model:
o The client (usually a web browser) initiates requests to the server.
o The server processes the request and sends back a response.

3. Text-Based:
o Communication is done using plain-text messages, making it simple and human-readable.

4. Flexible:
o Supports multiple data formats such as HTML, JSON, XML, images, videos, etc.
o Can be extended with methods, headers, and status codes.
HTTP Request

•The client sends a request to the server. A typical request contains:


•1. Request Line
 Method: Defines the type of request (e.g., GET, POST, PUT, DELETE).
 Resource: Specifies the requested resource (e.g., /index.html).
 HTTP Version: Indicates the HTTP version (e.g., HTTP/1.1).
•Example:
•bash
•Copy code
•GET /index.html HTTP/1.1
HTTP Request
•2. Headers
 Provide additional information about the request.
 Common headers include:
o Host: Specifies the server (e.g., Host: www.example.com).
o User-Agent: Details about the client (e.g., browser type).
o Accept: Specifies acceptable response formats.
•3. Body
 Optional, used for methods like POST to send data to the server.
 Example: Form data or JSON payload.
HTTP Response

•The server replies with a response, which includes:


•1. Status Line
 HTTP Version: The protocol version (e.g., HTTP/1.1).
 Status Code: Indicates the result of the request (e.g., 200, 404).
 Reason Phrase: Describes the status code (e.g., "OK", "Not Found").
•Example:
•Copy code
•HTTP/1.1 200 OK
HTTP Response
•2. Headers
 Provide metadata about the response.
 Common headers include:
o Content-Type: Indicates the media type (e.g., text/html).
o Content-Length: Specifies the size of the response body.
•3. Body

 Contains the requested resource or error message.

• Example: HTML content or JSON data.


Methods

Method Description

GET Requests data from the server (e.g., fetch a web page).

POST Submits data to the server (e.g., form submission).

PUT Updates a resource on the server.

DELETE Deletes a resource from the server.

HEAD Similar to GET, but only retrieves headers, not the body.

OPTIONS Describes the communication options for the target resource.

PATCH Partially updates a resource.


Status Code

Code Range Description Examples

1xx Informational 100 Continue

2xx Success 200 OK, 201 Created

3xx Redirection 301 Moved Permanently, 302 Found

4xx Client Errors 400 Bad Request, 404 Not Found

5xx Server Errors 500 Internal Server Error, 503 Service Unavailable
•Advantages of HTTP
 Simple and widely adopted.
 Extensible with headers, methods, and status codes.
 Compatible with multiple data formats.
•Limitations of HTTP
 Statelessness: Cannot inherently remember user interactions.
 Unencrypted by Default: Data is sent as plain text unless HTTPS is used.
 Overhead: Repeated headers and metadata can increase size.
Types of web pages
• Static Documents: Static documents are pre-written, unchanging
files stored on the server. When a user requests these documents,
the server delivers them exactly as they are.
• Dynamic Documents: Dynamic documents are generated by the
server in response to user requests. The content is created or
modified dynamically, based on input or context.
• Active Documents: Active documents are interactive and can
change on the client-side after being delivered by the server. They
often rely on client-side scripting or plugins.
• Characteristics:
• Changes occur dynamically in the browser without needing to reload the
page.
• Use technologies like JavaScript, AJAX, or WebAssembly.
• Non-Persistent Connection
• A separate TCP connection is established for each HTTP
request-response pair.
• After the server sends the response, the connection is
closed.
• Persistent Connection
• A single TCP connection is kept open for multiple HTTP
request-response pairs.
• The connection is not closed immediately after a
response and can be reused for subsequent requests
Cookies
• Cookies are small text files stored on a user's device (computer, smartphone, etc.) by a web
browser when visiting a website. They are used to remember information about the user,
enabling the website to provide a more personalized and efficient browsing experience.
• Types of Cookies
1.Session Cookies
1. Temporary and deleted when the browser is closed.
2. Used for activities like keeping a user logged in during a session.
2.Persistent Cookies
1. Stored on the user’s device for a predefined period or until manually deleted.
2. Used to remember login details, language preferences, or items in a shopping cart.
3.First-party Cookies
1. Created by the website being visited directly.
2. Used for basic functionality like remembering user preferences.
4.Third-party Cookies
1. Created by domains other than the one the user is visiting.
2. Commonly used for advertising and tracking user behavior across websites

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy