73
Parameters
interface
interface-type interface-number
: Specifies a source interface for outgoing FTP packets. The
primary IP address of this interface will be used as the source address for outgoing FTP packets. If no
primary IP address is configured on the source interface, the connection cannot be established.
ip
source-ip-address
: Specifies a source IP address for outgoing FTP packets. This IP addresses must be
one of the IP addresses of the device.
Usage guidelines
You can use the
ftp client source
command to specify a source IP address or source interface for the FTP
packets sent by the device. If a source interface (typically a loopback interface) is specified, its primary
IP address is used as the source IP address for the FTP packets sent by the device. The source interface
setting and the source IP address setting overwrite each other.
IMPORTANT:
To avoid FTP connection failures, when you specify a source interface for FTP packets, make sure the
interface has a primary IP address.
The
ftp client source
command setting applies to all FTP sessions. When you set up an FTP session using
the
ftp
or
ftp ipv6
command, you can also specify a different source IP address for the FTP session.
Examples
# Specify 2.2.2.2 as the source IP address for outgoing FTP packets.
<Sysname> system-view
[Sysname] ftp client source ip 2.2.2.2
# Use the primary IP address of interface GigabitEthernet 1/0/1 as the source IP address for outgoing
FTP packets.
<Sysname> system-view
[Sysname] ftp client source interface gigabitethernet 1/0/1
[Sysname]
Related commands
display ftp client configuration
ftp ipv6
Use
ftp ipv6
to log in to an FTP server and enter FTP client view.
Syntax
ftp ipv6
[
server-address
[
service-port
] [
vpn-instance
vpn-instance-name
] [
source ipv6
source-ipv6-address
] [
-i
interface-type interface-number
] ]
Views
User view
Default command level
3: Manage level
Parameters
server-address
: IP address or host name of the FTP server.
service-port
: TCP port number of the FTP server, in the range of 0 to 65535. The default value is 21.