17th October Lecture
17th October Lecture
SPC 2313
CLASS: COMPUTER STUDIES
LECTURER: STEPHEN MAINA
smaina@kyu.ac.ke
0721767439
human-friendly domain names into the numerical IP addresses required for data packets
Fundamental Role: DNS serves as the internet's address book, making it possible for
users to access websites, send emails, and connect with various online services by simply
Human-Readable Addresses: In the early days of the internet, when it was primarily
addresses. This was inconvenient and prone to error. DNS was introduced to alleviate
addresses.
Scalability: As the internet grew exponentially, maintaining a central list of all domain
names and their corresponding IP addresses became impractical. DNS was the solution,
DNS Operation
Translating Domain Names: DNS translates domain names into IP addresses, a process
commonly referred to as "DNS resolution." When you enter a URL in your web browser
or send an email, your device initiates a DNS query to resolve the domain name into an
IP address.
servers responsible for different parts of the domain name hierarchy. The root servers,
top-level domain (TLD) servers, and authoritative name servers work together to fulfill
DNS queries.
Routing Data Packets: DNS plays a fundamental role in internet routing. When you
access a website or send an email, DNS ensures your data packets are correctly directed
Load Balancing: DNS can also facilitate load balancing by directing traffic to different IP
addresses associated with a single domain. This helps ensure that web services remain
DNS Evolution
Continual Development: DNS has evolved over time to meet the growing demands of
the internet. The most recent development is DNS over HTTPS (DoH), which enhances
signatures designed to enhance the security and integrity of the Domain Name System
(DNS). DNS is a critical component of the internet, responsible for translating human-
vulnerabilities within the DNS infrastructure, including DNS cache poisoning, man-in-
Digital Signatures: DNSSEC adds digital signatures to DNS resource records. These
signatures are created using public-key cryptography and are used to verify the
Top-level domains (TLDs) and root domains have their own cryptographic keys, and
domain owners can sign their own DNS records with their keys. These keys are made
Chain of Trust: DNSSEC establishes a chain of trust from the root DNS servers down to
the specific domain being queried. Each level of the DNS hierarchy signs the keys of the
level below it, creating a cryptographic chain that ensures the authenticity of DNS data.
Data Integrity: With DNSSEC, DNS resolvers can validate that the DNS data received has
Data Origin Authentication: DNSSEC provides a means to authenticate the origin of DNS
Securing the Root: The root zone of the DNS, managed by the Internet Assigned Numbers
Authority (IANA), is signed with DNSSEC, serving as the foundation of the trust chain.
Key Rollover: DNSSEC allows for the periodic changing of cryptographic keys to
maintain security. This is done through key rollover mechanisms to prevent compromise
over time.
security, with RSA and ECC (Elliptic Curve Cryptography) being among the commonly
used ones.
Suppose you are responsible for the DNS infrastructure of a large organization.
Explain in detail how DNSSEC helps maintain data integrity in the DNS system.
without DNSSEC and how DNSSEC mitigates those risks. Additionally, outline the
Data Integrity: DNSSEC ensures that DNS data remains unchanged during transmission,
data injection.
Reliability: DNSSEC enhances the reliability and trustworthiness of the DNS, reducing
Security for End-Users: DNSSEC helps protect end-users from being redirected to
Secure Ecosystem: It creates a secure ecosystem for domain owners, registrars, and DNS
service providers.
While DNSSEC significantly improves DNS security, it requires proper configuration and
management, and support from both domain owners and DNS resolver operators.
Domain owners must sign their DNS records, and DNS resolver operators must validate
and integrity of DNS data, reducing the risk of malicious activities like DNS cache
poisoning.
In summary, DNS is the backbone of the internet, translating user-friendly domain names
into the numeric language that networks understand. It simplifies human interaction
with the internet, ensures data packets find their way to their intended destinations, and
continues to adapt to the evolving needs and security concerns of the digital age.
Understanding the operation and importance of DNS is fundamental for anyone working
Definition: DNS clients, also known as DNS resolvers, are an essential part of the
Domain Name System (DNS). They are the devices or software applications responsible
for making DNS queries to resolve human-readable domain names into their
corresponding IP addresses. DNS clients play a pivotal role in the process of accessing
Hardware and Software Devices: These include personal computers, laptops, servers,
smartphones, tablets, and other devices with internet connectivity. These devices run
Software Applications: Web browsers, email clients, online games, and many other
software applications rely on DNS clients to resolve domain names when connecting to
Device Variety: DNS clients can be a wide array of devices. These encompass traditional
computing devices like personal computers, laptops, and servers. They also extend to
mobile devices such as smartphones and tablets. Moreover, various IoT (Internet of
Things) devices, such as smart appliances, sensors, and even gaming consoles, also
Software Applications: DNS clients can also refer to the software applications and
libraries used to initiate DNS queries. Web browsers, email clients, and virtually any
software that connects to the internet relies on DNS resolution to locate the resources they
need.
DNS Query Process is a series of steps that occur when a DNS client, which could be a
device like a computer or a software application like a web browser, needs to resolve a
involves multiple DNS servers and queries and is integral to how the Domain Name
The process begins when a user enters a domain name (e.g., www.example.com) into a
web browser, clicks a link, or performs another action that requires the resolution of a
domain name.
The user's device, often referred to as the local DNS client or resolver, generates a DNS
query to resolve the domain name. This query is sent to the DNS resolver configured for
The resolver first checks its cache, a temporary storage of previously resolved DNS data.
If it finds the IP address associated with the requested domain name and the cached data
is still valid (i.e., within the Time-to-Live, or TTL, period), it can immediately return the
DNS query. In this process, the resolver contacts the root DNS server, top-level domain
(TLD) servers, and authoritative DNS servers responsible for the requested domain in a
hierarchical manner.
The recursive query starts at the root DNS servers, which provide information about the
TLD servers, and proceeds to the TLD servers, which offer information about the
The recursive DNS query continues until it reaches the authoritative name server for the
The authoritative name server for the domain provides the IP address for the requested
The recursive resolver then sends this IP address back to the local DNS client, which
With the IP address obtained from the DNS query, the local DNS client can now establish
a connection to the intended web server, mail server, or network resource. This allows
the user to access the desired website or service by sending data packets to the correct IP
address.
The DNS query process ensures that users can access websites and services on the internet
using human-readable domain names while the DNS system works in the background to
translate these names into the corresponding IP addresses. This process happens rapidly,
DNS Query Initiation: When a user enters a URL in their web browser or when a software
application needs to communicate with a remote server, the DNS client initiates a DNS
query. This query seeks the IP address associated with the domain name in the URL.
Recursive DNS Resolution: DNS clients often employ recursive DNS resolution. In this
process, if the DNS client does not already know the IP address, it consults a DNS
provided by an internet service provider (ISP). The DNS resolver recursively seeks the IP
address until it reaches an authoritative DNS server that has the requested information.
Caching is a technology and process that involves temporarily storing and retaining
and often faster-to-retrieve location. This is done to expedite future access to the same
data, reducing the need to recreate or retrieve it from its original, typically slower source.
Caching is widely used in various computing systems, including web browsers, content
delivery networks (CDNs), and database systems, to enhance performance and reduce
response times.
Significance of Caching: Caching is a crucial aspect of DNS (Domain Name System) that
significantly enhances the efficiency and speed of DNS resolution. It involves storing
DNS data temporarily, allowing DNS clients to access frequently visited websites and
services more quickly. This expansion explores caching in the context of DNS clients and
Types of Caching
Client-Side Caching: DNS clients themselves maintain a cache, often referred to as a DNS
cache or resolver cache. In client-side caching, the DNS client stores DNS responses it has
received, keeping records of domain names and their corresponding IP addresses. This
cache is used to expedite future DNS queries and reduce the reliance on external DNS
resolvers.
Server-Side Caching: In addition to client-side caching, DNS resolvers and servers also
engage in server-side caching. DNS servers cache responses they receive from
authoritative DNS servers. This caching minimizes the load on authoritative servers and
Advantages of Caching
Reduced Latency: Caching significantly reduces DNS query response times. When a
DNS client encounters a domain it has previously resolved, it retrieves the IP address
from its cache rather than initiating a new query. This minimizes latency and accelerates
server load. By storing frequently accessed DNS data, it lessens the need for continuous
recursive DNS queries to the authoritative servers. This resource efficiency contributes to
Time-to-Live (TTL)
communication that defines the maximum amount of time or number of hops that a data
or no longer valid. TTL is primarily associated with Internet Protocol (IP) packets and is
For IP packets: TTL is a field in the IP header that starts with a certain value (usually 255)
when a packet is created. As the packet traverses through routers and networks, each
device that processes the packet decrements the TTL value by one. If the TTL value
reaches zero, the packet is discarded, and an error message may be sent back to the
sender. TTL prevents packets from circulating indefinitely, which could otherwise lead
For DNS records: TTL is a setting associated with DNS (Domain Name System) resource
records. It specifies how long a DNS resolver, client, or server should consider the record
as valid before seeking an updated version from the authoritative DNS server. Once the
TTL expires, the resolver or DNS cache will request the latest data from the authoritative
with the requirement to keep data current. It helps maintain network stability and
TTL Value: Every DNS record that is cached has a Time-to-Live (TTL) value associated
with it. The TTL specifies how long the cached record remains valid. Once this duration
expires, the DNS client or server must re-query the authoritative DNS server for updated
information.
Configurable TTL: TTL values are configurable, and administrators can set them based
on their specific needs. Shorter TTLs ensure that cached data is refreshed more
frequently, while longer TTLs reduce the frequency of re-querying authoritative servers,
TTL (Time-to-Live): Cached DNS records have a Time-to-Live value, which specifies how
long the information is considered valid. After this period elapses, the DNS client must
Gateway to the Internet: DNS clients act as the gateway to the internet for all devices and
software applications. They ensure that users can access websites, send emails, stream
videos, and perform countless other online activities seamlessly by providing the
necessary IP addresses.
Critical to User Experience: The speed and reliability of DNS clients have a direct impact
on the user experience. Fast and dependable DNS resolution is essential for reducing
page load times and ensuring the efficient functioning of online services.
In essence, DNS clients are the indispensable components that make the internet's user-
operating system, or the software applications you use daily, DNS clients work silently
but effectively to connect you to the vast digital world, translating human-readable
domain names into the numerical language of IP addresses. Understanding their role is
network issues.
Cache Management
quick retrieval. Caches are employed to enhance system performance by reducing data
access times and decreasing the need to repeatedly retrieve the same data from slower,
more distant sources. Caching is utilized in a variety of computing contexts, and here are
Purpose of Caching:
Speed: Caches store data in a fast and easily accessible location, reducing the time it takes
to retrieve the data, which is especially valuable for frequently used resources.
Efficiency: Caches reduce the load on underlying resources or systems, such as databases
or web servers, by fulfilling requests locally and minimizing the need for repetitive,
networks, which can be essential for efficient data transmission in distributed systems
Types of Caches:
Memory Cache: Often referred to as a cache memory or RAM cache, this type of cache
Disk Cache: Disk caches use hard drives or solid-state drives to store frequently used
Web Caches: These are used in web servers to store frequently accessed web pages,
images, and resources, reducing the load on web servers and speeding up page load times
for users.
Content Delivery Network (CDN) Caches: CDNs use distributed caches located in
various geographic regions to store copies of web content and deliver it to users from the
Cache Invalidation:
Caches must have mechanisms for determining when cached data becomes outdated or
invalid. Typically, cached data is associated with a Time-to-Live (TTL) value, specifying
how long the data remains valid. After the TTL expires, the cache initiates processes to
determine which data should be removed from the cache to make room for new data.
Common cache replacement policies include Least Recently Used (LRU), Most Recently
Cache Coherency:
In distributed systems, maintaining cache coherency is essential to ensure that all copies
Prefetching:
Some cache systems incorporate prefetching, where the cache proactively loads data it
anticipates will be needed in the near future, further reducing access times.
Caching is widely used in various computing systems, such as web browsers, database
systems, file systems, and content delivery networks, to improve performance and
reduce response times, making it an integral part of modern computer systems and
networks.
Cache management refers to the process of controlling and overseeing the operation of
caches in a computer system, network, or software application. Caches are used to store
frequently accessed or computed data to speed up data retrieval and improve system
cached data becomes outdated or invalid. This typically involves associating a "Time-to-
Live" (TTL) value with cached data, specifying how long it can be considered accurate.
When the TTL expires, the cache management system initiates processes to refresh or
Cache Replacement Policies: When cache space is limited, cache management systems
use replacement policies to determine which data should be removed from the cache to
make room for new data. Common cache replacement policies include Least Recently
Used (LRU), Most Recently Used (MRU), and First-In, First-Out (FIFO).
coherency, ensuring that all copies of data in different caches remain synchronized. This
is essential to prevent data inconsistencies and maintain the integrity of shared data in a
network.
Cache Prefetching: Cache management strategies may involve prefetching, where the
cache anticipates future data needs and proactively loads data into the cache to reduce
instances, cache management may involve partitioning data among different cache levels
Cache Size and Configuration: Cache management also includes the configuration of
cache size, associativity, and other parameters to optimize the cache's effectiveness for a
Cache Monitoring and Analytics: Cache management often involves the continuous
allocation.
Cache Flush and Reset: Administrators may need the ability to manually flush or reset
caches in certain situations, especially when dealing with performance issues or data
integrity concerns.
Cache Security: Ensuring the security of cached data is another aspect of cache
computing, where the efficient use of caches can significantly impact the overall system
Cache Expiry: DNS clients and servers routinely check the TTL of cached records. When
a TTL expires, the cached data is marked as stale, and the next query for that domain
Cache Flushing: DNS clients and servers can manually flush their caches to remove
outdated or incorrect data. This can be helpful in resolving issues caused by outdated
cache entries.
Cache Poisoning: One of the challenges associated with caching is DNS cache poisoning,
where malicious data is introduced into the cache. This can lead to security breaches and
incorrect DNS resolutions. DNSSEC (DNS Security Extensions) is a countermeasure
Balancing Act: Maintaining the right balance between cache persistence and keeping the
cache up to date is a consideration. Long TTL values may lead to delays in updating DNS
records, while very short TTL values increase the load on authoritative servers.
Caching is an indispensable feature of DNS clients and servers, enhancing the speed and
Caching: DNS clients frequently store recently resolved DNS information in a cache. This
cache allows for quicker responses to subsequent queries for the same domain names,