ftp client-source

Function

The ftp client-source command sets the source interface and source addresses of the FTP client to establish the connection with FTP server.

The undo ftp client-source command cancels the source interface and source address of the FTP client.

By default, the source address contains all 0s.

Format

ftp client-source { -a ip-address | -i { interface-type interface-number | interface-name } }

ftp ipv6 client-source -a ipv6-address [ -vpn-instance ipv6-vpn-instance-name ]

undo ftp client-source

undo ftp ipv6 client-source [ -a ipv6-address [ -vpn-instance ipv6-vpn-instance-name ] ]

Parameters

Parameter Description Value
-a ip-address

Specifies the IPv4 address of the local device.

The value is in dotted decimal notation.

-a ipv6-address

Specifies the IPv6 address of the local device.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

-i

Specifies the source interface type and source interface number.

All interfaces are supported, except null, stacking port, and SIP interfaces.

interface-type interface-number

Specifies the source interface type and source interface number.

All interfaces are supported, except null, stacking port, and SIP interfaces.

ipv6

Specifies the FTP IPv6 server.

-

-vpn-instance ipv6-vpn-instance-name

Specifies the name of a VPN instance to which the FTP server belongs.

Before specifying the parameter vpn-instance ipv6-vpn-instance-name, ensure that a VPN instance has been configured.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported.

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ftp-client write

Usage Guidelines

Usage Scenario

  • If you run the ftp command to log in to an FTP server without specifying a source IP address or source interface, the source address or source interface that is specified through the ftp client-source command is adopted by default.
  • If you run the ftp command and specify a source address or source interface at the same time, the specified source address or the specified source interface is adopted.

Precautions

  • This command can be run successfully when source address or source interface does not exist, but the function does not take effect.
  • If the specified source interface has been bound to a VPN instance, the client is automatically bound to the same VPN instance.
  • After a bound source interface is deleted, the interface configuration specified using the ftp client-source command will not be cleared but does not take effect. If you configure the source interface with the same name again, the interface configuration specified using the ftp client-source command is updated and the function restores.

Example

# Set the FTP source IPv4 address as 10.1.1.1.
<HUAWEI> system-view
[~HUAWEI] ftp client-source -a 10.1.1.1
# Set the FTP source as loopback interface.
<HUAWEI> system-view
[~HUAWEI] interface LoopBack 0
[*HUAWEI-LoopBack0] ip address 10.1.1.1 16
[*HUAWEI-LoopBack0] quit
[*HUAWEI] ftp client-source -i loopback 0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >