< Home

ftp client-source

Function

The ftp client-source command specifies the source IP address for the FTP client to send packets.

The undo ftp client-source command restores the default source IP address for the FTP client to send packets.

The default source IP address for the FTP client to send packets is 0.0.0.0.

Format

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

undo ftp client-source

Parameters

Parameter Description Value
-a source-ip-address

Specifies the source IP address. You are advised to use the loopback interface IP address.

The value is in dotted decimal notation.
-i interface-type interface-number

Specifies the loopback interface of the FTP server as the source interface.

The IP address configured for the source 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.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If no source IP address is specified, the client uses the source IP address that the router specifies to send packets. The source IP address must be configured for an interface with stable performance. The loopback interface is recommended. Using the loopback interface as the source interface simplifies the ACL rule and security policy configuration. This shields the IP address differences and interface status impact, filters incoming and outgoing packets, and implements security authentication.

Prerequisites

The loopback source interface specified using the command must exist and have an IP address configured.

Precautions

  • The ftp client-source command sets the source interface only to loopback interface.

  • You can also run the ftp command to configure the source IP address whose priority is higher than that of the source IP address specified by the ftp client-source command. If you specify the source IP addresses by running the ftp client-source and ftp commands, the source IP address specified by the ftp command is used for data communication and is available only for the current FTP connection, while the source IP address specified by the ftp client-source command is available for all FTP connections.

  • The IP address that a user displays on the FTP server is the specified source IP address or source interface IP address.

Example

# Set the source IP address of the FTP client to 10.1.1.1.

<HUAWEI> system-view
[HUAWEI] ftp client-source -a 10.1.1.1
Info: Succeeded in setting the source address of the FTP client to 10.1.1.1.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >