You are on page 1of 29

What Is Hyper-V?

Hyper-V is virtualization software that, well, virtualizes


software. It can not only virtualize operating systems but also
entire hardware components, such as hard drives and
network switches. Unlike Fusion and Virtualbox, Hyper-V is
not limited to the user’s device. You can use it for server
virtualization

Why Use a Virtual Machine?

There are many reasons to use a virtual machine. In most


cases, they are used to run software that does not work on
your OS. Whether you’re using a Windows, Mac or Linux OS,a
VM will remove its limitations. For example, if you have a
Windows machine and want to install an application that is
only available for Mac, you can run a macOS instance on your
Windows laptop to install it.

It doesn’t even have to be the case that the software doesn’t


run on Windows. Maybe you work faster on the Linux or Mac
version of it because you’re more familiar with its shortcuts
and usability.

Most software developers like to work on terminals, so they


prefer Linux. That said, since many of us were accompanied
by Windows through our school days, we do paperwork
faster on it.

Another thing to consider is that programs on Windows are


rarely uninstalled without a trace. You will find old settings,
registry entries or other artifacts that will slow down your
operating system. If you want to use an application
temporarily, set up a VM, use the program and remove the
VM when you have finished. That way you won’t have to
clean your notebook afterward.

Using a virtual machine also makes sense for protection.


With the virtualized OS, you bring an extra layer of security
into play. If you’re not quite sure you should run a file you
downloaded from an untrusted source on your productive
OS, use a VM.
DHCP definition

DHCP stands for dynamic host configuration protocol and is a


network protocol used on IP networks where a DHCP server
automatically assigns an IP address and other information to
each host on the network so they can communicate
efficiently with other endpoints.
Computers on a IP networks need some essentials information
before it can communicate with other hosts. This information
include an IP address, and a default route and routing prefix.
Configuring IP addressing on a large TCP/IP-based network can
be a nightmare, especially if machines are moved from one
network to another frequently. DHCP eliminates the manual
task by a network administrator. The Dynamic Host
Configuration Protocol (DHCP) can help with the workload of
configuring systems on a network by assigning addresses to
systems on boot-up automatically. It also provides a central
database of devices that are connected to the network and
eliminates duplicate resource assignments.
DHCP server may have three methods of allocating IP-
addresses:

static allocation: The DHCP server allocates an IP address


based on a table with MAC address/IP address pairs, which are
manually filled Only requesting clients with a MAC address
listed in this table will be allocated an IP address.

dynamic allocation: A network administrator assigns a range


of IP addresses to DHCP, and each client computer on the LAN
is configured to request an IP address from the DHCP server
during network initialization.

automatic allocation: The DHCP server permanently assigns a


free IP address to a requesting client from the range defined
by the administrator. This is like dynamic allocation, but the
DHCP server keeps a table of past IP address assignments, so
that it can preferentially assign to a client the same IP address
that the client previously had.
What is DNS?

The Domain Name System (DNS) is the phonebook of the


Internet. Humans access information online through domain
names, like nytimes.com or espn.com. Web browsers interact
through Internet Protocol (IP) addresses. DNS translates
domain names to IP addresses so browsers can load Internet
resources.

Recursive DNS resolver

The recursive resolver is the computer that responds to a


recursive request from a client and takes the time to track
down the DNS record. It does this by making a series of
requests until it reaches the authoritative DNS nameserver
for the requested record (or times out or returns an error if
no record is found).

Luckily, recursive DNS resolvers do not always need to make


multiple requests in order to track down the records needed
to respond to a client; caching is a data persistence process
that helps short-circuit the necessary requests by serving the
requested resource record earlier in the DNS lookup.

Authoritative DNS server

Put simply, an authoritative DNS server is a server that


actually holds, and is responsible for, DNS resource records.
This is the server at the bottom of the DNS lookup chain that
will respond with the queried resource record, ultimately
allowing the web browser making the request to reach the IP
address needed to access a website or other web resources.

