If you use the ftp client source command and the ftp command to specify a source address respectively, the source address specified with the ftp command is used to communicate with an FTP server.

The source address specified with the ftp client source command is valid for all FTP connections and the source address specified with the ftp command is valid only for the current FTP connection.

Follow these steps to establish an IPv4 FTP connection:

To do…

Use the command…

Remarks

Enter system view

system-view

 

 

 

Configure the source address of the FTP client

ftp client source { interface interface-typeinterface-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.

Exit to system view

quit

 

 

 

 

ftp [ server-address [ service-port ]

 

Log in to the remote FTP server

[ source { interface interface-type

Use either approach.

directly in user view

interface-number ip

The ftp command is available

 

source-ip-address } ] ]

 

in user view, and the open

 

 

 

 

Log in to the remote FTP server

ftp

command is available in FTP

 

client view.

indirectly in FTP client view

open server-address [ service-port ]

 

 

 

 

 

 

 

 

 

NOTE:

If there is not a primary IP address configured on the specified source interface, you cannot establish an FTP connection.

If you use the ftp client source command 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.

Follow these steps to establish an IPv6 FTP connection:

To do…

Use the command…

Remarks

 

ftp ipv6 [ server-address

Log in to the remote FTP server

[ service-port] [ source ipv6

directly in user view

source-ipv6-address ] [ -i

 

interface-type interface-number ] ]

 

 

 

ftp ipv6

Log in to the remote FTP server

 

open ipv6 server-address

indirectly in FTP client view

[ service-port ] [ -iinterface-type

 

 

interface-number ]

 

 

Use either approach.

The ftp ipv6 command is available in user view; and the open ipv6 command is available in FTP client view.

Operating the directories on an FTP server

After the switch serving as the FTP client has established a connection with an FTP server, you can create or delete folders under the authorized directory of the FTP server. For more information about establishing an FTP connection, see “Establishing an FTP connection.”

87