KEMBAR78
CN Unit 5 | PDF | World Wide Web | Internet & Web
0% found this document useful (0 votes)
21 views27 pages

CN Unit 5

The document provides an overview of the Application Layer of the OSI model, detailing its functions, protocols, and interactions with user applications. It also covers the World Wide Web, DNS, HTTP, FTP, and email systems, explaining their definitions, uses, and protocols. Additionally, it discusses data compression and cryptography, highlighting their importance in data management and security.

Uploaded by

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

CN Unit 5

The document provides an overview of the Application Layer of the OSI model, detailing its functions, protocols, and interactions with user applications. It also covers the World Wide Web, DNS, HTTP, FTP, and email systems, explaining their definitions, uses, and protocols. Additionally, it discusses data compression and cryptography, highlighting their importance in data management and security.

Uploaded by

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

🧠 Application Layer (OSI Model Layer 7)

🔹 Definition:
Application layer is the 7th and topmost layer of the OSI (Open
Systems Interconnection) model.
It provides user interface and directly interacts with end-user
applications.
It is responsible for network services to applications, like email, file
transfer, and browsing.

📌 Main Functions of Application Layer:


Function Description
Allows user to log on to a remote
1. Network Virtual Terminal
host.
2. File Transfer, Access Lets user access and manage files
and Management (FTAM) over the network.
3. Mail Services Provides email services like SMTP.
Provides distributed database
4. Directory Services sources and access for global
information.
Converts data into readable format
5. Data Translation
for applications.
6. Authentication & Confirms user identity and
Authorization permissions.
Manages errors occurring during
7. Error Handling
communication.
🔗 Examples of Application Layer Protocols:
Protocol Purpose
HTTP / HTTPS Web browsing (web pages)
SMTP Sending emails
POP3 / IMAP Receiving emails
FTP File transfer
DNS Domain name resolution
TELNET / SSH Remote login
SNMP Network device management

🧑‍💻 How it Works:


• Application Layer does not provide services to other OSI layers, it
provides services to the user.
• It uses protocols to enable communication between software (e.g.,
Chrome, Outlook).
• Example: When you type a URL in the browser, HTTP (application
layer protocol) starts working.

📚 Key Points to Remember:


• Top layer of OSI model.
• Closest to the user.
• Provides services, not the actual application itself.
• Uses many protocols like HTTP, FTP, SMTP etc.
World Wide Web (WWW)
1. Definition
The World Wide Web (WWW) is a vast network of interconnected web
pages and multimedia content accessible through the Internet. It
enables users to browse information using web browsers by clicking on
hyperlinks, making the internet user-friendly and interactive.
2. Types of WWW
• Static Web: Web pages with fixed content that rarely change, created
using HTML.
• Dynamic Web: Web pages that are interactive and can change
content in real-time, usually powered by server-side scripting
languages like PHP, JavaScript, or Python.
3. Uses of WWW
• Accessing vast amounts of information globally.
• Online shopping and banking.
• Social networking and communication.
• Online education and e-learning platforms.
• Entertainment through videos, music, and games.
4. Key Components of WWW
• Web Browser: Software (Chrome, Firefox) that lets users view web
pages.
• Web Server: Computers hosting websites and serving pages on
request.
• HTML (HyperText Markup Language): Language used to design
web pages.
• HTTP/HTTPS (HyperText Transfer Protocol): Protocol for
transferring web pages.
• URL (Uniform Resource Locator): Address used to find web pages.
5. Important Terms
• Hyperlinks: Clickable text or images linking one web page to another.
• Web Pages: Documents containing text, images, videos accessible
on the web.
• Clients: Devices (like your computer or phone) that request web
pages.
• Protocols: Rules for communication, mainly HTTP and HTTPS.
DNS
DNS (Domain Name System) converts human-readable domain
names (like www.google.com) into machine-readable IP addresses
(like 142.250.190.14).
1. It helps computers locate and communicate with each other over the
Internet.
2. DNS works as a hierarchical and distributed database.
3. The query passes through three main levels:
o Root Server
o TLD Server (like .com, .org)
o Authoritative Server (stores actual IP address)
4. This system allows users to open websites using easy-to-remember
names instead of complex numbers.
✅ Types of Domains (Detailed Explanation)
1. Generic Domains (gTLDs)
These are general-purpose domains used worldwide, such as:
o .com for commercial websites
o .edu for educational institutions
o .org for nonprofit organizations
o .net for network providers or commercial use
o .mil for military organizations
2. Country Code Domains (ccTLDs)
These domains represent specific countries, for example:
o .in for India
o .us for the United States
o .uk for the United Kingdom
Each country has its own unique domain extension.
3. Inverse Domain (Reverse DNS)
This is used to find the domain name from an IP address. It is called
reverse lookup and helps in identifying which domain belongs to a
particular IP.
4. DNS Mappings
DNS supports two types of mappings:
o Domain Name to IP Address (e.g., google.com →
142.250.190.14)
o IP Address to Domain Name (reverse lookup or inverse DNS)
5. Example
To find the IP address of geeksforgeeks.org, DNS translates the
domain name to IP. Similarly, reverse DNS can find the domain name
if the IP is known.
✅ Types of DNS Queries (Short)
1. Recursive Query: Client asks server to find full answer.
2. Iterative Query: Server replies with best info or refers another server.
3. Non-Recursive Query: Server replies from its cache only.
4. Inverse Query: Finds domain name from IP address.
5. Dynamic Query: Used to update DNS records automatically.

