0% found this document useful (0 votes)
46 views

Unit 5 CN

The document provides an overview of the presentation layer and application layer in the OSI model. The presentation layer is responsible for data translation between different systems and handles encryption and compression. The application layer identifies communication partners, determines resource availability, and provides services like file transfer, email, and directory services. It describes several application layer protocols including HTTP, FTP, DNS, and SNMP.

Uploaded by

kumargpj7091
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Unit 5 CN

The document provides an overview of the presentation layer and application layer in the OSI model. The presentation layer is responsible for data translation between different systems and handles encryption and compression. The application layer identifies communication partners, determines resource availability, and provides services like file transfer, email, and directory services. It describes several application layer protocols including HTTP, FTP, DNS, and SNMP.

Uploaded by

kumargpj7091
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Introduction to Computer Network

Unit V
Presentation Layer – Functions Application Layer: WWW and HTTP –
FTP – Email –Telnet –SSH – DNS – SNMP.
------------------------------------------------------------------------------------------------------------

Presentation Layer

o A Presentation layer is mainly concerned with the syntax and semantics of the
information exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one
presentation format to another format.
o The Presentation layer is also known as the syntax layer.

Functions of Presentation layer:


o Translation: The processes in two systems exchange the information in the form of
character strings, numbers and so on. Different computers use different encoding
methods, the presentation layer handles the interoperability between the different
encoding methods. It converts the data from sender-dependent format into a common
format and changes the common format into receiver-dependent format at the
receiving end.
o Encryption: Encryption is needed to maintain privacy. Encryption is a process of
converting the sender-transmitted information into another form and sends the
resulting message over the network.

Prof. Pranjali DandekarPage 1


Introduction to Computer Network

o Compression: Data compression is a process of compressing the data, i.e., it reduces


the number of bits to be transmitted. Data compression is very important in
multimedia such as text, audio, video.

Design Issues with Presentation Layer

● To manage and maintain the Syntax and Semantics of the information transmitted.

● Encoding data in a standard agreed upon way. Eg: String, double, date, etc.

● Perform Standard Encoding on wire.

Application Layer
The application layer in the OSI model is the closest layer to the end user which means that
the application layer and end user can interact directly with the software application. The
application layer programs are based on client and servers.

The Application layer includes the following functions:

o Identifying communication partners: The application layer identifies the availability


of communication partners for an application with data to transmit.
o Determining resource availability: The application layer determines whether sufficient
network resources are available for the requested communication.
o Synchronizing communication: All the communications occur between the
applications requires cooperation which is managed by an application layer.

Services of Application Layers


o Network Virtual terminal: An application layer allows a user to log on to a remote
host. To do so, the application creates a software emulation of a terminal at the remote
host. The user's computer talks to the software terminal, which in turn, talks to the
host. The remote host thinks that it is communicating with one of its own terminals,
so it allows the user to log on.
o File Transfer, Access, and Management (FTAM): An application allows a user to
access files in a remote computer, to retrieve files from a computer and to manage
files in a remote computer. FTAM defines a hierarchical virtual file in terms of file
structure, file attributes and the kind of operations performed on the files and their
attributes.
o Addressing: To obtain communication between client and server, there is a need for
addressing. When a client made a request to the server, the request contains the server
address and its own address. The server response to the client request, the request
contains the destination address, i.e., client address. To achieve this kind of
addressing, DNS is used.

Prof. Pranjali DandekarPage 2


Introduction to Computer Network

o Mail Services: An application layer provides Email forwarding and storage.


o Directory Services: An application contains a distributed database that provides
access for global information about various objects and services.

Authentication: It authenticates the sender or receiver's message or both.


DNS
An application layer protocol defines how the application processes running on different
systems, pass the messages to each other.
o DNS stands for Domain Name System.
o DNS is a directory service that provides a mapping between the name of a host on the
network and its numerical address.
o DNS is required for the functioning of the internet.
o Each node in a tree has a domain name, and a full domain name is a sequence of
symbols specified by dots.
o DNS is a service that translates the domain name into IP addresses. This allows the
users of networks to utilize user-friendly names when looking for other hosts instead
of remembering the IP addresses.
o For example, suppose the FTP site at EduSoft had an IP address of 132.147.165.50,
most people would reach this site by specifying ftp.EduSoft.com. Therefore, the
domain name is more reliable than IP address.

DNS is a TCP/IP protocol used on different platforms. The domain name space is divided
into three different sections: generic domains, country domains, and inverse domain.

Generic Domains
o It defines the registered hosts according to their generic behavior.
o Each node in a tree defines the domain name, which is an index to the DNS database.
o It uses three-character labels, and these labels describe the organization type

Label Description

