91
Syntax
ftp
client
source
{
interface
interface-type interface-number
|
ip
source-ip-address
}
undo
ftp
client
source
Default
No source IPv4 address is configured for outgoing FTP packets. The device uses the primary IPv4
address of the output interface for the route to the server as the source IP address.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
interface
interface-type interface-number
: Specifies the source interface for establishing FTP
connections. The primary IPv4 address of the source interface is used as the source IP address of
packets sent to a FTP server. Make sure the interface is up and has the primary IPv4 address
configured. Otherwise, the transmission fails.
ip
source-ip-address
: Specifies the source IP address for outgoing FTP packets. It must be the IPv4
address of an interface in up state. Otherwise, the transmission fails.
Usage guidelines
If you execute this command multiple times, the most recent configuration takes effect.
The source address specified with the
ftp
command takes precedence over the source address
specified with the
ftp
client
source
command.
The source address specified with the
ftp client source
command applies to all FTP connections. The
source address specified with the
ftp
command applies only to the current FTP connection.
Examples
# Specify the source IPv4 address for outgoing FTP packets as 192.168.20.222.
<Sysname> system-view
[Sysname] ftp client source ip 192.168.20.222
Related commands
ftp
ftp ipv6
Use
ftp
ipv6
to log in to an IPv6 FTP server and enter FTP client view.
Syntax
ftp
ipv6
[
ftp-server
[
service-port
] [
vpn-instance
vpn-instance-name
] [
dscp
dscp-value
|
source
{
ipv6
source-ipv6-address
|
interface
interface-type
interface-number
} ] * [
-i
interface-type
interface-number
] ]
Views
User view
Predefined user roles
network-admin
mdc-admin