0% found this document useful (0 votes)
11 views10 pages

5 2 (HTTP&FTP)

Uploaded by

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

5 2 (HTTP&FTP)

Uploaded by

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

5]Application Layer Protocol

FTP & HTTP Protocol


Part-2
1.File Transfer Protocol(FTP)
A] Features / Characteristics of FTP
• FTP stands for File transfer protocol.
• Application layer protocol.
• FTP helps in transferring files between a client and a server.
• It provides a reliable and efficient means of transferring files from one system
to another even if they have different file structures and operating systems.
• FTP uses TCP as a transport layer protocol.
• Transferring Large Files: FTP can transfer large files in one shot; thus
applicable when hosting websites, backing up servers, or sharing files in large
quantities.
• Remote File Management: Files on a remote server can be uploaded,
downloaded, deleted, renamed, and copied according to the users’ choices.
• It supports ASCII , EBCDIC ,Image file.(character encoding types)
B] Working of FTP (Diagram)
Working of FTP
• The FTP client has three components: -1) user interface,2) control process, and
3)data transfer process.
• The server has two components: -1) server control process and 2) server data
transfer process.
• FTP is a client- server protocol that has two communication channels
1) command channel for conversation control
2) data channel for file content
Working
• Connect to the FTP Server: One can connect to the server using the address,
username and password through an FTP client .
• Navigate Directories: Some commands include ls that is used to list directories and
cd that is used to change directories.
• Transfer Files: File transfer may be done by using the commands such as get for
downloading files, and put for uploading files.
• Manage Files: Make operations like deletion (delete), renaming (rename) as well
as copying (copy) of files.
• Close the Connection: Once file transfer has been accomplished, terminate the
connection by giving the bye or quit command.
C] Transmission modes / Connection modes of FTP
1) 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.
-The control connection is made between the control processes.
-The control connection remains connected during the entire interactive FTP session.
-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.
2) Data Connection:
-For sending the actual file, FTP makes use of a data connection.
-A data connection is initiated on port number 20.
-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.
-The data connection uses very complex rules as data types may vary.
D] FTP Commands

Command Explanation
close disconnects the existing FTP connection but does not quit the FTP client..
quit disconnects the existing connection and also exits the FTP client.
bye It is used to terminate the ftp session and exit
ls It is used to list the names of the files in the current remote directory.
put This command is used to copy a file from the local machine(client) to the remote mach
(server)..

It is used to copy multiple files from the remote machine(server) to the local
mget
machine(client).

delete It is used to delete a file in the current remote directory.


get It is used to copy a file from the remote machine(server) to the local machine(client).
mput This command is used to copy many files from the local machine(client) to the remote
machine (server).
open used to open the connection and initiate login session
pass Authentication password.
user This command is used to transfer the new user detail.
2]Hyper Text Transfer Protocol (HTTP)
A] Features of HTTP
• HTTP is simple
The HTTP protocol is designed to be plain and human-readable.
• HTTP is stateless
Hypertext transfer protocol(HTTP) is a stateless protocol, client and server
only knows each other during current request. There is no connection among
two requests that are being consecutively carried out on the same connection.
• HTTP is extensible
The HTTP can be integrated easily with the new functionality by providing a
simple agreement between the client and the server.
• HTTP is connectionless
Doesn’t required connection . The client-server connection exists just for
current request and response.HTTP clients sends request to server and wait
for response. When server get request ,it process it and then sends response.
B]HTTP Message

A] Request Message:
• The request message is sent by the client that consists of a request line, headers,
and sometimes a body.
• HTTP request is information or data that is needed by Internet browsers for
loading a website.
• It contains -HTTP Version ,URL,HTTP Method, HTTP Request Header ,HTTP Body.
• HTTP Request Header- generally store information in the form of key-value. It
provides core information about the client.
• HTTP Request Body- contains the information that has to be transferred. HTTP
Request has the information or data to be sent to these browsers
B] Response Message:
• The response message is sent by the server to the client that consists of a status
line, headers, and sometimes a body.
• HTTP Response is simply the answer to HTTP Request .
• It contain HTTP Status Code, HTTP Headers ,HTTP Body.
• HTTP header specifies the configuration of the server and also the special
information about the request.
• The HTTP body part mainly contains the document to be sent or received.
• HTTP Status Codes are the 3-digit codes that inform about the HTTP Request
whether it has been completed or not.(Ex- 2-Reqest completed,4-client side error)
C] Working of HTTP
• The HTTP makes use of Client-server architecture.
• The browser acts as the HTTP client and this client mainly communicates with
the web-server that is hosting the website.
• At the time when a web-client makes a request for some information to the
web-server , the browser then sends a Request message to the HTTP server
for the requested objects.
• After that the following things happen:
1) The connection becomes open between the web-client and the web-server
through the TCP.
2) After that, the HTTP sends a request to the server that mainly consists of
requested data.
3) The response with the objects is sent back to the client by HTTP
• At last, HTTP closes the connection.

You might also like