Domain Name Service
Domain Name Service
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
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.
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
•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)
•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
Method Description
GET Requests data from the server (e.g., fetch a web page).
HEAD Similar to GET, but only retrieves headers, not the body.
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