An authoritative nameserver can satisfy queries from its own


data without needing to query another source, as it is the
final source of truth for certain DNS records.
actual physical connection between the devices. The physical
layer contains information in the form of bits. It is
responsible for the actual physical connection between the
devices. When receiving data, this layer will get the signal
received and convert it into 0s and 1s and send them to the
Data Link layer, which will put the frame back together.

The functions of the physical layer are :


1. Bit synchronization: The physical layer provides the
synchronization of the bits by providing a clock. This clock
controls both sender and receiver thus providing
synchronization at bit level.
2. Bit rate control: The Physical layer also defines the
transmission rate i.e. the number of bits sent per second.
3. Physical topologies: Physical layer specifies the way in
which the different, devices/nodes are arranged in a
network i.e. bus, star or mesh topolgy.
4. Transmission mode: Physical layer also defines the way in
which the data flows between the two connected
devices. The various transmission modes possible are:
Simplex, half-duplex and full-duplex.
* Hub, Repeater, Modem, Cables are Physical Layer devices.
** Network Layer, Data Link Layer and Physical Layer are also
known as Lower Layers or Hardware Layers.

2. Data Link Layer (DLL) (Layer 2) :

The data link layer is responsible for the node to node


delivery of the message. The main function of this layer is to
make sure data transfer is error free from one node to
another, over the physical layer. When a packet arrives in a
network, it is the responsibility of DLL to transmit it to the
Host using its MAC address.
Data Link Layer is divided into two sub layers :
1. Logical Link Control (LLC)
2. Media Access Control (MAC)
The packet received from Network layer is further divided
into frames depending on the frame size of NIC(Network
Interface Card). DLL also encapsulates Sender and Receiver’s
MAC address in the header.
The Receiver’s MAC address is obtained by placing an
ARP(Address Resolution Protocol) request onto the wire
asking “Who has that IP address?” and the destination host
will reply with its MAC address.

The functions of the data Link layer are :


1. Framing: Framing is a function of the data link layer. It
provides a way for a sender to transmit a set of bits that
are meaningful to the receiver. This can be accomplished
by attaching special bit patterns to the beginning and end
of the frame.
2. Physical addressing: After creating frames, Data link layer
adds physical addresses (MAC address) of sender and/or
receiver in the header of each frame.
3. Error control: Data link layer provides the mechanism of
error control in which it detects and retransmits damaged
or lost frames.
4. Flow Control: The data rate must be constant on both
sides else the data may get corrupted thus , flow control
coordinates that amount of data that can be sent before
receiving acknowledgement.
5. Access control: When a single communication channel is
shared by multiple devices, MAC sub-layer of data link
layer helps to determine which device has control over
the channel at a given time.
* Packet in Data Link layer is referred as Frame.
** Data Link layer is handled by the NIC (Network Interface
Card) and device drivers of host machines.
*** Switch & Bridge are Data Link Layer devices.
3. Network Layer (Layer 3) :

Network layer works for the transmission of data from one


host to the other located in different networks. It also takes
care of packet routing i.e. selection of the shortest path to
transmit the packet, from the number of routes available.
The sender & receiver’s IP address are placed in the header
by network layer.
The functions of the Network layer are :
1. Routing: The network layer protocols determine which
route is suitable from source to destination. This function
of network layer is known as routing.
2. Logical Addressing: In order to identify each device on
internetwork uniquely, network layer defines an
addressing scheme. The sender & receiver’s IP address
are placed in the header by network layer. Such an
address distinguishes each device uniquely and
universally.
* Segment in Network layer is referred as Packet.

** Network layer is implemented by networking devices such


as routers.

4. Transport Layer (Layer 4) :

Transport layer provides services to application layer and