HTTP
HTTP stands for Hypertext Transfer Protocol. It is a set of rules used for
sharing data on the World Wide Web (WWW). When you visit a website,
HTTP helps your browser request and receive the data needed to show the
web pages you see. It is a key part of how the internet works, allowing us
to browse and interact with websites.
• Basic Structure: HTTP is the foundation of the web, enabling data
communication and file sharing.
• Web Browsing: Most websites use HTTP, so when you click a link or
download a file, HTTP works behind the scenes.
• Client-Server Model: HTTP follows a request-response system. Your
browser (client) asks for information, and the website’s server sends
back the data.
• Application Layer Protocol: HTTP works within the Internet Protocol
Suite and controls how data is sent and received.
What is an HTTP Request?
HTTP request is simply termed as the information or data that is needed by
Internet browsers for loading a website. This is simply known as HTTP
Request.
There is some common information that is generally present in all HTTP
requests. These are mentioned below.
• HTTP Version
• URL
• HTTP Method
• HTTP Request Headers
• HTTP Body

Advantages of HTTP:
• Easy to use and widely supported for transferring web data.
• Works well with the client-server model for fast web browsing.
Disadvantages of HTTP:
• Data is not encrypted, so it is vulnerable to interception.
• Not secure for sensitive data without additional layers like HTTPS.

FTP (File Transfer Protocol)


Definition:
FTP stands for File Transfer Protocol. It is a standard network protocol
used to transfer files between a client and a server over the internet or a
network. FTP allows users to upload, download, and manage files on
remote servers easily.

Types of FTP
1. Anonymous FTP
Allows public access without username or password. Users can
download files but have limited access.
2. Password Protected FTP
Requires username and password for accessing files. More secure
than anonymous FTP.
3. FTP Secure (FTPS)
FTP with SSL/TLS encryption to secure data during transfer.
4. FTP over Explicit SSL/TLS (FTPES)
Starts as normal FTP on port 21 and then upgrades to a secure
encrypted connection.
5. Secure FTP (SFTP)
Uses SSH protocol on port 22 for fully encrypted and secure file
transfer.
Uses of FTP
1. File Uploading and Downloading
2. Website Management
3. File Sharing
4. Backup and Storage
5. Remote File Access

📧 Electronic Mail (E-mail)

✅ Definition:
Electronic Mail or E-mail is a system that allows users to send and
receive digital messages over the internet. It is one of the most
commonly used communication methods worldwide.
⚙️ Working of E-mail (Step-by-Step):
1. User composes a message using an e-mail client (like Gmail,
Outlook).
2. The message is sent to the SMTP server (Simple Mail Transfer
Protocol).
3. SMTP sends it to the recipient's mail server (usually via the internet).
4. The recipient’s server stores the message until the user retrieves it.
5. The recipient opens the e-mail using an e-mail client via POP3/IMAP
protocols.

🧱 Architecture of E-mail System:


1. User Agent (UA):
Interface used by the user to read/write/send emails (e.g., Gmail app).
2. Mail Transfer Agent (MTA):
Transfers mail from sender’s server to recipient’s server (e.g., SMTP
server).
3. Mail Delivery Agent (MDA):
Delivers email to the recipient’s mailbox.
4. Protocols Used:
o SMTP (for sending)
o POP3 or IMAP (for receiving)

