•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 | — | |
|
|
|
Configure the source address of the FTP client
ftp client source { interface
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 [ |
| |
Log in to the remote FTP server | [ source { interface | Use either approach. | |
directly in user view | The ftp command is available | ||
| |||
| 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 | ||
| |||
|
| ||
|
|
| |
|
|
|
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 [ | |
Log in to the remote FTP server | [ | |
directly in user view | ||
| ||
|
| |
| ftp ipv6 | |
Log in to the remote FTP server |
| |
open ipv6 | ||
indirectly in FTP client view | ||
[ | ||
| ||
| ||
|
|
Use either approach.
The ftp ipv6 command is available in user view; and the open ipv6 command is available in FTP client view.
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