Establishing an ftp connection – H3C Technologies H3C SecPath F1000-E User Manual
Page 214
203
Establishing an FTP connection
Before you can access the FTP server, you must establish a connection from the FTP client to the FTP server.
You can either use the ftp command to establish the connection directly or use the open command in FTP
client view to establish the connection.
When using the ftp or ftp client source command, you can specify the source interface (such as a
loopback interface) or source IP address. The primary IP address of the specified source interface or the
specified source IP address is used as the source IP address of sent FTP packets.
The FTP client follows these rules to select the source IP address of packets sent to the FTP server:
•
If no source IP address is specified, the IP address of the output interface of the route to the server
is used as the source IP address.
•
The source IP address specified with the ftp client source or ftp command is used.
•
If you first use the ftp client source command to specify a source IP address and then use the ftp
command to specify another source IP address, the latter is used.
•
The source IP address specified with the ftp client source command applies to all FTP connections
while the one specified with the ftp command applies to the current FTP connection only.
To establish an IPv4 FTP connection:
Step Command
Remarks
1.
Enter system view
system-view
N/A
2.
Specify the source IP address
of sent FTP packets
ftp client source { interface interface-type
interface-number | ip source-ip-address }
Optional.
By default, the source IP
address is determined by the
route from the FTP client to the
FTP server.
3.
Return to user view
quit
N/A
4.
Log in to the remote FTP
server.
•
(Approach 1) Log in to the FTP server
in user view:
ftp [ server-address [ service-port ]
[ vpn-instance vpn-instance-name ]
[ source { interface interface-type
interface-number | ip
source-ip-address } ] ]
•
(Approach 2) Log in to the FTP server
in FTP client view:
a.
ftp
b.
open server-address
[ service-port ]
Use either approach.
NOTE:
•
If no primary IP address is 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.
To establish an IPv6 FTP connection:
- H3C SecPath F5000-A5 Firewall H3C SecPath F1000-A-EI H3C SecPath F1000-E-SI H3C SecPath F1000-S-AI H3C SecPath F5000-S Firewall H3C SecPath F5000-C Firewall H3C SecPath F100-C-SI H3C SecPath F1000-C-SI H3C SecPath F100-A-SI H3C SecBlade FW Cards H3C SecBlade FW Enhanced Cards H3C SecPath U200-A U200-M U200-S H3C SecPath U200-CA U200-CM U200-CS