takes services from network layer. The data in the transport
layer is referred to as Segments. It is responsible for the End
to End delivery of the complete message. Transport layer
also provides the acknowledgment of the successful data
transmission and re-transmits the data if an error is found.
• At sender’s side:
Transport layer receives the formatted data from the upper
layers, performs Segmentation and also implements Flow &
Error control to ensure proper data transmission. It also adds
Source and Destination port number in its header and
forwards the segmented data to the Network Layer.
Note: The sender need to know the port number associated
with the receiver’s application.
Generally, this destination port number is configured, either
by default or manually. For example, when a web application
makes a request to a web server, it typically uses port
number 80, because this is the default port assigned to web
applications. Many applications have default port assigned.
• At receiver’s side:
Transport Layer reads the port number from its header and
forwards the Data which it has received to the respective
application. It also performs sequencing and reassembling of
the segmented data.
The functions of the transport layer are :
1. Segmentation and Reassembly: This layer accepts the
message from the (session) layer , breaks the message
into smaller units . Each of the segment produced has a
header associated with it. The transport layer at the
destination station reassembles the message.
2. Service Point Addressing: In order to deliver the message
to correct process, transport layer header includes a type
of address called service point address or port address.
Thus by specifying this address, transport layer makes
sure that the message is delivered to the correct process.
The services provided by transport layer :
1. Connection Oriented Service: It is a three-phase process
which include
– Connection Establishment
– Data Transfer
– Termination / disconnection
In this type of transmission, the receiving device sends an
acknowledgment, back to the source after a packet or
group of packet is received. This type of transmission is
reliable and secure.
2. Connection less service: It is a one phase process and
includes Data Transfer. In this type of transmission, the
receiver does not acknowledge receipt of a packet. This
approach allows for much faster communication between
devices. Connection oriented Service is more reliable
than connection less Service.
* Data in the Transport Layer is called as Segments.
** Transport layer is operated by the Operating System. It is a
part of the OS and communicates with the Application Layer
by making system calls.
Transport Layer is called as Heart of OSI model.

5. Session Layer (Layer 5) :

This layer is responsible for establishment of connection,


maintenance of sessions, authentication and also ensures
security.
The functions of the session layer are :
1. Session establishment, maintenance and
termination: The layer allows the two processes to
establish, use and terminate a connection.
2. Synchronization : This layer allows a process to add
checkpoints which are considered as synchronization
points into the data. These synchronization point help to
identify the error so that the data is re-synchronized
properly, and ends of the messages are not cut
prematurely and data loss is avoided.
3. Dialog Controller : The session layer allows two systems
to start communication with each other in half-duplex or
full-duplex.
**All the below 3 layers(including Session Layer) are
integrated as a single layer in TCP/IP model as “Application
Layer”.
**Implementation of these 3 layers is done by the network
application itself. These are also known as Upper
Layers or Software Layers.

SCENARIO:
Let’s consider a scenario where a user wants to send a
message through some Messenger application running in his
browser. The “Messenger” here acts as the application layer
which provides the user with an interface to create the data.
This message or so-called Data is compressed, encrypted (if
any secure data) and converted into bits (0’s and 1’s) so that
it can be transmitted.
6. Presentation Layer (Layer 6) :

Presentation layer is also called the Translation layer.The


data from the application layer is extracted here and
manipulated as per the required format to transmit over the
network.
The functions of the presentation layer are :
1. Translation : For example, ASCII to EBCDIC.
2. Encryption/ Decryption : Data encryption translates the
data into another form or code. The encrypted data is
known as the cipher text and the decrypted data is
known as plain text. A key value is used for encrypting as
well as decrypting data.
3. Compression: Reduces the number of bits that need to
be transmitted on the network.

7. Application Layer (Layer 7) :

At the very top of the OSI Reference Model stack of layers,


we find Application layer which is implemented by the
network applications. These applications produce the data,
which has to be transferred over the network. This layer also
serves as a window for the application services to access the
network and for displaying the received information to the
user.
Ex: Application – Browsers, Skype Messenger etc.
**Application Layer is also called as Desktop Layer.

The functions of the Application layer are :


1. Network Virtual Terminal
2. FTAM-File transfer access and management
3. Mail Services
4. Directory Services
OSI model acts as a reference model and is not implemented
in Internet because of its late invention. Current model being
used is the TCP/IP model.