📂 Types of E-mail:
1. Web-based E-mail: Accessed via web browsers (e.g., Gmail, Yahoo).
2. Client-based E-mail: Accessed using installed software (e.g., MS
Outlook).
3. Transactional E-mail: System-generated (e.g., OTPs, confirmations).
4. Marketing E-mail: Used for promotional content.
5. Professional/Personal E-mail: For regular use in work or daily life.

✅ Advantages of E-mail:
1. Fast, instant communication.
2. Very low cost.
3. Easy to access and store.
4. Can send attachments (files, images).
5. Works globally — anywhere, anytime.

❌ Disadvantages of E-mail:
1. Spam and junk mail issues.
2. Can carry viruses through attachments.
3. Needs internet access.
4. Limited data privacy.
5. Miscommunication due to lack of emotions/tone.

📌 Uses of E-mail:
1. Personal and professional communication
2. Job applications and resumes
3. Sharing documents and files
4. Notifications and alerts
5. Customer support and feedback
6. Marketing and newsletters
7. Educational communication
8. Password resets and login verification
Email Protocols
Email protocols are a collection of protocols that are used to send and
receive emails properly. The email protocols provide the ability for the
client to transmit the mail to or from the intended mail server. Email
protocols are a set of commands for sharing mails between two
computers. Email protocols establish communication between the
sender and receiver for the transmission of email. Email forwarding
includes components like two computers sending and receiving emails
and the mail server. There are three basic types of email protocols.
Types of Email Protocols:
Three basic types of email protocols involved for sending and receiving
mails are:
• SMTP
• POP3
• IMAP

📩 SMTP (Simple Mail Transfer Protocol):


SMTP is used to send emails from a client to a server or between
servers. It handles outgoing mail using port 25 or 587.
📥 POP3 (Post Office Protocol v3):
POP3 is used to receive emails by downloading them from the server
to the local device. Once downloaded, emails are usually deleted from
the server.

🔄 IMAP (Internet Message Access Protocol):


IMAP allows users to access emails directly from the mail server
without downloading. It supports syncing across multiple devices and
keeps messages on the server.

🧷 MIME (Multipurpose Internet Mail Extensions):


MIME is a standard that allows emails to include text in different
character sets, attachments like images, audio, video, and documents.
It extends the email format beyond plain text to support multimedia
content.

Remote Login
Remote Login is a process in which user can login into remote site i.e.
computer and use services that are available on the remote computer.
With the help of remote login a user is able to understand result of
transferring and result of processing from the remote computer to the
local computer.
🌐 Telnet (Telecommunication Network) – Definition:
Telnet is a remote login protocol that allows a user to connect to
another computer over a network and access it using a command-line
interface. It works on port 23 and does not encrypt the data, making it
less secure.

🔐 SSH (Secure Shell) – Definition:


SSH is a secure remote login protocol that allows encrypted
communication between two computers over a network. It works on
port 22, ensuring confidentiality and protection from attacks like
eavesdropping.

Data Compression
Data compression is defined as the process whereby information is
encoded in less bits than it had originally occupied. This mainly
happens through methods that eliminate duplication and other
extraneous information.
Compression techniques are useful for reducing file sizes for storage,
minimizing bandwidth during transmission and enabling faster
uploading/downloading of web content over the internet.
Data Compression Techniques
Data compression can be divided into two categories: lossless and
lossy.
Lossless Data Compression
Lossless data compression guarantees that the decompressed data is
identical to the original data. It works best for text and data files where
precision matters.
• Huffman coding:
Uses a frequency-sorted binary tree to locate values efficiently.

• Run-length encoding (RLE):
This compresses sequences of replicated data values.
• Lempel-Ziv-Welch (LZW):
It creates a dictionary of data patterns and replaces them with shorter
codes.
Lossy Data Compression
Lossy data compression gives away the accuracy of some of its input
data for a better compression ratio. It is usually applied to multimedia
files, where some loss of detail can be tolerated. Some techniques
include:
• Transform Coding:
Uses mathematical transforms that shrink the data, usually in JPEG
• Quantization:
Reducing the precision of data; it is common in image and video
compression.

Differentiating Features Between Lossy and Lossless


Compression

Lossy Lossless
Feature Compression Compression

Reduces file size by