aero Airlines and aerospace companies

Prof. Pranjali DandekarPage 3


Introduction to Computer Network

biz Businesses or firms

com Commercial Organizations

coop Cooperative business Organizations

edu Educational institutions

gov Government institutions

info Information service providers

int International Organizations

mil Military groups

museum Museum & other nonprofit organizations

name Personal names

net Network Support centers

org Nonprofit Organizations

pro Professional individual Organizations

Prof. Pranjali DandekarPage 4


Introduction to Computer Network

Country Domain
The format of country domain is same as a generic domain, but it uses two-character country
abbreviations (e.g., us for the United States) in place of three character organizational
abbreviations.
Inverse Domain
The inverse domain is used for mapping an address to a name. When the server has received
a request from the client, and the server contains the files of only authorized clients. To
determine whether the client is on the authorized list or not, it sends a query to the DNS
server and ask for mapping an address to the name.
Working of DNS
o DNS is a client/server network communication protocol. DNS clients send requests to
the. server while DNS servers send responses to the client.
o Client requests contain a name which is converted into an IP address known as a
forward DNS lookups while requests containing an IP address which is converted into
a name known as reverse DNS lookups.
o DNS implements a distributed database to store the name of all the hosts available on
the internet.
o If a client like a web browser sends a request containing a hostname, then a piece of
software such as DNS resolver sends a request to the DNS server to obtain the IP
address of a hostname. If DNS server does not contain the IP address associated with
a hostname, then it forwards the request to another DNS server. If IP address has
arrived at the resolver, which in turn completes the request over the internet protocol.

FTP
o FTP stands for File transfer protocol.
o FTP is a standard internet protocol provided by TCP/IP used for transmitting the files
from one host to another.
o It is mainly used for transferring the web page files from their creator to the computer
that acts as a server for other computers on the internet.
o It is also used for downloading the files to computer from other servers.

Objectives of FTP
o It provides the sharing of files.
o It is used to encourage the use of remote computers.
o It transfers the data more reliably and efficiently.

Why FTP?
Although transferring files from one system to another is very simple and straightforward, but
sometimes it can cause problems. For example, two systems may have different file
conventions. Two systems may have different ways to represent text and data. Two systems
may have different directory structures. FTP protocol overcomes these problems by

Prof. Pranjali DandekarPage 5


Introduction to Computer Network

establishing two connections between hosts. One connection is used for data transfer, and
another connection is used for the control connection.
Mechanism of FTP

The above figure shows the basic model of the FTP. The FTP client has three components:
the user interface, control process, and data transfer process. The server has two components:
the server control process and the server data transfer process.
There are two types of connections in FTP:
o Control Connection: The control connection uses very simple rules for
communication. Through control connection, we can transfer a line of command or
line of response at a time. The control connection is made between the control
processes. The control connection remains connected during the entire interactive
FTP session.
o Data Connection: The Data Connection uses very complex rules as data types may
vary. The data connection is made between data transfer processes. The data
connection opens when a command comes for transferring the files and closes when
the file is transferred.

FTP Clients
o FTP client is a program that implements a file transfer protocol which allows you to
transfer files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files
between you and your host and close the connection.

Prof. Pranjali DandekarPage 6


Introduction to Computer Network

o The FTP program is also available as a built-in component in a Web browser. This
GUI based FTP client makes the file transfer very easy and also does not require to
remember the FTP commands.

Advantages of FTP:

o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest
way to transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operations to get
the entire file.
o Security: To access the FTP server, we need to login with the username and password.
Therefore, we can say that FTP is more secure.
o Back & forth movement: FTP allows us to transfer the files back and forth. Suppose
you are a manager of the company, you send some information to all the employees,
and they all send information back on the same server.

Disadvantages of FTP:

o The standard requirement of the industry is that all the FTP transmissions should be
encrypted. However, not all the FTP providers are equal and not all the providers
offer encryption. So, we will have to look out for the FTP providers that provides
encryption.
o FTP serves two operations, i.e., to send and receive large files on a network.
However, the size limit of the file is 2GB that can be sent. It also doesn't allow you to
run simultaneous transfers to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted eavesdropping.
So, it is quite possible that attackers can carry out the brute force attack by trying to
guess the FTP password.
o It is not compatible with every system.

Telnet
o The main task of the internet is to provide services to users. For example, users want
to run different application programs at the remote site and transfers a result to the
local site. This requires a client-server program such as FTP, SMTP. But this would
not allow us to create a specific program for each demand.
o The better solution is to provide a general client-server program that lets the user
access any application program on a remote computer. Therefore, a program that
allows a user to log on to a remote computer. A popular client-server program Telnet
is used to meet such demands. Telnet is an abbreviation for Terminal Network.
o Telnet provides a connection to the remote computer in such a way that a local
terminal appears to be at the remote side.