Web proxy

A web proxy is one method for hiding your IP address from


the websites you visit. Web/online proxies are a bit
like search engines, and so are really easy to access. When
you use an online proxy, the websites you visit are unable to
see your real location because the proxy makes it look like
you're accessing the page from somewhere else.

Web proxies act as shields between you and the website


you're visiting. When you're viewing a web page through a
web proxy, the website sees that a specific IP address is
accessing its server, but the address isn't yours because all of
the web traffic between your computer and the web server is
first passed through the proxy server.

Another way to visualize a web proxy is as a middleman. For


example, when you request the Lifewire site through an
online proxy, all you're really doing is telling the proxy server
to access Lifewire for you, and then when they receive the
page you want, they send it back to you. This happens over
and over, very quickly, so that you can browse the website
normally while hiding your identity, and without giving up
your real public IP address.
Definition

A web cache is a hardware device or software application for


temporarily storing frequently-accessed static content.

Overview

Internet users with similar interests often download the


same web content over and over again. Without a proper
web cache, every time a user makes a request the response
must come all the way from the origin server (part of the
“Internet” in the illustration above). When many users are
requesting content at the same time, response times may
increase and a server overload may even occur.

A web cache handles requests for popular content that


would otherwise be directed to the origin server. It also puts
popular content closer to end users, thereby improving
response times. One popular type of web cache is a CDN.
How a web cache works

Whenever content is downloaded from the origin server, a


copy is stored in the web cache for a set period of time
determined by caching rules you set. If another user requests
the same content again, the web cache sends the stored
content and the user request does not have to be forwarded
to origin server again. This is known as content caching.
A typical web cache flow looks like this:
1. A user accesses a website.
2. The browser sends an HTTP request to the web cache.
3. If the requested object IS stored in the cache, the web
cache responds with the object. If the requested
object IS NOT stored in the cache, the web cache
requests the object from the origin server and sends the
response to the browser.
4. If the object is cacheable, the web cache retains a copy
of the object so that subsequent requests are served
locally from the web cache.

Cookies

A cookie is information that a Web site puts on your hard


disk so that it can remember something about you at a later
time. (More technically, it is information for future use that is
stored by the server on the client side of
a client/server communication.) Typically, a cookie records
your preferences when using a particular site. Using the
Web's Hypertext Transfer Protocol (HTTP), each request for a
Web page is independent of all other requests. For this
reason, the Web page server has no memory of what pages it
has sent to a user previously or anything about your previous
visits. A cookie is a mechanism that allows the server to store
its own information about a user on the user's own
computer. You can view the cookies that have been stored
on your hard disk (although the content stored in each cookie
may not make much sense to you). The location of the
cookies depends on the browser. Internet Explorer stores
each cookie as a separate file under a Windows subdirectory.
Netscape stores all cookies in a single cookies.txt
fle. Opera stores them in a single cookies.dat file.
Cookies are commonly used to rotate the banner ads that a
site sends so that it doesn't keep sending the same ad as it
sends you a succession of requested pages. They can also be
used to customize pages for you based on your browser type
or other information you may have provided the Web site.
Web users must agree to let cookies be saved for them, but,
in general, it helps Web sites to serve users better.

Cookies: Keeping User State

client server
Cookie file usual http request server
ebay: 8734 msg
usual http response + creates I
Set-cookie: 1678
1678 for u
Cookie file
usual http request
amazon: 1678 msg cookie-
ebay: 8734 cookie:
usual 1678
http response
specific
msg action

Cookie file usual http request


cookie
msg
amazon: 1678
cookie: 1678 spectifi
ebay: 8734 usual http response
msg action

