86
To establish an IPv4 FTP connection:
Ste
Command
Remarks
1. Enter system view.
system-view —
2. Configure the source address of the FTP
client.
ftp client source { interface
interface-type interface-number
| ip source-ip-address }
Optional.
A switch uses the IP address
of the interface determined
by the matched route as the
source IP address to
communicate with the FTP
server by default.
3. Exit to system view.
quit —
4. Log in to the remote FTP server directly in
user view.
ftp [ server-address
[ service-port ] [ vpn-instance
vpn-instance-name ] [ source
{ interface interface-type
interface-number | ip
source-ip-address } ] ]
Use either approach.
The ftp command is
available in user view, and
open is available in FTP
client view.
5. Log in to the remote FTP server indirectly
in FTP client view.
ftp
open server-address
[ service-port ]
If no primary IP address is configured on the specified source interface, you cannot establish an FTP
connection.
If you use ftp client source to configure a source interface and then use it to configure a source IP address,
the source IP address overwrites the source interface, and vice versa.
To establish an IPv6 FTP connection:
Ste
Command
Remarks
1. Log in to the remote FTP server
directly in user view.
ftp ipv6 [ server-address [ service-port ]
[ vpn-instance vpn-instance-name ]
[ source ipv6 source-ipv6-address ] [ -i
interface-type interface-number ] ]
Use either approach.
The ftp ipv6 command is
available in user view; and
open ipv6 is available in FTP
client view.
2. Log in to the remote FTP server
indirectly in FTP client view.
ftp ipv6
open ipv6 server-address [ service-port ]
[ -i interface-type interface-number ]