HTTP, FTP , REMOTE LOGIN

 HTTP (HYPERTEXT TRANSFER PROTOCOL) -

  • The Hyper Text Transfer Protocol (HTTP) is used to define how the client- server programs can be written to retrieve web pages from the Web.
  • It is a protocol used to access the data on the World Wide Web (WWW).
  • The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio, video, and so on.
  • HTTP is a stateless request/response protocol that governs client/server communication.
  • An HTTP client sends a request; an HTTP server returns a response.
  • The server uses the port number 80; the client uses a temporary port number.
  • HTTP uses the services of TCP , a connection-oriented and reliable protocol.
  • HTTP is a text-oriented protocol. It contains embedded URL known as links.

How HTTP Works: Step-by-Step Process

Here’s how HTTP works when you visit a website:

  1. Open Web Browser: First, you open your web browser and type a website URL (e.g., www.example.com).
  2. DNS Lookup: Your browser asks a Domain Name System (DNS) server to find out the IP address associated with that URL. Think of this as looking up the phone number of the website.
  3. Send HTTP Request: Once the browser has the website’s IP address, it sends an HTTP request to the server. The request asks the server for the resources needed to display the page (like text, images, and videos).
  4. Server Response: The server processes your request and sends back an HTTP response. This response contains the requested resources (like HTML, CSS, JavaScript) needed to load the page.
  5. Rendering the Web Page: Your browser receives the data from the server and displays the webpage on your screen.

After the page is loaded, the connection between the browser and server is closed. If you request a new page, a new connection will be made.

HTTP Request and Response

1. HTTP Request

An HTTP request is how your browser asks the server for something. It includes:

  • HTTP Version: The version of HTTP (like HTTP/1.1 or HTTP/2) being used.
  • URL: The specific address of the resource (e.g., https://www.example.com/about).
  • HTTP Method: The type of action being requested (e.g., GET to retrieve information or POST to send data).
  • HTTP Request Headers: Extra information about the request, like what kind of browser you're using or what kind of content you’re expecting.
  • HTTP Request Body: In some cases, the request will include a body that contains data (e.g., when you submit a form).

2. HTTP Response

An HTTP response is the server’s answer to your request. It includes:

  • HTTP Status Code: A number that tells you if the request was successful or not (e.g., 200 OK means everything is fine, 404 Not Found means the requested page doesn’t exist).
  • Response Headers: Information about the response, like what kind of data is being sent (e.g., Content-Type: text/html means it’s an HTML page).
  • Response Body: The content that the server sends back (e.g., HTML code that the browser will use to display the webpage).


What is File Transfer Protocol-


FTP is a standard communication protocol. There are various other protocols like HTTP which are used to transfer files between computers, but they lack clarity and focus as compared to FTP. Moreover, the systems involved in connection are heterogeneous, i.e. they differ in operating systems, directories, structures, character sets, etc the FTP shields the user from these differences and transfers data efficiently and reliably. FTP can transfer ASCII, EBCDIC, or image files. The ASCII is the default file share format, in this, each character is encoded by NVT ASCII. In ASCII or EBCDIC the destination must be ready to accept files in this mode. The image file format is the default format for transforming binary files.

Types of FTP

There are different ways through which a server and a client do a file transfer using FTP. Some of them are mentioned below:

  • Anonymous FTP: Anonymous FTP is enabled on some sites whose files are available for public access. A user can access these files without having any username or password. Instead, the username is set to anonymous, and the password is to the guest by default. Here, user access is very limited. For example, the user can be allowed to copy the files but not to navigate through directories.
  • Password Protected FTP: This type of FTP is similar to the previous one, but the change in it is the use of username and password.

FTP Useful For?

FTP is especially useful for:

  • 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.
  • Automating File Transfers: FTP is a great protocol for the execution of file transfers on predefined scripts and employments.
  • Accessing Public Files: Anonymous FTP means that everybody irrespective of the identity is allowed to download some files with no permissions needed.

How to Use FTP?

To use FTP, follow these steps:

  • Connect to the FTP Server: One can connect to the server using the address, username and password through an FTP client or a command line interface. Anonymous Information may not need a username and password.
  • 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.


Types of Connection in FTP

  • Control Connection
  • Data Connection

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 sends the control information out-of-band as it uses a separate control connection. Some protocols send their request and response header lines and the data in the same TCP connection. For this reason, they are said to send their control information in-band. HTTP and SMTP are such examples. 



REMOTE LOGIN (TELNET) 
Remote Login is a process in which user can login into remote site i.e. computer and use services that are available on the remote computer. With the help of remote login a user is able to understand result of transferring and result of processing from the remote computer to the local computer.
It is implemented using TelnetProcedure of Remote Login :
  1. When the user types something on local computer, then local operating system accepts character.
  2. Local computer does not interpret the characters, it will send them to TELNET client.
  3. TELNET client transforms these characters to a universal character set called Network Virtual Terminal (NVT) characters and it will pass them to the local TCP/IP protocol Stack.
  4. Commands or text which is in the form of NVT, travel through Internet and it will arrive at the TCP/IP stack at remote computer.
  5. Characters are then delivered to operating system and which later on passed to TELNET server.
  6. Then TELNET server changes that characters to characters which can be understandable by remote computer.
  7. Remote operating system receives character from a pseudo-terminal driver, which is a piece of software that pretends that characters are coming from a terminal.
  8. Operating system then passes character to the appropriate application program.

NVT Character Set :
  • With NVT Character set, TELNET client translates characters into NVT form and deliver to network.
  • TELNET server translates data and commands from NVT form to the other form that will be understandable by remote computer.
  • NVT uses 2 sets of characters, one for data and other for control. Size of both characters is 8-bit bytes.
  • For data, NVT is an 8-bit character set in which 7 lowest bits are same as ASCII and highest order bit is 0.
  • For control characters, NVT uses an 8-bit character set in which the highest bit is set to 1.


Comments

Popular posts from this blog

Data communications system components

Introduction