Internet Addressing
Internet Addressing
Example:
When you type "www.google.com" in your browser, DNS translates
this to the IP address of Google’s servers (e.g., 172.217.9.14) so your
device can connect to the correct server.
Public vs. Private Addresses:
Public IP addresses are globally unique and can be accessed from
anywhere on the internet.
Private IP addresses are used within local networks (e.g., home, office)
and cannot be accessed directly from the public internet.
Network Address Translation (NAT): This technology allows multiple
devices on a private network to share a single public IP address when
accessing the internet.
URL (Uniform Resource Locator) Addressing:
A URL is a reference (or address) to a resource on the internet.
Structure of a URL:
Scheme/Protocol (e.g., http, https, ftp): Specifies the protocol to be
used to access the resource.
Domain Name (e.g., www.example.com): Identifies the website or
resource's server.
Path (e.g., /products/page1): Specifies the location of the resource on
the server.
Query String (optional, e.g., ?id=123): Provides additional parameters
for the server.
Example: https://www.example.com/products/page1?id=123
Subnets and Subnetting:
Subnetting is the process of dividing a network into smaller sub-
networks (subnets) to improve efficiency and security.
A subnet mask (e.g., 255.255.255.0) is used to separate the network
portion of an IP address from the host portion.
It helps in better management of IP addresses, especially in large
networks.
Port Addressing:
Internet communication often uses port numbers to direct traffic to
the correct service or application on a device.
Common examples:
HTTP: Port 80
HTTPS: Port 443
FTP: Port 21
Port numbers are part of the TCP/IP protocol and are essential for
distinguishing between different types of services running on the
same device.
Domain Name Server
• A Domain Name Server (DNS) is like the phonebook of the internet. It
translates human-readable website names (like www..com) into machine-
readable IP addresses (like 192.0.2.1), which are used to locate and
identify devices on a network.
• What is DNS?
• DNS stands for Domain Name System.
• It’s a system that helps convert user-friendly domain names into IP
addresses that computers use to identify each other on the network.
How Does DNS Work?
You enter a domain name (e.g., www.example.com) into your web
browser.
DNS Query: Your computer sends a request (DNS query) to a DNS server to
find the IP address associated with that domain.
DNS Resolution: The DNS server looks up its records or asks other DNS
servers (if necessary) to find the correct IP address.
IP Address Return: The DNS server returns the IP address (e.g., 192.0.2.1)
to your computer.
Connection Established: Your computer then uses the IP address to
connect to the website’s server and load the page.
Key Components of DNS:
DNS Resolver: This is the server that receives the DNS query from your
device and tries to find the corresponding IP address.
Root DNS Servers: These are the highest-level servers in the DNS hierarchy,
responsible for directing queries to the correct top-level domain (TLD)
servers (.com, .org, etc.).
TLD DNS Servers: These servers store information about domain names
under a specific TLD (like .com or .org).
Authoritative DNS Servers: These are the servers that have the actual IP
address information for the specific domain name you’re querying.
Caching: DNS results are often cached temporarily on your device or DNS
servers to speed up subsequent lookups.
DNS Types:
A Record: Maps a domain name to an IPv4 address.
AAAA Record: Maps a domain name to an IPv6 address.
CNAME Record: Maps a domain name to another domain name (used
for aliases).
MX Record: Specifies mail servers for a domain.
NS Record: Specifies the name servers for a domain.
Types of ISPs:
Dial-Up ISP:
An older form of internet connection that uses a telephone line.
Very slow speeds, typically under 56 kbps.
Rarely used today, but it was the primary form of internet access
in the past.
Broadband ISP:
Refers to high-speed internet connections, typically faster than 256 kbps.
Types of broadband connections include:
DSL (Digital Subscriber Line): Uses telephone lines but provides faster
speeds than dial-up.
Cable: Uses coaxial cables (the same used for TV) to provide high-
speed internet.
Fiber-Optic: Uses fiber-optic cables to transmit data as light pulses,
offering very high speeds and reliability.
Satellite: Provides internet via satellite communication, often used in
rural or remote areas.
Fixed Wireless: Uses radio signals to provide internet to fixed
locations.
Mobile Broadband:
Provided through cellular networks, often via mobile hotspots or 4G/5G
technology.
Wireless internet access for mobile devices and laptops.
Fiber ISPs (FTTH or FTTP):
Fiber to the Home (FTTH) or Fiber to the Premises (FTTP) provides
fiber-optic internet directly to the user’s home or business, offering the
fastest speeds available.
How ISPs Work:
Connection to the Internet Backbone:
ISPs connect to the internet backbone, which is a collection of high-
speed data lines that carry large amounts of internet traffic between
different regions and networks.
Providing Access:
ISPs assign an IP address to each device on the customer's network,
allowing it to communicate over the internet.
They manage routing and provide DNS (Domain Name System) services
to convert domain names into IP addresses.
Bandwidth and Speed:
ISPs offer varying speeds depending on the type of service (e.g., fiber-
optic will be much faster than DSL).
Bandwidth refers to the maximum data transfer rate (speed) that the ISP
can provide.
Additional Services:
Many ISPs offer services like email accounts, web hosting, cloud storage,
or security packages.
Services Provided by ISPs:
Internet Access:
Basic service that allows users to access the internet via various
connection types (DSL, fiber, cable, etc.).
Email Services:
ISPs often provide email addresses (e.g., [email protected]) and webmail
access.
Web Hosting:
Some ISPs offer web hosting services to help individuals or businesses
host websites.
DNS Services:
ISPs operate DNS servers that translate domain names into IP
addresses for users.
VoIP (Voice over IP):
Some ISPs offer VoIP services, allowing voice communication over the
internet instead of traditional phone lines.
Virtual Private Networks (VPNs):
Some ISPs offer VPN services that help secure online connections and
protect privacy.
Security Software:
Many ISPs offer security packages that may include antivirus, firewall,
and other protection tools.
Choosing an ISP: Factors to Consider:
Speed:
Choose an ISP that can provide the speed you need for your activities (e.g.,
video streaming, gaming, working from home).
Data Limits:
Some ISPs offer unlimited data plans, while others may have data caps that
limit how much you can use each month.
Reliability:
Consider the ISP’s uptime and the quality of the service. An ISP with frequent
outages can affect productivity.
Cost:
ISPs have different pricing plans depending on the type of service (e.g., fiber
might be more expensive than DSL), and whether additional services (like a
router or email accounts) are included.
Customer Support:
Look for an ISP with responsive customer service to help resolve issues
quickly.
Contract Terms:
Some ISPs require long-term contracts, while others offer month-to-month
plans. Check for penalties if you decide to cancel.
Common Terms Related to ISPs:
Bandwidth:
The maximum amount of data that can be transferred in a given period
(often measured in Mbps or Gbps).
Latency:
The delay before a transfer of data begins following an instruction. A lower
latency means faster communication between devices.
Router:
A device provided by the ISP that allows multiple devices to connect to the
internet via a wireless network or wired connections.
Modem:
A device that connects your home network to the ISP’s infrastructure. It
translates the ISP’s signal into a usable connection for your devices.
IP Address:
A unique identifier given to each device connected to the internet. It allows
devices to communicate with each other.
DNS (Domain Name System):
Translates domain names like "www.example.com" into IP addresses,
allowing browsers to access websites.
Popular ISPs Around the World:
Comcast/Xfinity (USA)
AT&T (USA)
Verizon (USA)
BT Group (UK)
Sky Broadband (UK)
Vodafone (Global)
Airtel (India)
Telstra (Australia)
Jio (India)
A Three-Tier Web-Based Architecture:
Functionality:
•Displays data and information to the user.
•Sends requests to the next tier (business logic tier) for processing.
•Receives and renders responses from the business logic tier.
•User interaction takes place here (such as button clicks, form submissions, etc.).
Technology Stack:
•Web browsers (Chrome, Firefox, Safari, etc.)
•HTML, CSS, JavaScript
•Frameworks like Angular, React, or Vue.js
2. Business Logic Layer (Application Tier)
Role:
This tier is responsible for processing the application's business logic, rules, and
calculations. It acts as the middle layer between the presentation and data layers.
Components:
Typically implemented using programming languages like Java, Python, PHP, or
Node.js. This layer may contain application servers, APIs, and microservices that
manage requests, execute logic, and make decisions.
Functionality:
Accepts requests from the presentation layer.
Processes those requests based on business rules or logic.
Interacts with the data layer to retrieve or manipulate data.
Sends responses back to the presentation layer.
Technology Stack:
Java (Spring, Hibernate), Python (Django, Flask), Node.js
Application servers like Apache Tomcat, Nginx, or IIS
RESTful APIs, SOAP services, or GraphQL
3. Data Layer (Database Tier)
Role:
This tier is responsible for data storage, retrieval, and management. It typically involves
databases, file systems, or cloud storage where the application's data is persisted.
Components:
Databases such as MySQL, PostgreSQL, MongoDB, or SQL Server. This tier may also
interact with distributed data systems, data lakes, or cloud storage depending on the
complexity and scale of the application.
Functionality:
◦ Stores the application's persistent data (user data, application settings, etc.).
◦ Processes database queries sent from the business logic tier.
◦ Returns the requested data or updates the data as necessary.
Technology Stack:
◦ Relational databases like MySQL, PostgreSQL, or SQL Server
◦ NoSQL databases like MongoDB or Cassandra
◦ Cloud databases like Amazon RDS, Azure SQL, or Google Cloud Firestore
How it Works:
1.User Request: The process begins when a user interacts with the front-end
(presentation layer) by clicking a button, filling a form, or performing any other action.
2.Request to Business Logic Layer: The presentation layer sends a request (such as an
HTTP request) to the business logic layer. This request can include input data from the
user.
3.Processing in Business Logic Layer: The business logic layer processes the request,
applying any necessary business rules or logic. It may involve calculations, data
validation, or any other business operations.
4.Data Interaction: If required, the business logic layer interacts with the data layer to
retrieve or modify data. For example, it may query a database for user information or
update records in the database.
5.Response to Presentation Layer: Once the business logic layer has processed the
request and interacted with the data layer, it sends a response back to the presentation
layer, often in the form of a data payload (like JSON, XML, or HTML).
6.Display to User: Finally, the presentation layer renders the data and displays it to the
user. The user sees the result of their action, such as a confirmation message, updated
data, or an error notification.
Advantages of Three-Tier Architecture:
1.Separation of Concerns: Each layer has a distinct responsibility, making the system
easier to maintain, modify, and debug.
2.Scalability: Since each tier is separate, you can scale them independently based
on the needs of the application. For instance, if more users are accessing the
application, you can scale the presentation layer (front-end) or the business logic
layer (server-side).
3.Security: The separation of concerns allows for better security practices. For
example, the database layer can be isolated behind a firewall, and access to it can
be controlled tightly.
4.Reusability: The business logic can be reused by different front-end applications
(web, mobile, etc.) since it’s decoupled from the presentation layer.
5.Maintainability: Since each layer is independent, changes to one tier (like
upgrading the business logic) don't necessarily affect the other layers (like the user
interface or data storage).
1.Benefits of Three-Tier Client-Server Architecture
2.Below are the benefits of three-tier client-server architecture in distributed systems:
3.Vertical Scaling: Each tier can be scaled independently. For instance, you can add more
application servers or database servers to handle increased load without affecting the
presentation tier.
4.Horizontal Scaling: By dividing the load over several servers at every tier, you can improve
the system’s capacity to manage high request volumes.
5.Modular Design: The separation of concerns allows developers to make changes or updates
to one tier without affecting others. For example, updating the user interface or business
logic can be done independently.
6.Easier Debugging: Isolating issues becomes easier as each tier has its own distinct
responsibilities.
7.Technology Independence: Different technologies and platforms can be used for each tier.
For example, the presentation layer might use a web framework, while the application layer
could use a different programming language or framework.
8.Load Balancing: Distributing workload across multiple servers at each tier can enhance
overall system performance and responsiveness.
Disadvantages of Three-Tier Client Server Architecture
Below are the challenges of three-tier client-server architecture in distributed
systems:
•System Design: Designing and implementing a three-tier architecture can be
complex due to the need to manage interactions and data flow between tiers.
•Integration Issues: Ensuring seamless integration between tiers may require
additional development and testing effort.
•Network Latency: Communication between tiers, especially when they are
distributed across different servers or locations, can introduce latency and affect
performance.
•Increased Resource Usage: Multiple layers may increase resource consumption,
such as network bandwidth and server processing power.
•Configuration Management: Managing configurations and deployments for multiple
tiers can be challenging, particularly in distributed environments.
•Version Compatibility: Ensuring compatibility between different versions of each
tier (e.g., updated business logic or database schema) requires careful coordination.
•Infrastructure Costs: Operating and maintaining separate servers or services for
each tier can increase infrastructure and operational costs.
Example:
A simple online shopping application can be implemented with a three-tier
architecture:
Presentation Layer: The user interacts with the shopping cart interface via a
web browser (HTML, CSS, JavaScript).
Business Logic Layer: When the user adds an item to the cart, the server
processes this action, calculates the total, applies discounts, and prepares the
checkout information (using a programming language like Python or Java).
Data Layer: The system stores product details, user data, and orders in a
database (e.g., MySQL) and retrieves the necessary information as needed.
Platform: Java-based
Overview:
JSP is a technology used to develop dynamic web pages using Java. It is part of the
Java EE (Enterprise Edition) specification and enables developers to embed Java code
directly into HTML pages using special JSP tags. This allows for dynamic content
generation, like pulling data from a database or handling user input.
How It Works:
The JSP file is initially a normal HTML file with embedded Java code in the form of tags
like <% %>.
When a user requests a JSP page, the server processes it by converting the JSP code
into a servlet (a Java class that handles requests and responses). This process is done
once, and the servlet is then used to handle subsequent requests.
Usage:
Tools/Servers:
VBScript,
ASP Microsoft Web apps (legacy) Microsoft IIS N/A
JavaScript
ASP is an older Microsoft technology used for building web applications, which has
now evolved into ASP.NET.
While JSP, J2EE, and ASP.NET can all be used to build complex web-based systems,
ASP.NET and J2EE are often chosen for large enterprise applications, and JSP is typically
used when a Java-based technology stack is preferred.