Packet Switching
Packet switching is a connectionless network switching
technique. Here, the message is divided and grouped into a
number of units called packets that are individually routed
from the source to the destination. There is no need to
establish a dedicated circuit for communication.
Process
Each packet in a packet switching technique has two parts: a
header and a payload. The header contains the addressing
information of the packet and is used by the intermediate
routers to direct it towards its destination. The payload carries
the actual data.
A packet is transmitted as soon as it is available in a node,
based upon its header information. The packets of a message
are not routed via the same path. So, the packets in the
message arrives in the destination out of order. It is the
responsibility of the destination to reorder the packets in
order to retrieve the original message.
The process is diagrammatically represented in the following
figure. Here the message comprises of four packets, A, B, C and
D, which may follow different routes from the sender to the
receiver.
Bit Torrent
The BitTorrent protocol can be used to reduce the server and
network impact of distributing large files. Rather than
downloading a file from a single source server, the BitTorrent
protocol allows users to join a "swarm" of hosts to upload
to/download from each other simultaneously. The protocol is
an alternative to the older single source, multiple mirror
sources technique for distributing data, and can work
effectively over networks with lower bandwidth. Using the
BitTorrent protocol, several basic computers, such as home
computers, can replace large servers while efficiently
distributing files to many recipients. This lower bandwidth
usage also helps prevent large spikes in internet traffic in a
given area, keeping internet speeds higher for all users in
general, regardless of whether or not they use the BitTorrent
protocol.
The first release of the Bittorrent client had no search engine
and no peer exchange, so users who wanted to upload a file
had to create a small torrent descriptor file that they would
upload to a torrent index site. The first uploader acted as
a seed, and downloaders would initially connect as peers.
(see diagram on the right) Those who wish to download the
file would download the torrent which their client would use
to connect to tracker which had a list of the IP addresses of
other seeds and peers in the swarm. Once a peer completed
a download of the complete file, it could in turn function as a
seed.
The file being distributed is divided
into segments called pieces. As each peer receives a new
piece of the file, it becomes a source (of that piece) for other
peers, relieving the original seed from having to send that
piece to every computer or user wishing a copy. With
BitTorrent, the task of distributing the file is shared by those
who want it; it is entirely possible for the seed to send only a
single copy of the file itself, and eventually distribute to an
unlimited number of peers. Each piece is protected by
a cryptographic hash contained in the torrent
descriptor.[6] This ensures that any modification of the piece
can be reliably detected, and thus prevents both accidental
and malicious modifications of any of the pieces received at
other nodes. If a node starts with an authentic copy of the
torrent descriptor, it can verify the authenticity of the entire
file it receives.
Pieces are typically downloaded non-sequentially, and are
rearranged into the correct order by the BitTorrent client,
which monitors which pieces it needs, and which pieces it has
and can upload to other peers. Pieces are of the same size
throughout a single download (for example a 10 MB file may
be transmitted as ten 1 MB pieces or as forty 256 KB pieces).
Due to the nature of this approach, the download of any file
can be halted at any time and be resumed at a later date,
without the loss of previously downloaded information,
which in turn makes BitTorrent particularly useful in the
transfer of larger files. This also enables the client to seek out
readily available pieces and download them immediately,
rather than halting the download and waiting for the next
(and possibly unavailable) piece in line, which typically
reduces the overall time of the download. This eventual
transition from peers to seeders determines the overall
"health" of the file (as determined by the number of times a
file is available in its complete form).
The distributed nature of BitTorrent can lead to a flood-
like spreading of a file throughout many peer computer
nodes. As more peers join the swarm, the likelihood of a
successful download by any particular node increases.
Relative to traditional Internet distribution schemes, this
permits a significant reduction in the original distributor's
hardware and bandwidth resource costs. Distributed
downloading protocols in general
provide redundancy against system problems, reduce
dependence on the original distributor,[9] and provide
sources for the file which are generally transient and
therefore there is no single point of failure as in one way
server-client transfers

Napster
Napster is a different way to distribute MP3 files. Instead of
storing the songs on a central computer, the songs live on
users's machines. When you want to download a song using
Napster, you are downloading it from another person's
machine, and that person could be your next door neighbor
or someone halfway around the world. Individuals tend to be
less concerned about copyright laws than businesses like
mp3.com have to be, so individuals make all sorts of
copyrighted songs available to the world from their personal
machines. This means that anyone can download, for free,
any song that someone has taken the time to encode in the
MP3 format