Prof. Pranjali DandekarPage 7


Introduction to Computer Network

There are two types of login:

Local Login

o When a user logs into a local computer, then it is known as local login.
o When the workstation running terminal emulator, the keystrokes entered by
the user are accepted by the terminal driver. The terminal driver then passes
these characters to the operating system which in turn, invokes the desired
application program.
o However, the operating system has special meaning to special characters. For
example, in UNIX some combination of characters have special meanings
such as control character with "z" means suspend. Such situations do not
create any problem as the terminal driver knows the meaning of such
characters. But, it can cause the problems in remote login.

Remote login

o When the user wants to access an application program on a remote computer,


then the user must perform remote login.

Prof. Pranjali DandekarPage 8


Introduction to Computer Network

How remote login occurs

At the local site

The user sends the keystrokes to the terminal driver, the characters are then sent to the
TELNET client. The TELNET client which in turn, transforms the characters to a
universal character set known as network virtual terminal characters and delivers
them to the local TCP/IP stack

At the remote site

The commands in NVT forms are transmitted to the TCP/IP at the remote machine.
Here, the characters are delivered to the operating system and then pass to the
TELNET server. The TELNET server transforms the characters which can be
understandable by a remote computer. However, the characters cannot be directly
passed to the operating system as a remote operating system does not receive the
characters from the TELNET server. Therefore it requires some piece of software that
can accept the characters from the TELNET server. The operating system then passes
these characters to the appropriate application program.

SMTP
o SMTP stands for Simple Mail Transfer Protocol.
o SMTP is a set of communication guidelines that allow software to transmit an
electronic mail over the internet is called Simple Mail Transfer Protocol.
o It is a program used for sending messages to other computer users based on e-mail
addresses.
o It provides a mail exchange between users on the same or different computers, and it
also supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between servers.
The servers have a way of identifying themselves and announcing what kind of
communication they are trying to perform. They also have a way of handling the
errors such as incorrect email address. For example, if the recipient address is wrong,
then receiving server reply with an error message of some kind.

Prof. Pranjali DandekarPage 9


Introduction to Computer Network

Components of SMTP

o First, we will break the SMTP client and SMTP server into two components such as
user agent (UA) and mail transfer agent (MTA). The user agent (UA) prepares the
message, creates the envelope and then puts the message in the envelope. The mail
transfer agent (MTA) transfers this mail across the internet.

o SMTP allows a more complex system by adding a relaying system. Instead of just
having one MTA at sending side and one at receiving side, more MTAs can be added,
acting either as a client or server to relay the email.

Prof. Pranjali DandekarPage 10


Introduction to Computer Network

o The relaying system without TCP/IP protocol can also be used to send the emails to
users, and this is achieved by the use of the mail gateway. The mail gateway is a relay
MTA that can be used to receive an email.

Working of SMTP
1. Composition of Mail: A user sends an e-mail by composing an electronic mail
message using a Mail User Agent (MUA). Mail User Agent is a program which is
used to send and receive mail. The message contains two parts: body and header. The
body is the main part of the message while the header includes information such as
the sender and recipient address. The header also includes descriptive information
such as the subject of the message. In this case, the message body is like a letter and
header is like an envelope that contains the recipient's address.
2. Submission of Mail: After composing an email, the mail client then submits the
completed e-mail to the SMTP server by using SMTP on TCP port 25.
3. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and
domain name. For example, [email protected], where "vivek" is the username of the
recipient and "gmail.com" is the domain name.
If the domain name of the recipient's email address is different from the sender's
domain name, then MSA will send the mail to the Mail Transfer Agent (MTA). To
relay the email, the MTA will find the target domain. It checks the MX record from
Domain Name System to obtain the target domain. The MX record contains the
domain name and IP address of the recipient's domain. Once the record is located,
MTA connects to the exchange server to relay the message.
4. Receipt and Processing of Mail: Once the incoming message is received, the
exchange server delivers it to the incoming server (Mail Delivery Agent) which stores
the e-mail where it waits for the user to retrieve it.
5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by using
MUA (Mail User Agent). MUA can be accessed by using login and password.

SNMP
o SNMP stands for Simple Network Management Protocol.
o SNMP is a framework used for managing devices on the internet.

Prof. Pranjali DandekarPage 11


Introduction to Computer Network

o It provides a set of operations for monitoring and managing the internet.

SNMP Concept

o SNMP has two components Manager and agent.


