# Connect the FTP client to the FTP server based on the IPv4 address.
open [ ssl-policy policy-name ] [ -a source-ip-address | -i interface-type interface-number ] host-ip [ port-number ] [ public-net | vpn-instance vpn-instance-name ]
# Connect the FTP client to the FTP server based on the IPv6 address.
open [ ssl-policy policy-name ] ipv6 host-ipv6 [ port-number ]
# If the connection address is the IPv6 link-local address generated automatically by the interface of the remote IPv6 FTP server, the command format is as follows:
open [ ssl-policy policy-name ] ipv6 ipv6-linklocal-address -oi interface-type interface-number [ port-number ]
Parameter |
Description |
Value |
---|---|---|
ssl-policy policy-name | Specifies the name of the SSL policy that provides the secure FTP function. | The value is a string of 1 to 23 case-insensitive characters without spaces. |
-a source-ip-address | Specifies the source IP address for connecting to the FTP client. You are advised to use the loopback interface IP address. |
- |
-i interface-type interface-number | Specifies the source interface type and ID. You are advised to use the loopback interface. The IP address configured for this interface is the source IP address for sending packets. If no IP address is configured for the source interface, the FTP connection cannot be set up. |
- |
host-ip | Specifies the IP address or host name of the remote IPv4 FTP server. |
The value is a string of 1 to 255 case-insensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
port-number | Specifies the port number of the FTP server. | The value is an integer that ranges from 1 to 65535. The default value is the standard port number 21. |
public-net | Specifies the FTP server on the public network. You must set the public-net parameter when the FTP server IP address is a public network IP address. |
- |
vpn-instance vpn-instance-name | Specifies the name of the VPN instance where the FTP server is located. |
The value must be an existing VPN instance name. |
host-ipv6 | Specifies the IP address or host name of the remote IPv6 FTP server. | The value is a string of 1 to 255 case-insensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
ipv6-linklocal-address | Specifies the IPv6 link-local address generated automatically by the interface of the remote IPv6 FTP server. |
- |
-oi | Indicates the outbound interface of the IPv6 link-local address. |
- |
interface-typeinterface-number | Specifies the outbound interface type and number of the IPv6 link-local address. |
- |
Usage Scenario
You can run the open command in the FTP client view to connect the FTP client to the server to transmit files and manage files and directories of the FTP server.
Precautions
You can run the ftp command in the user view to connect the FTP client and server and enter the FTP client view.
If public-net or vpn-instance is not specified, the FTP client accesses the FTP server in the VPN instance managed by the NMS.
If public-net is specified, the FTP client accesses the FTP server on the public network.
If vpn-instance vpn-instance-name is specified, the FTP client accesses the FTP server in a specified VPN instance.
If the port number that the FTP server uses is non-standard, you must specify a standard port number; otherwise, the FTP server and client cannot be connected.
When you run the open command, the system prompts you to enter the user name and password for logging in to the FTP server. You can log in to the FTP client and enter the FTP client view if the user name and password are correct.
# Connect the FTP client with the FTP server whose IP address is 10.137.217.204.
<HUAWEI> ftp [ftp] open 10.137.217.204 Trying 10.137.217.204 ... Press CTRL+K to abort Connected to 10.137.217.204. 220 FTP service ready. User(10.137.217.204:(none)):huawei 331 Password required for huawei. Enter password: 230 User logged in. [ftp]
<HUAWEI> ftp
[ftp] open ipv6 fc00:2001:db8::1
Trying fc00:2001:db8::1 ...
Press CTRL+K to abort
Connected to fc00:2001:db8::1
220 FTP service ready.
User(fc00:2001:db8::1:(none)):huawei
331 Password required for huawei
Enter Password:
230 User logged in.
[ftp]