Session Layer
Session layer is one of the most important layers in the OSI
model because it is responsible for two important things in
the computer networks i.e. authorization and authentication.
Let’s talk more about the basics of the session layer below.

ession layer functionalities:

 Session management
As its name suggests, the session layer is responsible for
managing a session which includes opening, closing and
managing a session between end-user application processes.
You can think of session layer as the main layer which
handles the requests and responses between the two
applications.

For example, if you are downloading some pictures from


Facebook, a network path is defined by the network layer but
the requests for the photos and responses by Facebook to
you is handled by the session layer.

If you have heard of HTTP 1.0 or HTTP 1.1, these application


layer protocols somehow follow the session layer orders in
delivering the data.

 Authentication
Before establishing a session with some network peer, it is
important for one of the computers to know that another
peer it is communicating to is a legitimate one. In short
terms, you can say that authentication is the process of
verifying that "you are who you say you are".

 Authorization
Authorization is more like "Are you authorized to do so?"

Here is an example:

If someone knows my email address and password, he can


easily authenticate himself as 'Amar Shekhar' and he can log
in as well. However, since he is not the right person to access
my personal email account, so he is not an authorized person
to do so.

So the basic difference between the two is: authentication is


the process of verifying that "you are who you say you are",
authorization is the process of verifying that "you are
permitted to do what you are trying to do". Authorization
thus presupposes authentication.

ransport Layer - OSI Model


The basic function of the Transport layer is to accept data
from the layer above, split it up into smaller units, pass these
data units to the Network layer, and ensure that all the
pieces arrive correctly at the other end.
Furthermore, all this must be done efficiently and in a way
that isolates the upper layers from the inevitable changes in
the hardware technology.
The Transport layer also determines what type of service to
provide to the Session layer, and, ultimately, to the users of
the network. The most popular type of transport connection
is an error-free point-to-point channel that delivers
messages or bytes in the order in which they were sent.
The Transport layer is a true end-to-end layer, all the way
from the source to the destination. In other words, a
program on the source machine carries on a conversation
with a similar program on the destination machine, using the
message headers and control messages.

Functions of Transport Layer


1. Service Point Addressing: Transport Layer header
includes service point address which is port address.
This layer gets the message to the correct process on
the computer unlike Network Layer, which gets each
packet to the correct computer.
2. Segmentation and Reassembling: A message is divided
into segments; each segment contains sequence
number, which enables this layer in reassembling the
message. Message is reassembled correctly upon arrival
at the destination and replaces packets which were lost
in transmission.
3. Connection Control: It includes 2 types:
o Connectionless Transport Layer : Each segment is

considered as an independent packet and delivered


to the transport layer at the destination machine.
o Connection Oriented Transport Layer : Before

delivering packets, connection is made with


transport layer at the destination machine.
4. Flow Control: In this layer, flow control is performed
end to end.
5. Error Control: Error Control is performed end to end in
this layer to ensure that the complete message arrives
at the receiving transport layer without any error. Error
Correction is done through retransmission.
Presentation Layer
The presentation layer is responsible for the formatting and
delivery of information to the application layer for further
processing or display.[4] It relieves the application layer of
concern regarding syntactical differences
in data representation within the end-user systems. An
example of a presentation service would be the conversion of
an EBCDIC-coded text computer file to an ASCII-coded file.
The presentation layer is the lowest layer at which
application programmers consider data structure and
presentation, instead of simply sending data in the form
of datagrams or packets between hosts. This layer deals with
issues of string representation - whether they use
the Pascal method (an integer length field followed by the
specified amount of bytes) or the C/C++ method (null-
terminated strings, e.g. "thisisastring\0"). The idea is that the
application layer should be able to point at the data to be
moved, and the presentation layer will deal with the rest.
Serialization of complex data structures into flat byte-strings
(using mechanisms such as TLV or XML) can be thought of as
the key functionality of the presentation layer.
Encryption is typically done at this level too, although it can
be done on the application, session, transport, or network
layers, each having its own advantages and
disadvantages.[1] Decryption is also handled at the
presentation layer. For example, when logging on to bank
account sites the presentation layer will decrypt the data as it
is received.[1] Another example is representing structure,
which is normally standardized at this level, often by
using XML. As well as simple pieces of data, like strings, more
complicated things are standardized in this layer. Two
common examples are 'objects' in object-oriented
programming, and the exact way that streaming video is
transmitted.