o The manager is a host that controls and monitors a set of agents such as routers.
o It is an application layer protocol in which a few manager stations can handle a set of
agents.
o The protocol designed at the application level can monitor the devices made by
different manufacturers and installed on different physical networks.
o It is used in a heterogeneous network made of different LANs and WANs connected
by routers or gateways.

Managers & Agents


o A manager is a host that runs the SNMP client program while the agent is a router that
runs the SNMP server program.
o Management of the internet is achieved through simple interaction between a manager
and agent.
o The agent is used to keep the information in a database while the manager is used to
access the values in the database. For example, a router can store the appropriate
variables such as a number of packets received and forwarded while the manager can
compare these variables to determine whether the router is congested or not.
o Agents can also contribute to the management process. A server program on the agent
checks the environment, if something goes wrong, the agent sends a warning message
to the manager.

Prof. Pranjali DandekarPage 12


Introduction to Computer Network

Management with SNMP has three basic ideas:


o A manager checks the agent by requesting the information that reflects the behavior
of the agent.
o A manager also forces the agent to perform a certain function by resetting values in
the agent database.
o An agent also contributes to the management process by warning the manager
regarding an unusual condition.

Management Components
o Management is not achieved only through the SNMP protocol but also the use of
other protocols that can cooperate with the SNMP protocol. Management is achieved
through the use of the other two protocols: SMI (Structure of management
information) and MIB(management information base).
o Management is a combination of SMI, MIB, and SNMP. All these three protocols
such as abstract syntax notation 1 (ASN.1) and basic encoding rules (BER).

SMI

The SMI (Structure of management information) is a component used in network


management. Its main function is to define the type of data that can be stored in an object and
to show how to encode the data for the transmission over a network.

MIB

o The MIB (Management information base) is a second component for the network
management.
o Each agent has its own MIB, which is a collection of all the objects that the manager
can manage. MIB is categorized into eight groups: system, interface, address
translation, ip, icmp, tcp, udp, and egp. These groups are under the mib object.

SNMP

Prof. Pranjali DandekarPage 13


Introduction to Computer Network

SNMP defines five types of messages: GetRequest, GetNextRequest, SetRequest,


GetResponse, and Trap.

GetRequest: The GetRequest message is sent from a manager (client) to the agent (server) to
retrieve the value of a variable.
GetNextRequest: The GetNextRequest message is sent from the manager to agent to retrieve
the value of a variable. This type of message is used to retrieve the values of the entries in a
table. If the manager does not know the indexes of the entries, then it will not be able to
retrieve the values. In such situations, GetNextRequest message is used to define an object.
GetResponse: The GetResponse message is sent from an agent to the manager in response to
the GetRequest and GetNextRequest message. This message contains the value of a variable
requested by the manager.
SetRequest: The SetRequest message is sent from a manager to the agent to set a value in a
variable.
Trap: The Trap message is sent from an agent to the manager to report an event. For example,
if the agent is rebooted, then it informs the manager as well as sends the time of rebooting.
HTTP
o HTTP stands for HyperText Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.

Prof. Pranjali DandekarPage 14


Introduction to Computer Network

o This protocol is known as HyperText Transfer Protocol because of its efficiency that
allows us to use in a hypertext environment where there are rapid jumps from one
document to another document.
o HTTP is similar to the FTP as it also transfers the files from one host to another host.
But, HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control
connection to transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and server. The
HTTP differs from the SMTP in the way the messages are sent from the client to the
server and from server to the client. SMTP messages are stored and forwarded while
HTTP messages are delivered immediately.

Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a
request and waits for a response from the server. When the server receives the request,
the server processes the request and sends back the response to the HTTP client after
which the client disconnects the connection. The connection between client and server
exist only during the current request and response time only.
o Media independent: HTTP protocol is a media independent as data can be sent as long
as both the client and server know how to handle the data content. It is required for
both the client and server to specify the content type in MIME-type header.
o Stateless: HTTP is a stateless protocol as both the client and server know each other
only during the current request. Due to this nature of the protocol, both the client and
server do not retain the information between various requests of the web pages.

Prof. Pranjali DandekarPage 15


Introduction to Computer Network

HTTP Transactions

The above figure shows the HTTP transaction between client and server. The client initiates a
transaction by sending a request message to the server. The server replies to the request
message by sending a response message.
Messages
HTTP messages are of two types: request and response. Both the message types follow the
same message format.
Request Message: The request message is sent by the client that consists of a request line,
headers, and sometimes a body.

Response Message: The response message is sent by the server to the client that consists of a
status line, headers, and sometimes a body.

Prof. Pranjali DandekarPage 16


Introduction to Computer Network

Uniform Resource Locator (URL)


o A client that wants to access the document in an internet needs an address and to
facilitate the access of documents, the HTTP uses the concept of Uniform Resource
Locator (URL).
o The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
o The URL defines four parts: method, host computer, port, and path.