Reduces file size
permanently
Definition without losing any
eliminating some
information.
information.

No data is lost;
Some data is lost,
original data can be
Data Loss potentially reducing
perfectly
quality.
reconstructed.
Lossy Lossless
Feature Compression Compression

Lower compression
Higher compression ratios, resulting in
Compression
ratios, leading to larger file sizes
Ratio
smaller file sizes. compared to lossy
compression.

Quality can be
significantly Original quality is
Quality reduced, especially preserved with no
at high compression loss in data.
levels.

Used for multimedia Used for text,


data (images, audio, executable files, and
Common
video) where perfect other data where
Uses
reproduction is not exact replication is
critical. essential.

JPEG (images), PNG (images),


Examples MP3 (audio), MP4 FLAC (audio), ZIP
(video) (general files)
Advantages:
1. Saves storage space by reducing file sizes.
2. Speeds up data transmission over networks.
Disadvantages:
1. May cause loss of quality in lossy compression.
2. Requires additional processing time for compression and
decompression.

Cryptography
Cryptography is the method of protecting information and
communication using codes to keep data confidential, authentic, and
intact. The word comes from "crypt" meaning hidden and "graphy"
meaning writing. It uses math-based algorithms to encrypt messages,
making them hard to read without a key. Cryptography secures data
privacy, internet browsing, and protects sensitive transactions like
credit card payments.
features of cryptography :
1. Confidentiality
2. Integrity
3. Authentication
4. Non-repudiation
5. Access Control

How Does a Cryptographic Key Work?


As we all know that cryptography technique is use to convert plain text
into ciphertext. This technique is done by cryptographic key. Basically
cryptographic key is a string of characters which is used to encrypts
the data and decrypt the data.
"Geeks for Geeks" + ⚿ = "HYMeAS90#"

Types Of Cryptography
1. Symmetric Key Cryptography
Symmetric Key Cryptography is an encryption system where the
sender and receiver of a message use a single common key to encrypt
and decrypt messages. Symmetric Key cryptography is faster and
simpler but the problem is that the sender and receiver have to
somehow exchange keys securely. The most popular symmetric key
cryptography systems are Data Encryption Systems
(DES) and Advanced Encryption Systems (AES) .
2. Hash Functions
There is no key required in hash function cryptography as it uses
mathematical equations to genrate a hash message for nay arbitrary
length of message, and the output will be of fixed length. Some of the
famous hash function are:
• SHA-256
• MD5
• MD6
3. Asymmetric Key Cryptography
In Asymmetric Key Cryptography , a pair of keys is used to encrypt
and decrypt information. A sender's public key is used for encryption
and a receiver's private key is used for decryption. Public keys and
Private keys are different. Even if the public key is known by everyone
the intended receiver can only decode it because he holds his private
key. The most popular asymmetric key cryptography algorithm is
the RSA algorithm.

Applications of Cryptography
1. Secure Communication
2. Online Banking and Payments
3. Digital Signatures
4. Data Encryption in Cloud Storage
5. Authentication Systems
6. Virtual Private Networks (VPNs)
7. Email Security (e.g., PGP)
8. Blockchain and Cryptocurrencies
✅ Advantages of Cryptography
1. Protects data privacy and ensures secure communication.
2. Prevents unauthorized access and data tampering.

❌ Disadvantages of Cryptography
1. High processing power and time required for encryption/decryption.
2. Loss or leakage of keys can compromise security completely.

RSA Algorithm in Cryptography


RSA(Rivest-Shamir-Adleman) Algorithm is an asymmetric or public-key
cryptography algorithm which means it works on two different keys: Public
Key and Private Key. The Public Key is used for encryption and is known to
everyone, while the Private Key is used for decryption and must be kept secret
by the receiver. RSA Algorithm is named after Ron Rivest, Adi Shamir and
Leonard Adleman, who published the algorithm in 1977.
Example of Asymmetric Cryptography:
If Person A wants to send a message securely to Person B:
• Person A encrypts the message using Person B's Public Key.
• Person B decrypts the message using their Private Key.
RSA Algorithm
RSA Algorithm is based on factorization of large number and modular
arithmetic for encrypting and decrypting data. It consists of three main stages:
1. Key Generation: Creating Public and Private Keys
2. Encryption: Sender encrypts the data using Public Key to get cipher text.
3. Decryption: Decrypting the cipher text using Private Key to get the original
data

