FTP&E Mail

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

File Transfer Protocol (FTP)

Control connection:-
For sending control information like user identification, password, commands to change the
remote directory, commands to retrieve and store files, etc., FTP makes use of a control
connection. The control connection is initiated on port number 21.

Data connection:-
For sending the actual file, FTP makes use of a data connection. A data connection is initiated on
port number 20.

FTP Session:
When an FTP session is started between a client and a server, the client initiates a control TCP
connection with the server-side. The client sends control information over this. When the server
receives this, it initiates a data connection to the client-side. Only one file can be sent over one
data connection. But the control connection remains active throughout the user session.

FTP Commands – Some of the FTP commands are:

USER – This command sends the user identification to the server.


PASS – This command sends the user password to the server.
CWD – This command allows the user to work with a different directory or dataset for file
storage or retrieval without altering his login or accounting information.
RMD – This command causes the directory specified in the path name to be removed as a
directory.
MKD – This command causes the directory specified in the pathname to be created as a
directory.
PWD – This command causes the name of the current working directory to be returned in the
reply.
RETR – This command causes the remote host to initiate a data connection and to send the
requested file over the data connection.
STOR – This command causes to store of a file into the current directory of the remote host.
LIST – Sends a request to display the list of all the files present in the directory.
ABOR – This command tells the server to abort the previous FTP service command and any
associated transfer of data.
QUIT – This command terminates a USER and if file transfer is not in progress, the server closes
the control connection.

FTP Replies – Some of the FTP replies are :

200 Command okay.


530 Not logged in.
331 User name okay, need a password.
225 Data connection open; no transfer in progress.
221 Service closing control connection.
551 Requested action aborted: page type unknown.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.

Advantages of FTP (File Transfer Protocol):-

 Speed is one of the advantages of FTP(File Transfer Protocol).

 File sharing also comes in the category of advantages of FTP in this between two
machines files can be shared on the network.

 Efficiency is more in FTP.

Disadvantages of FTP (File Transfer Protocol):-

 File size limit is the drawback of FTP only 2 GB size files can be transferred.

 Multiple receivers are not supported by the FTP.

 FTP does not encrypt the data this is one of the biggest drawbacks of FTP.

 FTP is unsecured we use login IDs and passwords making it secure but they can be
attacked by hackers.
Electronic Mail (E-Mail) in Internet

In this topic, we will be covering one of the most popular Internet services that is Electronic
Mail(E-mail) in detail.

Electronic mail is often referred to as E-mail and it is a method used for exchanging digital
messages.

 Electronic mail is mainly designed for human use.

 It allows a message to includes text, image, audio as well as video.

 This service allows one message to be sent to one or more than one recipient.

 The E-mail systems are mainly based on the store-and-forward model where the E-mail
server system accepts, forwards, deliver and store the messages on behalf of users who
only need to connect to the infrastructure of the Email.

 The Person who sends the email is referred to as the Sender while the person who
receives an email is referred to as the Recipient.

Need of an Email:

By making use of Email, we can send any message at any time to anyone.

 We can send the same message to several peoples at the same time.

 It is a very fast and efficient way of transferring information.

 The email system is very fast as compared to the Postal system.

 Information can be easily forwarded to coworkers without retyping it.

Components of E-mail System


The basic Components of an Email system are as follows:
1. User Agent(UA)

It is a program that is mainly used to send and receive an email. It is also known as an email
reader. User-Agent is used to compose, send and receive emails.

 It is the first component of an Email.

 User-agent also handles the mailboxes.

 The User-agent mainly provides the services to the user in order to make the sending and
receiving process of message easier.

Given below are some services provided by the User-Agent:

1. Reading the Message

2. Replying the Message

3. Composing the Message

4. Forwarding the Message.

5. Handling the Message.

2. Message Transfer Agent

The actual process of transferring the email is done through the Message Transfer Agent(MTA).

 In order to send an Email, a system must have an MTA client.

 In order to receive an email, a system must have an MTA server.

 The protocol that is mainly used to define the MTA client and MTA server on the internet
is called SMTP (Simple Mail Transfer Protocol).

 The SMTP mainly defines how the commands and responses must be sent back and forth

3. Message Access Agent

In the first and second stages of email delivery, we make use of SMTP.

 SMTP is basically a Push protocol.


 The third stage of the email delivery mainly needs the pull protocol, and at this stage, the
message access agent is used.

 The two protocols used to access messages are POP (Post Office Protocol) and IMAP4
(Internet Message Access Protocol).

Architecture of Email

Now its time to take a look at the architecture of e-mail with the help of four scenarios:

First Scenario

When the sender and the receiver of an E-mail are on the same system, then there is the need for
only two user agents.

Second Scenario

In this scenario, the sender and receiver of an e-mail are basically users on the two
different systems. Also, the message needs to send over the Internet. In this case, we need to
make use of User Agents and Message transfer agents(MTA).
Third Scenario

In this scenario, the sender is connected to the system via a point-to-point WAN it can be either a
dial-up modem or a cable modem. While the receiver is directly connected to the system like it
was connected in the second scenario.

Also in this case sender needs a User agent(UA) in order to prepare the message. After preparing
the message the sender sends the message via a pair of MTA through LAN or WAN.

Fourth Scenario

In this scenario, the receiver is also connected to his mail server with the help of WAN or LAN.

When the message arrives the receiver needs to retrieve the message; thus there is a need for
another set of client/server agents. The recipient makes use of MAA(Message access agent)
client in order to retrieve the message.
In this, the client sends the request to the Mail Access agent(MAA) server and then makes a
request for the transfer of messages.

This scenario is most commonly used today.

Structure of Email

The message mainly consists of two parts:


1.Header
2.Body

Header
The header part of the email generally contains the sender's address as well as the receiver's
address and the subject of the message.

Body

The Body of the message contains the actual information that is meant for the receiver.
Email Address:

In order to deliver the email, the mail handling system must make use of an addressing system
with unique addresses.

The address consists of two parts:

 Local part

 Domain Name

Local Part

It is used to define the name of the special file, which is commonly called a user mailbox; it is
the place where all the mails received for the user is stored for retrieval by the Message Access
Agent.

Domain Name

It is the second part of the address is Domain Name.

Both local part and domain name are separated with the help of @.

You might also like