o Method: The method is the protocol used to retrieve the document from a server. For
example, HTTP.
o Host: The host is the computer where the information is stored, and the computer is
given an alias name. Web pages are mainly stored in the computers and the computers
are given an alias name that begins with the characters "www". This field is not
mandatory.
o Port: The URL can also contain the port number of the server, but it's an optional
field. If the port number is included, then it must come between the host and path and
it should be separated from the host by a colon.
o Path: Path is the pathname of the file where the information is stored. The path itself
contain slashes that separate the directories from the subdirectories and files.

What is HTTPS?

The full form of HTTPS is Hypertext Transfer Protocol Secure. The HTTP protocol does not
provide the security of the data, while HTTP ensures the security of the data. Therefore, we

Prof. Pranjali DandekarPage 17


Introduction to Computer Network

can say that HTTPS is a secure version of the HTTP protocol. This protocol allows
transferring the data in an encrypted form. The use of HTTPS protocol is mainly required
where we need to enter the bank account details. The HTTPS protocol is mainly used where
we require to enter the login credentials. In modern browsers such as chrome, both the
protocols, i.e., HTTP and HTTPS, are marked differently. To provide encryption, HTTPS
uses an encryption protocol known as Transport Layer Security, and officially, it is referred
to as a Secure Sockets Layer (SSL). This protocol uses a mechanism known as asymmetric
public key infrastructure, and it uses two different keys which are given below:
o Private key: This key is available on the web server, which is managed by the owner
of a website.

It decrypts the information which is encrypted by the public key.


o Public key: This key is available to everyone. It converts the data into an encrypted
form.

Main difference between the HTTP and HTTPS

The major difference between the HTTP and HTTPS is the SSL certificate. The HTTPS
protocol is an extended version of the HTTP protocol with an additional feature of security.

This additional feature of security is very important for those websites which transmit
sensitive data such as credit card information.

The HTTPS protocol is secured due to the SSL protocol. The SSL protocol encrypts the data
which the client transmits to the server. If someone tries to steal the information which is
being communicated between the client and the server, then he/she would not be able to
understand due to the encryption. This is the main difference between the HTTP and HTTPS
that the HTTP does not contain SSL, whereas the HTTPS contains SSL that provides secure
communication between the client and the server.

Which is better, HTTP or HTTPS?

Till now, we read that the HTTPS is better than HTTP because it provides security.
Sometimes our website does not contain an e-commerce page that requires sensitive data; in
that case, we can switch to the HTTP protocol. Despite the security, HTTPS also
provides SEO. So, we do need to put more effort into boosting our SEO.

HTTP vs HTTPS performance

The speed of HTTP is faster than the HTTPS as the HTTPS contains SSL protocol, while
HTTPS does not contain an SSL protocol. This additional feature of SSL in HTTPS makes
the page loading slower.

Differences between HTTP and HTTPS

HTTP HTTPS

Prof. Pranjali DandekarPage 18


Introduction to Computer Network

The full form of HTTP is the Hypertext The full form of HTTPS is Hypertext Transfer
Transfer Protocol. Protocol Secure.

It is written in the address bar as http://. It is written in the address bar as https://.

The HTTP transmits the data over port The HTTPS transmits the data over port
number 80. number 443.

It is unsecured as the plain text is sent, It is secure as it sends the encrypted data
which can be accessible by the hackers. which hackers cannot understand.

It is mainly used for those websites that It is a secure protocol, so it is used for those
provide information like blog writing. websites that require to transmit the bank
account details or credit card numbers.

It is an application layer protocol. It is a transport layer protocol.

It does not use SSL. It uses SSL that provides the encryption of the
data.

Google does not give the preference to the Google gives preferences to the HTTPS as
HTTP websites. HTTPS websites are secure websites.

The page loading speed is fast. The page loading speed is slow as compared to
HTTP because of the additional feature that it
supports, i.e., security.

POP Protocol
The POP protocol stands for Post Office Protocol. As we know that SMTP is used as a
message transfer agent. When the message is sent, then SMPT is used to deliver the message
from the client to the server and then to the recipient server. But the message is sent from the
recipient server to the actual server with the help of the Message Access Agent. The Message
Access Agent contains two types of protocols, i.e., POP3 and IMAP.

How is mail transmitted?

Prof. Pranjali DandekarPage 19


Introduction to Computer Network