✨ Steps of RSA Algorithm


1. Choose two prime numbers
Let’s say: p = 3 and q = 11
2. Compute n = p × q
n = 3 × 11 = 33
3. Compute ϕ(n) = (p − 1) × (q − 1)
ϕ(33) = (3−1)(11−1) = 2 × 10 = 20
4. Choose e such that 1 < e < ϕ(n) and e and ϕ(n) are co-prime
Let e = 7 (7 and 20 are co-prime)
5. Find d such that (d × e) % ϕ(n) = 1
d = 3 (Because 7×3 = 21, and 21 % 20 = 1)
6. Now, the keys are:
o Public Key (e, n) = (7, 33)
o Private Key (d, n) = (3, 33)

Difference between FTP and HTTP


HTTP FTP

It stands for HyperText Transfer


It stands for File Transfer Protocol
Protocol.

It is the set of rules that how web It is the set of rules that permit the
pages are transferred on different downloading and uploading the files
computers over the internet. on the computer over the internet.

It only supports the data It supports both data connection and


connection. control connection

It uses Transmission Control


It uses Transmission Control
Protocol and runs on TCP port 20
Protocol and runs on TCP port 80.
and TCP port 21.
HTTP FTP

The URL using the HTTP protocol The URL using the FTP will start with
will start with HTTP. FTP.

It does not require authentication. It requires authentication.

It is efficient in transferring small It is efficient in transferring large


files. files.

The files transferred to the The files transferred to the computer


computer over the internet are not over the internet are saved to the
saved to the memory. memory.

HTTP is used to provide the web


FTP is used to upload or download
pages to the web browser from
files between client and server.
the webserver

It is not a stateless protocol and it


It is a stateless protocol.
maintains states.

Difference Between HTTP and HTTPS

HTTP HTTPS

HTTP stands for HyperText HTTPS for HyperText Transfer


Transfer Protocol. Protocol Secure.

In HTTP, URL begins with In HTTPs, URL starts with


“http://”. “https://”.
HTTP HTTPS

HTTP uses port number 80 for HTTPs uses 443 port number
communication. for communication.

HTTP is considered to be HTTPs is considered as


unsecure. secure.

HTTP works at Application HTTPS works at Transport


Layer. Layer.

Encryption is present in
In HTTP, Encryption is absent.
HTTPS.

HTTP does not require any HTTPS needs SSL


certificates. Certificates.

HTTP does not improve HTTPS helps to improve


search ranking search ranking

HTTP faster than HTTPS HTTPS slower than HTTP

While HTTPS will have the


HTTP does not use data data before sending it and
hashtags to secure data. return it to its original state on
the receiver side.

In HTTP Data is transfer in In HTTPS Data transfer in


plaintext. ciphertext.
HTTP HTTPS

HTTP Should be avoided. HTTPS Should be preferred.

Search engines do not favour Improved reputation of the


the insecure website. website in search engine.

HTTPS Requires SSL/TLS


HTTP Does not require
implementation with
SSL/TLS or Certificates
Certificates.

In HTTPS Users are confident


In HTTP Users ar worried
about the security of their
about their data.
data.

Difference Between FTP and TFTP

Feature FTP TFTP

Transfer files Transfer files


Purpose between computers between computers

Establishes a
Establishes a
connection between
connection between
two computers,
two computers, but
allowing for a more
Connection with a more limited
complex set of
Feature FTP TFTP

commands and set of commands


options and options

Uses username and


Does not support
password for
authentication
Authentication authentication

Encrypts data Does not encrypt


Security transfer data transfer

Can recover from Does not have error


Error handling errors during transfer recovery

Supports
Only supports
both ASCII and
binary transfer
File transfer binary transfer
mode
mode modes
📡 What is SNMP Protocol?
SNMP stands for Simple Network Management Protocol. It is used to monitor
and manage devices on a network — such as routers, switches, servers,
printers, etc.
It allows network administrators to collect information, monitor performance,
find faults, and control devices remotely.

🛠️ Main Components of SNMP


1. Managed Device
o Any device (router, switch, etc.) that is managed by SNMP.
o These have an SNMP agent installed.
2. Agent
o A software program running on the managed device.
o It collects device data and communicates with the SNMP manager.
3. SNMP Manager (NMS – Network Management System)
o Central system that communicates with agents.
o Sends requests and receives responses from agents

You might also like