No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NE40E V800R010C10SPC500 Feature Description - Basic Configurations 01

This is NE40E V800R010C10SPC500 Feature Description - Basic Configurations
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Understanding FTP

Understanding FTP

FTP

The File Transfer Protocol (FTP), a file transfer standard on the Internet, runs at the application layer in the TCP/IP protocol suite. FTP is used to transfer files between local and remote hosts, typically for version upgrades, log downloads, file transfers, and configuration savings. FTP is implemented based on the file system.

FTP uses the client/server architecture, as shown in Figure 6-2.

Figure 6-2 FTP client/server architecture

The NE40E provides the following FTP functions:

  • FTP server: A router functions as an FTP server and provides access and operation services for remote clients. You can run the FTP client program to log in to and access files on the router.

  • FTP client: A router functions as an FTP client and provides file access to the remote FTP server. After you run a terminal emulation program or Telnet program on a PC to set up a connection to the router, you can use FTP commands to set up a connection to the remote FTP server and access files on it.

In addition to file transfer, FTP supports interactive access, format specifications, and authentication control.

FTP provides common file operation commands to help you manage the file system, including file transfer between hosts. You can use an FTP client program outside a router to upload or download files and access directories on the router. You can also run an FTP client program on a router to transfer files to other devices or to the FTP server on the router.

FTP Connections
FTP is a standard application protocol based on the TCP/IP protocol suite. It is used to transfer files between local clients and remote servers. FTP uses two TCP connections to copy a file from one system to another. The TCP connections are usually established in client-server mode, one for control (the server port number is 21) and the other for data transmission (the server port number is 20).
  • Control connection

    A control connection is set up between the FTP client and FTP server.

    The control connection always waits for communication between the client and server. Commands are sent from the client to the server over this connection. The server responds to the client after receiving the commands.

  • Data connection

    The server uses port 20 to provide a data connection. The server can either set up or terminate a data connection. When the client sends files in streams to the server, only the client can terminate the data connection.

    FTP supports file transfer in stream mode. The end of each file is indicated by end of file (EOF). Therefore, new data connections must be set up for each file transfer or directory list. When a file is transferred between the client and server, a data connection is set up.

Figure 6-3 shows the process of FTP file transfer.

Figure 6-3 Process of FTP file transfer

Process of Setting Up an FTP Connection

The process of setting up an FTP data connection is as follows:

  1. The server passively enables port 21 to wait to set up a control connection to the client.

  2. The client actively enables a temporary port to send a request for setting up a connection to the server.

  3. After the server receives the request, a control connection is set up between the temporary port on the client and port 21 on the server.

  4. The client sends a command for setting up a data connection to the server.

  5. The client chooses a temporary port for the data connection and uses the port command to send the port number to the server over the control connection.

  6. The server actively enables port 20 to send a request for setting up a data connection.

  7. After the client receives the request, a data connection is set up between the temporary port on the client and port 20 on the server.

Figure 6-4 shows the FTP connection establishment process. In this example, the FTP client uses temporary port 2345 to establish a control connection and temporary port 2346 to establish a data connection. The two ports are connected to ports 21 and 20 of the FTP server, respectively.

Figure 6-4 FTP connection establishment process

Data Types

FTP has two file transfer modes:
  • Binary mode: is used to transfer program files, such as .app, .bin, and .btm files.
  • ASCII mode: is used to transfer text files, such as .txt, .bat, and .cfg files.

Access Control

Access control defines user access privileges to files in the system. Access control prevents unauthorized or accidental use of files. After you enable access control on an FTP server, all access users are controlled.

After a user fails to log in to a device using FTP, the number of FTP login failures is recorded for the IP address. If the number of login failures within a specified period reaches the threshold, the IP address is locked, and all users who log in through this IP address cannot set up an FTP connection with this device.

Data Structure

FTP supports the following file structures:

  • Byte structure

    Also called a file structure. A file consists of sequential bytes.

  • Record structure

    Used only for text files (ASCII or EBCDIC). A file consists of sequential records.

  • Page structure

    Files are transmitted in pages. A file contains indexed pages and therefore the receiver can save each page randomly.

NOTE:

On HUAWEI NetEngine40E, FTP supports the byte structure only.

Transmission Modes

FTP supports the following transmission modes:

  • Stream mode

    A file is transferred as a stream of bytes. In the file structure, the sender terminates the data connection by indicating end-of-file (EOF). In the record structure, a dedicated two-byte control code is used to identify the record and file ends.

  • Block mode

    A file is transmitted as a series of data blocks. Each block is preceded by one or more header bytes. The header bytes contain a count field and descriptor code. The count field indicates the total length of the data block in bytes. The descriptor code defines the last block in the file (EOF), last block in the record (EOR), restart marker (marker to identify error recovery and restart), or suspect data.

  • Compressed mode

    The same bytes sent consecutively are compressed.

NOTE:

On HUAWEI NetEngine40E, FTP supports the stream mode only.

Command Types

FTP supports a set of commands that comprise the control information flowing from the user-FTP process to the server-FTP process. The FTP service type defines commands for the FTP client to upload files or the file system. The argument of an FTP service command is a pathname. The syntax of the pathnames must conform to the server and control connection conventions.

Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055037

Views: 5600

Downloads: 37

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next