Suppose sender wants to send the mail to receiver. First mail is transmitted to the sender's
mail server. Then, the mail is transmitted from the sender's mail server to the receiver's mail
server over the internet. On receiving the mail at the receiver's mail server, the mail is then
sent to the user. The whole process is done with the help of Email protocols. The
transmission of mail from the sender to the sender's mail server and then to the receiver's mail
server is done with the help of the SMTP protocol. At the receiver's mail server, the POP
or IMAP protocol takes the data and transmits to the actual user.
Since SMTP is a push protocol so it pushes the message from the client to the server. As we
can observe in the above figure that SMTP pushes the message from the client to the
recipient's mail server. The third stage of email communication requires a pull protocol, and
POP is a pull protocol. When the mail is transmitted from the recipient mail server to the
client which means that the client is pulling the mail from the server.

What is POP3?

The POP3 is a simple protocol and having very limited functionalities. In the case of the
POP3 protocol, the POP3 client is installed on the recipient system while the POP3 server is
installed on the recipient's mail server.
Let's understand the working of the POP3 protocol.

Prof. Pranjali DandekarPage 20


Introduction to Computer Network

To establish the connection between the POP3 server and the POP3 client, the POP3 server
asks for the user name to the POP3 client. If the username is found in the POP3 server, then it
sends the ok message. It then asks for the password from the POP3 client; then the POP3
client sends the password to the POP3 server. If the password is matched, then the POP3
server sends the OK message, and the connection gets established. After the establishment of
a connection, the client can see the list of mails on the POP3 mail server. In the list of mails,
the user will get the email numbers and sizes from the server. Out of this list, the user can
start the retrieval of mail.

Once the client retrieves all the emails from the server, all the emails from the server are
deleted. Therefore, we can say that the emails are restricted to a particular machine, so it
would not be possible to access the same mails on another machine. This situation can be
overcome by configuring the email settings to leave a copy of mail on the mail server.

Advantages of POP3 protocol

The following are the advantages of a POP3 protocol:

o It allows the users to read the email offline. It requires an internet connection only at
the time of downloading emails from the server. Once the mails are downloaded from
the server, then all the downloaded mails reside on our PC or hard disk of our
computer, which can be accessed without the internet. Therefore, we can say that the
POP3 protocol does not require permanent internet connectivity.
o It provides easy and fast access to the emails as they are already stored on our PC.
o There is no limit on the size of the email which we receive or send.
o It requires less server storage space as all the mails are stored on the local machine.
o There is maximum size on the mailbox, but it is limited by the size of the hard disk.

Prof. Pranjali DandekarPage 21


Introduction to Computer Network

o It is a simple protocol so it is one of the most popular protocols used today.


o It is easy to configure and use.

Disadvantages of POP3 protocol

The following are the advantages of a POP3 protocol:

o If the emails are downloaded from the server, then all the mails are deleted from the
server by default. So, mails cannot be accessed from other machines unless they are
configured to leave a copy of the mail on the server.
o Transferring the mail folder from the local machine to another machine can be
difficult.
o Since all the attachments are stored on your local machine, there is a high risk of a
virus attack if the virus scanner does not scan them. The virus attack can harm the
computer.
o The email folder which is downloaded from the mail server can also become
corrupted.
o The mails are stored on the local machine, so anyone who sits on your machine can
access the email folder.

IMAP Protocol
IMAP stands for Internet Message Access Protocol. It is an application layer protocol which
is used to receive the emails from the mail server. It is the most commonly used protocols
like POP3 for retrieving the emails.
It also follows the client/server model. On one side, we have an IMAP client, which is a
process running on a computer. On the other side, we have an IMAP server, which is also a
process running on another computer. Both computers are connected through a network.
The IMAP protocol resides on the TCP/IP transport layer which means that it implicitly uses
the reliability of the protocol. Once the TCP connection is established between the IMAP
client and IMAP server, the IMAP server listens to the port 143 by default, but this port
number can also be changed.
By default, there are two ports used by IMAP:
o Port 143: It is a non-encrypted IMAP port.
o Port 993: This port is used when IMAP client wants to connect through IMAP
securely.

Why should we use IMAP instead of POP3 protocol?

POP3 is becoming the most popular protocol for accessing the TCP/IP mailboxes. It
implements the offline mail access model, which means that the mails are retrieved from the
mail server on the local machine, and then deleted from the mail server. Nowadays, millions
of users use the POP3 protocol to access the incoming mails. Due to the offline mail access

Prof. Pranjali DandekarPage 22


Introduction to Computer Network

