The ftp client-transfile put command transfers file to remote FTP server.
The ftp client-transfile get command downloads file from remote FTP server.
ftp client-transfile put [ -a source-ipv4 | -i { interface-type interface-number | interface-name } ] host-ip ipv4-address [ port portnumber ] [ vpn-instance vpn-instancename | public-net ] username user-name sourcefile localfilename [ destination remotefilename ]
ftp client-transfile put ipv6 [ -a source-ipv6 ] host-ip ipv6-address [ [ vpn-instance ipv6-vpn-name ] | public-net ] [ port portnumber ] username user-name sourcefile localfilename [ destination remotefilename ]
ftp client-transfile get [ -a source-ipv4 | -i { interface-type interface-number | interface-name } ] host-ip ipv4-address [ port portnumber ] [ vpn-instance vpn-instancename | public-net ] username user-name sourcefile remotefilename [ destination localfilename ]
ftp client-transfile get ipv6 [ -a source-ipv6 ] host-ip ipv6-address [ [ vpn-instance ipv6-vpn-name ] | public-net ] [ port portnumber ] username user-name sourcefile remotefilename [ destination localfilename ]
Parameter | Description | Value |
---|---|---|
-a source-ipv4 |
Source IPv4 address. |
The value is a string of 0 to 4294967295 case-sensitive characters, spaces not supported. |
-i interface-type |
Interface type. |
All interfaces are supported, except null, stacking port, and SIP interfaces. |
interface-number |
Shows the number of interfaces. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. |
interface-name |
Shows the name of interfaces. |
The value is a string of 1 to 63 case-sensitive characters, spaces not supported. |
host-ip ipv4-address |
IPv4 address. To view the mapping between the IPv4 address and host name, run the display dns dynamic-host or display ip host command. |
The value is a string of 0 to 4294967295 case-sensitive characters, spaces not supported. |
host-ip ipv6-address |
IPv6 address. To view the mapping between the IPv4 address and host name, run the display dns dynamic-host or display ip host command. |
The value is a string case-sensitive characters, spaces not supported. |
port portnumber |
Port number. |
The value is a string of 1 to 65535 case-sensitive characters, spaces not supported. |
vpn-instance vpn-instancename |
Name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
vpn-instance ipv6-vpn-name |
Name of an IPv6 VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. |
public-net |
Connect in public network. |
- |
username user-name |
Username. |
The value is a string of 1 to 255 case-sensitive characters, spaces not supported. |
sourcefile remotefilename |
Remote file name. |
The value is a string of 1 to 128 case-sensitive characters, spaces not supported. |
destination localfilename |
Local file name. |
The value is a string of 1 to 255 case-sensitive characters, spaces not supported. |
ipv6 |
Specifies the IPv6 protocol. |
- |
source-ipv6 |
Source IPV6 address. |
The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
Usage Scenario
This command is used to put/get the file to/from the IPv4 and IPv6 servers. User can specify the server parameters required for transfer in the command and ftp client will first login to the server and then transfer the file.
Prerequisites
VPN must be configured before running this command.
Configuration Impact
After establishing successful connection with the host, FTP client can start communicating with the FTP server.
Precautions
The ftp one-click transfer command does not support breakpoint retransmission. When the put/get operation is interrupted, next time the command is executed again with the same parameters, the previously generated file (including only part of the source file) will be overwritten, then regenerate the new file.
<HUAWEI> ftp client-transfile get -a 10.1.1.10 host-ip 10.1.1.1 username abc sourcefile sample.txt destination sample_b.txt
<HUAWEI> ftp client-transfile put ipv6 host-ip 2001:db8:1::1 username abc sourcefile sample.txt destination sample_b.txt