Hyper Text Transfer Protocol-

 HTTP is short for Hyper Text Transfer Protocol.


 It is an application layer protocol.

Purpose-

 It is mainly used for the retrieval of data from websites throughout the internet.
 It works on the top of TCP/IP suite of protocols.

Working-

HTTP uses a client-server model where-


 Web browser is the client.
 Client communicates with the web server hosting the website.
Whenever a client requests some information (say clicks on a hyperlink) to the website
server.
The browser sends a request message to the HTTP server for the requested objects.

Then-
 HTTP opens a connection between the client and server through TCP.
 HTTP sends a request to the server which collects the requested data.
 HTTP sends the response with the objects back to the client.
 HTTP closes the connection.

Simple Mail Transfer Protocol-

 SMTP is short for Simple Mail Transfer Protocol.


 It is an application layer protocol.
 It is used for sending the emails efficiently and reliably over the internet.

Working-

 SMTP server is always on a listening mode.


 Client initiates a TCP connection with the SMTP server.
 SMTP server listens for a connection and initiates a connection on that port.
 The connection is established.
 Client informs the SMTP server that it would like to send a mail.
 Assuming the server is OK, client sends the mail to its mail server.
 Client’s mail server use DNS to get the IP Address of receiver’s mail server.
 Then, SMTP transfers the mail from sender’s mail server to the receiver’s mail server.
While sending the mail, SMTP is used two times-
1. Between the sender and the sender’s mail server
2. Between the sender’s mail server and the receiver’s mail server

NOTE-

To receive or download the email,


 Another protocol is needed between the receiver’s mail server and the receiver.
 The most commonly used protocols are POP3 and IMAP.

Characteristics of SMTP-

 SMTP is a push protocol.


 SMTP uses TCP at the transport layer.
 SMTP uses port number 25.
 SMTP uses persistent TCP connections, so it can send multiple emails at once.
 SMTP is a connection oriented protocol.
 SMTP is an in-band protocol.
 SMTP is a stateless protocol.

ile Transfer Protocol-

 FTP is short for File Transfer Protocol.


 It is an application layer protocol.
Purpose-

 It is used for exchanging files over the internet.


 It enables the users to upload and download the files from the internet.

Working-

FTP establishes two TCP connections between the client and the server.
 One connection is used for transferring data.
 Other connection is used for transferring control information.

Characteristics of FTP-

 FTP uses TCP at the transport layer.


 FTP uses port number 21 for control connection.
 FTP uses port number 20 for data connection.
 FTP uses persistent TCP connections for control connection.
 FTP uses non-persistent connections for data connection.
 FTP is a connection oriented protocol.
 FTP is an out-of-band protocol as data and control information flow over different
connections.
 SMTP is a stateful protocol.

Important Notes-

Note-01:
Emails can’t be sent using FTP.

This is because-
 FTP requires the connection establishment between the client and server before
transferring the files.
 So, both have to be online at the same time.
 That is why, emails are not sent using FTP.

Note-02:

FTP can transfer one file at a time.

 FTP is used for transferring one file at a time in either direction between the client and
the server.

Note-03:

FTP is a stateful protocol.

This is because-
 The client establishes control connection for the duration of an FTP session.
 It typically spans multiple data transfers.
 So, FTP is a stateful protocol.

You might also like