model, it cannot be used as much. The online model we would prefer in the ideal world. In
the online model, we need to be connected to the internet always. The biggest problem with
the offline access using POP3 is that the mails are permanently removed from the server, so
multiple computers cannot access the mails. The solution to this problem is to store the mails
at the remote server rather than on the local server. The POP3 also faces another issue, i.e.,
data security and safety. The solution to this problem is to use the disconnected access model,
which provides the benefits of both online and offline access. In the disconnected access
model, the user can retrieve the mail for local use as in the POP3 protocol, and the user does
not need to be connected to the internet continuously. However, the changes made to the
mailboxes are synchronized between the client and the server. The mail remains on the server
so different applications in the future can access it. When developers recognized these
benefits, they made some attempts to implement the disconnected access model. This is
implemented by using the POP3 commands that provide the option to leave the mails on the
server. This works, but only to a limited extent, for example, keeping track of which
messages are new or old become an issue when both are retrieved and left on the server. So,
the POP3 lacks some features which are required for the proper disconnected access model.

In the mid-1980s, the development began at Stanford University on a new protocol that
would provide a more capable way of accessing the user mailboxes. The result was the
development of the interactive mail access protocol, which was later renamed as Internet
Message Access Protocol.

IMAP Features

IMAP was designed for a specific purpose that provides a more flexible way of how the user
accesses the mailbox. It can operate in any of the three modes, i.e., online, offline, and
disconnected mode. Out of these, offline and disconnected modes are of interest to most users
of the protocol.

The following are the features of an IMAP protocol:

o Access and retrieve mail from remote server: The user can access the mail from the
remote server while retaining the mails in the remote server.
o Set message flags: The message flag is set so that the user can keep track of which
message he has already seen.
o Manage multiple mailboxes: The user can manage multiple mailboxes and transfer
messages from one mailbox to another. The user can organize them into various
categories for those who are working on various projects.
o Determine information prior to downloading: It decides whether to retrieve or not
before downloading the mail from the mail server.
o Downloads a portion of a message: It allows you to download the portion of a
message, such as one body part from the mime-multi part. This can be useful when
there are large multimedia files in a short-text element of a message.
o Organize mails on the server: In case of POP3, the user is not allowed to manage the
mails on the server. On the other hand, the users can organize the mails on the server

Prof. Pranjali DandekarPage 23


Introduction to Computer Network

according to their requirements like they can create, delete or rename the mailbox on
the server.
o Search: Users can search for the contents of the emails.
o Check email-header: Users can also check the email-header prior to downloading.
o Create hierarchy: Users can also create the folders to organize the mails in a
hierarchy.

What is World Wide Web?


World Wide Web, which is also known as a Web, is a collection of websites or web pages
stored in web servers and connected to local computers through the internet. These websites
contain text pages, digital images, audios, videos, etc. Users can access the content of these
sites from any part of the world over the internet using their devices such as computers,
laptops, cell phones, etc. The WWW, along with internet, enables the retrieval and display of
text and media to your device.
The building blocks of the Web are web pages which are formatted in HTML and connected
by links called "hypertext" or hyperlinks and accessed by HTTP. These links are electronic
connections that link related pieces of information so that users can access the desired
information quickly. Hypertext offers the advantage to select a word or phrase from text and
thus to access other pages that provide additional information related to that word or phrase.
A web page is given an online address called a Uniform Resource Locator (URL). A
particular collection of web pages that belong to a specific URL is called a website,
e.g., www.facebook.com, www.google.com, etc. So, the World Wide Web is like a huge
electronic book whose pages are stored on multiple servers across the world.
Small websites store all of their WebPages on a single server, but big websites or
organizations place their WebPages on different servers in different countries so that when
users of a country search their site they could get the information quickly from the nearest
server.
So, the web provides a communication platform for users to retrieve and exchange
information over the internet. Unlike a book, where we move from one page to another in a
sequence, on World Wide Web we follow a web of hypertext links to visit a web page and
from that web page to move to other web pages. You need a browser, which is installed on
your computer, to access the Web.

Difference between World Wide Web and Internet:


Some people use the terms 'internet' and 'World Wide Web' interchangeably. They think they
are the same thing, but it is not so. Internet is entirely different from WWW. It is a worldwide
network of devices like computers, laptops, tablets, etc. It enables users to send emails to
other users and chat with them online. For example, when you send an email or chatting with
someone online, you are using the internet.

But, when you have opened a website like google.com for information, you are using the
World Wide Web; a network of servers over the internet. You request a webpage from your
computer using a browser, and the server renders that page to your browser. Your computer

Prof. Pranjali DandekarPage 24


Introduction to Computer Network

is called a client who runs a program (web browser), and asks the other computer (server) for
the information it needs.

How the World Wide Web Works?


Now, we have understood that WWW is a collection of websites connected to the internet so
that people can search and share information. Now, let us understand how it works!
The Web works as per the internet's basic client-server format as shown in the following
image. The servers store and transfer web pages or information to user's computers on the
network when requested by the users. A web server is a software program which serves the
web pages requested by web users using a browser. The computer of a user who requests
documents from a server is known as a client. Browser, which is installed on the user'
computer, allows users to view the retrieved documents.

All the websites are stored in web servers. Just as someone lives on rent in a house, a website
occupies a space in a server and remains stored in it. The server hosts the website whenever a
user requests its WebPages, and the website owner has to pay the hosting price for the same.
The moment you open the browser and type a URL in the address bar or search something on
Google, the WWW starts working. There are three main technologies involved in transferring
information (web pages) from servers to clients (computers of users). These technologies
include Hypertext Markup Language (HTML), Hypertext Transfer Protocol (HTTP) and Web
browsers.
SSH Meaning| SSH Protocol Definition
SSH stands for Secure Shell or Secure Socket Shell. It is a cryptographic network protocol
that allows two computers to communicate and share the data over an insecure network such
as the internet. It is used to login to a remote server to execute commands and data transfer
from one machine to another machine.
The SSH protocol was developed by SSH communication security Ltd to safely communicate
with the remote machine.

Prof. Pranjali DandekarPage 25


Introduction to Computer Network

Secure communication provides a strong password authentication and encrypted


communication with a public key over an insecure channel. It is used to replace unprotected
remote login protocols such as Telnet, rlogin, rsh, etc., and insecure file transfer protocol FTP
Its security features are widely used by network administrators for managing systems and
applications remotely.

The SSH protocol protects the network from various attacks such as DNS spoofing

, IP source routing, and IP spoofing.

A simple example can be understood, such as suppose you want to transfer a package to one
of your friends. Without SSH protocol, it can be opened and read by anyone. But if you will
send it using SSH protocol, it will be encrypted and secured with the public keys, and only
the receiver can open it.

Usages of SSH protocol


The popular usages of SSH protocol are given below:
o It provides secure access to users and automated processes.
o It is an easy and secure way to transfer files from one system to another over an
insecure network.
o It also issues remote commands to the users.
o It helps the users to manage the network infrastructure and other critical system
components.
o It is used to log in to shell on a remote system (Host), which replaces Telnet and
rlogin and is used to execute a single command on the host, which replaces rsh.
o It combines with rsync utility to backup, copy, and mirror files with complete security
and efficiency.
o It can be used for forwarding a port.
o By using SSH, we can set up the automatic login to a remote server such as
OpenSSH.
o We can securely browse the web through the encrypted proxy connection with the
SSH client, supporting the SOCKS protocol.

How does SSH Works?


The SSH protocol works in a client-server model, which means it connects a secure shell
client application (End where the session is displayed) with the SSH server (End where
session executes).
As discussed above, it was initially developed to replace insecure login protocols such as
Telnet, rlogin, and hence it performs the same function.

Prof. Pranjali DandekarPage 26


Introduction to Computer Network

The basic use of SSH is to connect a remote system for a terminal session and to do this,
following command is used:

ssh [email protected]
The above command enables the client to connect to the server, named server.test.com, using
the ID UserName.
If we are connecting for the first time, it will prompt the remote host's public key fingerprint
and ask to connect. The below message will be prompt:
The authenticity of host 'sample.ssh.com' cannot be established.
DSA key fingerprint is 01:23:45:67:89:ab:cd:ef:ff:fe:dc:ba:98:76:54:32:10.
Are you sure you want to continue connecting (yes/no)?
To continue the session, we need to click yes, else no. If we click yes, then the host key will
be stored in the known_hosts file of the local system. The key is contained within the hidden
file by default, which is /.ssh/known_hosts in the home directory. Once the host key is stored
in this hidden file, there is no need for further approval as the host key will automatically
authenticate the connection.

What can be transferred with SSH protocol?


The SSH protocol can transfer the following:
o Data
o Text
o Commands
o Files

The files are transferred using the SFTP(Secure file transfer protocol), the encrypted version
of FTP that provides security to prevent any threat.
Difference between SSH and Telnet
o Telnet was the first internet application protocol used to create and maintain a
terminal session on a remote host.
o Both SSH and Telnet have the same functionality. Still, the main difference is that
SSH protocol is secured with public-key cryptography that authenticates endpoint

Prof. Pranjali DandekarPage 27


Introduction to Computer Network

while setting up a terminal session. On the other hand, no authentication is provided


in Telnet for the user's authentication, making it less secure.
o SSH sends the encrypted data, while Telnet sends data in plain text.
o Due to high security, SSH is the preferred protocol for public networks, while due to
less security, Telnet is suitable for private networks.
o SSH runs on port no 22 by default, but it can be changed, while Telnet uses port
number 23, specifically designed for the Local area network.

Prof. Pranjali DandekarPage 28

You might also like