- Table of Contents
-
- H3C S3600 Command Manual-Release 1602(V1.02)
- 00-1Cover
- 01-CLI Command
- 02-Login Command
- 03-Configuration File Management Command
- 04-VLAN Command
- 05-IP Address and Performance Command
- 06-Voice VLAN Command
- 07-GVRP Command
- 08-Port Basic Configuration Command
- 09-Link Aggregation Command
- 10-Port Isolation Command
- 11-Port Security-Port Binding Command
- 12-DLDP Command
- 13-MAC Address Table Management Command
- 14-Auto Detect Command
- 15-MSTP Command
- 16-Routing Protocol Command
- 17-Multicast Command
- 18-802.1x and System Guard Command
- 19-AAA Command
- 20-Web Authentication Command
- 21-MAC Address Authentication Command
- 22-VRRP Command
- 23-ARP Command
- 24-DHCP Command
- 25-ACL Command
- 26-QoS-QoS Profile Command
- 27-Web Cache Redirection Command
- 28-Mirroring Command
- 29-IRF Fabric Command
- 30-Cluster Command
- 31-PoE-PoE Profile Command
- 32-UDP Helper Command
- 33-SNMP-RMON Command
- 34-NTP Command
- 35-SSH Command
- 36-File System Management Command
- 37-FTP-SFTP-TFTP Command
- 38-Information Center Command
- 39-System Maintenance and Debugging Command
- 40-VLAN-VPN Command
- 41-HWPing Command
- 42-IPv6 Management Command
- 43-DNS Command
- 44-Smart Link-Monitor Link Command
- 45-Access Management Command
- 46-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
37-FTP-SFTP-TFTP Command | 197.58 KB |
1 FTP and SFTP Configuration Commands
FTP Server Configuration Commands
FTP Client Configuration Commands
ftp { cluster | remote-server } source-interface
ftp { cluster | remote-server } source-ip
SFTP Server Configuration Commands
SFTP Client Configuration Commands
tftp tftp-server source-interface
1 FTP and SFTP Configuration Commands
FTP Server Configuration Commands
display ftp-server
Syntax
display ftp-server
View
Any view
Parameters
None
Description
Use the display ftp-server command to display the FTP server-related settings of a switch when it operates as an FTP server, including startup status, number of users, and so on.
You can use this command to verify FTP server-related configurations.
Related commands: ftp server enable, ftp timeout.
Examples
# Display the FTP server-related settings of the switch (assuming that the switch is operating as an FTP server).
FTP server is running
Max user number 1
User count 0
Timeout value(in minute) 30
Table 1-1 display ftp-server command output description
Field |
Description |
FTP server is running |
The FTP server is started. If the FTP server is not started, “% FTP server has been stopped” will be displayed, and the three fields below will not be displayed. |
Max user number 1 |
The FTP server can accommodate up to one user. |
User count 0 |
The current login user number is 0. |
Timeout value (in minute) 30 |
The connection idle time is 30 minutes. |
The H3C S3600 series Ethernet switch supports one user access at one time when it serves as the FTP server.
display ftp-server source-ip
Syntax
display ftp-server source-ip
View
Any view
Parameters
None
Description
Use the display ftp-server source-ip command to display the source IP address set for an FTP server.
l If a source interface is specified for the FTP server, the IP address of the source interface will be displayed and the FTP client can only use this address as the destination address to connect to the FTP server.
l If neither source interface nor source IP address is specified, 0.0.0.0 will be displayed. In this case, the FTP client can use any reachable IP address on the FTP server as the destination address to connect to the FTP server.
To set the source IP address for an FTP server, use the ftp-server source-interface or the ftp-server source-ip command.
Examples
# Display the source IP address configured for the FTP server.
<Sysname> display ftp-server source-ip
The source IP you specified is 192.168.0.1
display ftp-user
Syntax
display ftp-user
View
Any view
Parameters
None
Description
Use the display ftp-user command to display the information of the FTP users that have logged in to the switch, including the user name, host IP address, port number, idle timeout time, and authorized directory.
For how to create an FTP user on an FTP server, refer to the AAA part of this manual.
Examples
# Display the information of the FTP users that have logged in to the switch.
<Sysname> display ftp-user
UserName HostIP Port Idle HomeDir
admin 192.168.0.152 1029 0 flash:
# If the username exceeds ten characters, characters behind the tenth will be displayed in the second line with a left-aligning mode. Take username username@test for example, the result is:
<Sysname> display ftp-user
UserName HostIP Port Idle HomeDir
administra
tor 192.168.0.152 1031 0 flash:
Table 1-2 display ftp-user command output description
Field |
Description |
HostIP |
IP address of the FTP client |
Port |
Port used when the FTP client logs in |
Idle |
Idle time of the FTP client |
HomeDir |
The initial work path configured for the FTP user, namely, the path where the user locates after he logs in. |
ftp disconnect
Syntax
ftp disconnect user-name
View
System view
Parameters
user-name: Name of the user to be disconnected from the FTP server, a string of 1 to 184 characters.
Description
Use the ftp disconnect command to terminate the connection between a specified user and the FTP server.
With an H3C S3600 series Ethernet switch acting as the FTP server, if you attempt to disconnect a user that is uploading/downloading data to/from the FTP server, the S3600 Ethernet switch will disconnect the user after the data transmission is completed.
Related commands: display ftp-user.
Examples
# Display the current online FTP users.
<Sysname> display ftp-user
UserName HostIP Port Idle HomeDir
admin 192.168.0.152 1029 0 flash:
# Disconnect the user named admin from the FTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ftp disconnect admin
% The user connection will be disconnected after the data transfer finished
[Sysname]
%Apr 2 01:06:14:915 2000 Sysname FTPS/5/USEROUT:- 1 -User admin(192.168.0.152) logged out
ftp server enable
Syntax
ftp server enable
undo ftp server
View
System view
Parameters
None
Description
Use the ftp server enable command to enable the FTP server function of the switch.
Use the undo ftp server command to disable the FTP server function of the switch.
By default, the FTP server function is disabled on the H3C S3600 series switch to avoid potential security risks.
To protect unused sockets from being attacked by malicious users, the H3C S3600 series Ethernet switch provides the following functions:
l TCP 21 is enabled only when you start the FTP server.
l TCP 21 is disabled after you shut down the FTP server.
Related commands: display ftp-server.
Examples
# Enable the FTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ftp server enable
% Start FTP server
ftp timeout
Syntax
ftp timeout minutes
undo ftp timeout
View
System view
Parameters
minutes: Idle timeout time (in minutes), in the range 1 to 35791.
Description
Use the ftp timeout command to set the idle timeout time of an FTP client. When the idle time of the FTP client exceeds this timeout time, the FTP server terminates the connection with the FTP client.
Use the undo ftp timeout command to restore the default idle timeout time.
By default, the idle timeout time is 30 minutes.
If an FTP connection between an FTP server and an FTP client breaks down abnormally, but the FTP server cannot be aware of this, the FTP server will keep this connection. This will occupy system resources and affect other FTP users’ log in. You can set an idle timeout time so that the FTP server considers an FTP connection invalid and terminates it if no data exchange occurs on it in idle timeout time.
Examples
# Set the idle timeout time to 36 minutes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ftp timeout 36
ftp-server source-interface
Syntax
ftp-server source-interface interface-type interface-number
undo ftp-server source-interface
View
System view
Parameters
interface-type: Type of the interface serving as the source interface of an FTP server. The interface type can be a loopback interface or a VLAN interface.
interface-number: Number of the source interface of an FTP server.
Description
Use the ftp-server source-interface command to specify the source interface for an FTP server. After you execute this command, users can only use the IP address of the specified source interface as the destination address to connect to an FTP server, which can enhance security of the FTP server.
Use the undo ftp-server source-interface command to cancel the source interface setting.
By default, no source interface is specified for an FTP server, and an FTP client can use any reachable interface address on the FTP server as the destination address to connect to the FTP server.
Related commands: ftp-server source-ip.
Examples
# Specify VLAN-interface 1 as the source interface of the FTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ftp-server source-interface Vlan-interface 1
ftp-server source-ip
Syntax
ftp-server source-ip ip-address
undo ftp-server source-ip
View
System view
Parameters
ip-address: The source IP address of an FTP server.
Description
Use the ftp-server source-ip command to specify the source IP address for an FTP server. After you execute this command, users can only use the specified source IP address as the destination address to connect to the FTP server. The value of argument ip-address must be an IP address on the device where the configuration is performed. Otherwise, a prompt appears to show the configuration fails.
Use the undo ftp-server source-ip command to cancel the source IP address setting. By default, no source IP address is specified for an FTP server, and an FTP client can use any reachable address on the FTP server as the destination address to connect to an FTP server.
Examples
# Specify 192.168.1.1 as the source IP address of the FTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ftp-server source-ip 192.168.1.1
FTP Client Configuration Commands
l In the examples of this section, if a command should be executed in FTP client view, the configuration process for entering FTP client view will be omitted to avoid repetition. For the configuration of the command for entering FTP client view, refer to ftp.
l When executing the FTP client configuration commands in this section, confirm whether the corresponding access rights are configured on the FTP server, for example, query file lists under a working directory, read/download the specified files, create a directory/upload a file, and rename/delete a file on the server. For the configuration of user access rights, refer to the FTP server software description.
ascii
Syntax
ascii
View
FTP client view
Parameters
None
Description
Use the ascii command to specify that files be transferred in ASCII mode, which is used for transferring text files.
By default, files are transferred in ASCII mode.
Related commands: binary.
Examples
# Specify to transfer text files in ASCII mode.
[ftp] ascii
200 Type set to A.
binary
Syntax
binary
View
FTP client view
Parameters
None
Description
Use the binary command to specify that program files be transferred in binary mode, which is used for transferring program files.
By default, files are transferred in ASCII mode.
Related commands: ascii.
Examples
# Specify to transfer files in binary mode.
[ftp] binary
200 Type set to I.
bye
Syntax
bye
View
FTP client view
Parameters
None
Description
Use the bye command to terminate the control connection and data connection with the FTP server and return to user view.
This command has the same effect as that of the quit command.
Examples
# Terminate the connections with the remote FTP server and return to user view.
[ftp] bye
221 Server closing.
<Sysname>
cd
Syntax
cd path
View
FTP client view
Parameters
path: Path of the target directory.
Description
Use the cd command to change the working directory on the remote FTP server.
Note that you can use this command to enter only authorized directories.
Related commands: pwd.
Examples
# Change the working directory to flash:/temp.
[ftp] cd flash:/temp
# Display the current working directory.
[ftp] pwd
257 "flash:/temp" is current directory.
cdup
Syntax
cdup
View
FTP client view
Parameters
None
Description
Use the cdup command to exit the current working directory and enter the parent directory. The parent directory must be a directory that a user is authorized to access; otherwise, the command cannot be executed.
Related commands: cd, pwd.
Examples
# Change the working directory to flash:/temp.
[ftp] cd flash:/temp
# Change the working directory to the parent directory.
[ftp] cdup
# Display the current directory.
[ftp] pwd
257 "flash:" is current directory.
close
Syntax
close
View
FTP client view
Parameters
None
Description
Use the close command to terminate an FTP connection without quitting FTP client view.
This command has the same effect as that of the disconnect command.
Examples
# Terminate the FTP connection without quitting FTP client view.
[ftp] close
221 Server closing.
[ftp]
delete
Syntax
delete remotefile
View
FTP client view
Parameters
remotefile: Name of the file to be deleted.
Description
Use the delete command to delete a specified remote file.
Examples
# Delete the file temp.c.
[ftp] delete temp.c
250 DELE command successful.
dir
Syntax
dir [ filename [ localfile ] ]
View
FTP client view
Parameters
filename: Name of the file to be queried.
localfile: Name of the local file where the query result is to be saved.
Description
Use the dir command to query specified files on a remote FTP server, or to display file information in the current directory. The output information, which includes the name, size and creation time of files, will be saved in a local file.
If you do not specify the filename argument, the information about all the files in the current directory is displayed.
You can use the dir command to display the file-related information such as file size, creation date, and so on. To display only the names of all the files under the current directory, use the ls command.
Related commands: pwd.
Examples
# Display the information about all the files in the current directory on the remote FTP server.
[ftp] dir
227 Entering Passive Mode (192,168,0,152,4,0).
125 ASCII mode data connection already open, transfer starting for *.
-rwxrwxrwx 1 noone nogroup 377424 Apr 26 13:05 s3r01.btm
-rwxrwxrwx 1 noone nogroup 377424 Oct 10 2006 s3r01_15.btm
-rwxrwxrwx 1 noone nogroup 2833 May 11 17:58 config.cfg
-rwxrwxrwx 1 noone nogroup 225295 Apr 26 12:21 default.diag
-rwxrwxrwx 1 noone nogroup 377424 Apr 30 16:58 switch.btm
drwxrwxrwx 1 noone nogroup 0 Apr 28 11:41 test
-rwxrwxrwx 1 noone nogroup 2145 Apr 28 13:13 test.txt
-rwxrwxrwx 1 noone nogroup 13 Apr 28 13:21 mytest.bak
-rwxrwxrwx 1 noone nogroup 9 Apr 28 13:24 a.txt
-rwxrwxrwx 1 noone nogroup 142 Sep 10 2006 myopenssh
-rwxrwxrwx 1 noone nogroup 5292802 Apr 30 17:02 switch2.bin
-rwxrwxrwx 1 noone nogroup 15 Apr 26 17:45 public
-rwxrwxrwx 1 noone nogroup 15 Apr 26 17:56 temp.c
-rwxrwxrwx 1 noone nogroup 5286666 Oct 18 2006 switch5.bin
-rwxrwxrwx 1 noone nogroup 306 May 13 11:17 swithc001
226 Transfer complete.
FTP: 1025 byte(s) received in 0.019 second(s) 53.00K byte(s)/sec.
# Display information about file config.cfg and save the information to file temp1.
[ftp] dir config.cfg temp1
227 Entering Passive Mode (192,168,0,152,4,3).
125 ASCII mode data connection already open, transfer starting for config.cfg.
.....226 Transfer complete.
FTP: 67 byte(s) received in 5.818 second(s) 11.00 byte(s)/sec.
disconnect
Syntax
disconnect
View
FTP client view
Parameters
None
Description
Use the disconnect command to terminate an FTP connection without quitting FTP client view.
This command has the same effect as that of the close command.
Examples
# Terminate the FTP connection without quitting FTP client view.
[ftp] disconnect
221 Server closing.
[ftp]
display ftp source-ip
Syntax
display ftp source-ip
View
Any view
Parameters
None
Description
Use the display ftp source-ip command to display the source IP address that the current device serving as an FTP client uses every time it connects to an FTP server. If a source IP address is specified for the FTP client, the configured source IP address will be displayed. If neither a source IP address nor source interface is specified for the FTP client, 0.0.0.0 will be displayed.
If no source IP address is specified for the FTP client, the switch searches the entry with the destination as the subnet where the FTP server resides, and uses the IP address of the outbound interface in the entry as the source IP address.
Examples
# Display the source IP address that the FTP client uses every time it connects to an FTP server.
<Sysname> display ftp source-ip
The source IP you specified is 192.168.0.1
ftp
Syntax
ftp [ cluster | remote-server [ port-number ] ]
View
User view
Parameters
cluster: Connects to the configured FTP server of a cluster. For the configuration of the FTP server of a cluster, refer to the Cluster part of this manual.
remote-server: Host name or IP address of an FTP server, a string of 1 to 20 characters.
port-number: Port number of the FTP server, in the range 0 to 65535. The default is 21.
Description
Use the ftp command to establish a control connection with an FTP server. If you enter a correct username and password, you can enter FTP client view.
Examples
# Connect to the FTP server whose IP address is 2.2.2.2.
Trying ...
Press CTRL+K to abort
Connected.
220 FTP service ready.
User(none):admin
331 Password required for admin.
Password:
230 User logged in.
[ftp]
ftp { cluster | remote-server } source-interface
Syntax
ftp { cluster | remote-server } source-interface interface-type interface-number
View
User view
Parameters
cluster: Connects to the configured FTP server of a cluster. For the configuration of the FTP server of a cluster, refer to the Cluster part of this manual.
remote-server: Host name or IP address of an FTP server, a string of 1 to 20 characters.
interface-type: Type of the source interface, which can be VLAN interface or loopback interface.
interface-number: Number of the source interface.
Description
Use the ftp { cluster | remote-server } source-interface command to configure the source IP address that the switch uses when it connects to an FTP server. The command takes effect only for the current connection process, and it will fail if the specified interface does not exist.
To make the configuration take effect forever, you can use the ftp source-interface command.
Examples
# Configure that the switch uses VLAN-interface 1 as the source interface to connect to the FTP server whose IP address is 192.168.8.8
<Sysname> ftp 192.168.8.8 source-interface Vlan-interface 1
ftp { cluster | remote-server } source-ip
Syntax
ftp { cluster | remote-server } source-ip ip-address
View
User view
Parameters
cluster: Connects to the configured FTP server of a cluster. For the configuration of the FTP server of a cluster, refer to the Cluster part of this manual.
remote-server: Host name or IP address of an FTP server, a string of 1 to 20 characters.
ip-address: Source IP address.
Description
Use the ftp { cluster | remote-server } source-ip command to configure the source IP address that the switch uses when it connects to an FTP server. The command takes effect only for the current connection, and it will fail if the specified source IP address does not exist.
To make the configuration take effect forever, you can use the ftp source-ip command.
Examples
# Configure that the switch uses 192.168.0.1 as the source address to connect to the FTP server whose IP address is 192.168.8.8.
<Sysname> ftp 192.168.8.8 source-ip 192.168.0.1
ftp source-interface
Syntax
ftp source-interface interface-type interface-number
undo ftp source-interface
View
System view
Parameters
interface-type: Type of the source interface, which can be VLAN interface or loopback interface.
interface-number: Number of the source interface.
Description
Use the ftp source-interface command to specify a source interface as the source interface the switch uses every time it connects to an FTP server, and the configuration will be saved to the configuration file of the system.
Use the undo ftp source-interface command to cancel the source interface setting. After you execute this command, the FTP client system decides which interface will be used for accessing FTP servers.
By default, the switch uses the IP address of the outbound interface in the local routing table as the source IP address for connecting to an FTP server. The destination of the outbound interface is the subnet where the FTP server resides.
To configure the source interface used only for the current connection to an FTP server, use the ftp { cluster | remote-server } source-interface command.
Examples
# Specify VLAN-interface 1 as the source interface to be used in each connection between the switch and an FTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ftp source-interface Vlan-interface 1
ftp source-ip
Syntax
ftp source-ip ip-address
undo ftp source-ip
View
System view
Parameters
ip-address: IP address that is to be specified as the source IP address.
Description
Use the ftp source-ip command to specify the source IP address of that the switch uses every time it connects to an FTP server, and the configuration will be saved to the configuration file of the system. The value of argument ip-address must be an IP address on the device where the configuration is performed. Otherwise, a prompt appears to show the configuration fails.
Use the undo ftp source-ip command to cancel the source IP address setting.
By default, the switch uses the IP address of the outbound interface in the local routing table as the source IP address for connecting to an FTP server. The destination of the outbound interface is the subnet where the FTP server resides.
Examples
# Specify 192.168.0.1 as the source IP address that the switch uses every time it connects to an FTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ftp source-ip 192.168.0.1
get
Syntax
get remotefile [ localfile ]
View
FTP client view
Parameters
remotefile: Name of a file to be downloaded.
localfile: File name used when a file is downloaded and saved to the local device. If this argument is not specified, the source file name is used when a file is saved and downloaded to the local device.
Description
Use the get command to download a remote file and save it as a local file.
When using the get command to download files from a remote FTP server, note to limit the length of file path and file name within the following ranges:
l A directory name should be no more than 91 characters.
l A file name plus its local path name should be no more than 127 characters.
l A device name should be no more than 14 characters.
l A file name plus its complete path name should be no more than 142 characters.
Examples
# Download file temp.c.
[ftp] get temp.c
227 Entering Passive Mode (2,2,2,2,4,12).
125 ASCII mode data connection already open, transfer starting for temp.c.
..226 Transfer complete.
FTP: 15 byte(s) received in 2.568 second(s) 0.00 byte(s)/sec.
lcd
Syntax
lcd
View
FTP client view
Parameters
None
Description
Use the lcd command to display the local working directory on the FTP client. If you have logged in to the FTP server, you cannot modify the local working directory of the FTP client; to modify the local working directory, you need to terminate the connection with the FTP server, quit FTP client view, execute the cd command in user view, and reconnect to the FTP server.
Examples
# Display the local working directory on the FTP client.
[ftp] lcd
% Local directory now flash:/temp
ls
Syntax
ls [ remotefile [ localfile ] ]
View
FTP client view
Parameters
remotefile: Name of the file to be queried.
localfile: Name of the local file where the querying result is to be saved.
Description
Use the ls command to display the information about a specified file on an FTP server.
If you do not specify the remotefile argument, names of all the files in the current remote directory are displayed.
The ls command only displays file names on an FTP server. To query other file-related information, for example, file size, creation date and so on, use the dir command.
Related commands: pwd.
Examples
# Display the names of all the files in the current directory on the remote FTP server.
227 Entering Passive Mode (2,2,2,2,4,4).
125 ASCII mode data connection already open, transfer starting for *.
s3r01.btm
s3r01_15.btm
config.cfg
default.diag
test
test.txt
mytest.bak
a.txt
myopenssh
public
temp.c
swithc001
226 Transfer complete.
FTP: 200 byte(s) received in 0.145 second(s) 1.00Kbyte(s)/sec.
mkdir
Syntax
mkdir pathname
View
FTP client view
Parameters
pathname: Name of the directory to be created.
Description
Use the mkdir command to create a directory on an FTP server.
Related commands: dir, rmdir.
Examples
# Create the directory flash:/lanswitch on the FTP server.
[ftp] mkdir flash:/lanswitch
257 "flash:/ lanswitch" new directory created.
open
Syntax
open { ip-address | server-name } [ port ]
View
FTP client view
Parameters
ip-address: IP address of an FTP server.
server-name: Host name of the FTP server, a string of 1 to 20 characters.
port: Port number on the remote FTP server, in the range 0 to 65535. The default value is 21.
Description
Use the open command to establish a control connection with an FTP server. If you have connected to an FTP server, you cannot use the open command to connect to another server, and you need to terminate the connection with the current FTP server and then execute the open command.
Related commands: close.
Examples
# Establish a control connection with the FTP server whose IP address is 1.1.1.1 in FTP client view.
Trying ...
Press CTRL+K to abort
Connected.
220 FTP service ready.
User(none):abc
331 Password required for abc
Password:
230 User logged in.
passive
Syntax
passive
undo passive
View
FTP client view
Parameters
None
Description
Use the passive command to set the data transfer mode to the passive mode.
Use the undo passive command to set the data transfer mode to the active mode.
By default, the passive mode is adopted.
The differences between the passive mode and the active mode are:
l When working in the active mode, an FTP client advertises a random port Port1 to an FTP server through TCP port 21; upon receiving the advertisement, the FTP server initiates a connection with Port1 on the client for data transmission.
l When working in the passive mode, an FTP client sends a passive request to the FTP server before data transmission, the FTP server advertises a local random port Port2 to the FTP client, and the FTP client establishes a connection with Port2 using a local random port.
If an FTP client initiates a connection with an FTP server through a firewall, the firewall may block the connection request because the FTP server initiates the connection with Port1 through an external network, and thus data transmission will be affected. Therefore, you are recommended to set the data transmission mode of the FTP client to passive when accessing the FTP server through a firewall.
Examples
# Set the data transfer mode to the passive mode.
[ftp] passive
% Passive is on
put
Syntax
put localfile [ remotefile ]
View
FTP client view
Parameters
localfile: Name of a local file to be uploaded.
remotefile: File name used after a file is uploaded and saved on an FTP server.
Description
Use the put command to upload a local file on an FTP client to an FTP server.
If you do not specify the remotefile argument, the local file is saved on the FTP server with its original name.
Examples
# Upload the local file named temp.c to the FTP server.
227 Entering Passive Mode (2,2,2,2,4,13).
125 ASCII mode data connection already open, transfer starting for temp.c.
226 Transfer complete.
FTP: 15 byte(s) sent in 7.549 second(s) 1.00byte(s)/sec.
pwd
Syntax
pwd
View
FTP client view
Parameters
None
Description
Use the pwd command to display the working directory on an FTP server.
Related commands: cd, cdup, dir, ls.
Examples
# Display the working directory on the FTP server.
[ftp] pwd
257 "flash:/temp" is current directory.
quit
Syntax
quit
View
FTP client view
Parameters
None
Description
Use the quit command to terminate FTP control connection and FTP data connection and return to user view.
This command has the same effect as that of the bye command.
Examples
# Terminate the FTP control connection and FTP data connection and return to user view.
221 Server closing.
<Sysname>
remotehelp
Syntax
remotehelp [ protocol-command ]
View
FTP client view
Parameters
protocol-command: FTP protocol command.
Description
Use the remotehelp command to display the help information about an FTP protocol command.
This command works only when the FTP server provides the help information about FTP protocol commands.
l This command is always valid when an H3C series Ethernet switch operates as the FTP server.
l If you use other FTP server software, refer to related instructions to know whether the FTP server provides help information about FTP protocol commands.
Examples
# Display the syntax of the user command.
[ftp] remotehelp user
214 Syntax: USER <sp> <username>
rename
Syntax
rename remote-source remote-dest
View
FTP client view
Parameters
remote-source: Name of a file on a remote host.
remote-dest: Destination file name.
Description
Use the rename command to rename a file on a remote FTP server.
If the destination file name conflicts with the name of an existing file or directory, you will fail to rename the file.
Examples
# Rename file temp.c as forever.c.
[ftp] rename temp.c forever.c
350 Enter the name to rename it to...
250 File renamed successfully
rmdir
Syntax
rmdir pathname
View
FTP client view
Parameters
pathname: Name of a directory on an FTP server.
Description
Use the rmdir command to remove a specified directory on an FTP server.
Note that you can only use this command to remove directories that are empty.
Examples
# Remove the directory flash:/temp1 on the FTP server. (Assume that the directory is empty.)
[ftp] rmdir flash:/temp1
200 RMD command successful.
user
Syntax
user username [ password ]
View
FTP client view
Parameters
username: Username used to log in to an FTP server.
password: Password used to log in to an FTP server.
Description
Use the user command to log in to an FTP server with the specified username and password.
Examples
# Log in to the FTP server using the user account with the username tom and the password 111.
[ftp] user tom 111
331 Password required for tom.
230 User logged in.verbose
verbose
Syntax
verbose
undo verbose
View
FTP client view
Parameters
None
Description
Use the verbose command to enable the verbose function, which displays execution information of user operations and all FTP responses.
Use the undo verbose command to disable the verbose function.
The verbose function is enabled by default.
Examples
# Download the file with name test1.cfg.
[ftp] get test1.cfg
227 Entering Passive Mode (192,168,0,3,5,239)
150 "D:\FTP\test1.cfg" file ready to send (100 bytes) in ASCII mode
....226 Transfer finished successfully.
FTP: 100 byte(s) received in 5.109 second(s) 20.00 byte(s)/sec.
# Disable the verbose function.
[ftp] undo verbose
# Download the file with name test.cfg.
[ftp] get test.cfg
......FTP: 1740 byte(s) received in 9.367 second(s) 185.00 byte(s)/sec.
The above output indicates that if the verbose function is disabled, only execution information of users’ operations is obtained from the system of the switch, while the output information beginning with three-digit numbers cannot be returned to the users.
For the description of the numbers at the beginning of FTP output information, refer to the corresponding section in RFC 959.
SFTP Server Configuration Commands
sftp server enable
Syntax
sftp server enable
undo sftp server
View
System view
Parameters
None
Description
Use the sftp server enable command to enable the SFTP server.
Use the undo sftp server command to disable the SFTP server.
By default, the SFTP server is disabled.
Examples
# Enable the SFTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] sftp server enable
sftp timeout
Syntax
sftp timeout time-out-value
undo sftp timeout
View
System view
Parameters
time-out-value: Timeout time, in the range 1 to 35,791, in minutes. The default value is 10.
Description
Use the sftp timeout command to set the idle timeout time on an SFTP server.
Use the undo sftp timeout command to restore the idle timeout time to the default value.
If the idle timeout time exceeds the specified threshold, the system disconnects the SFTP user automatically.
Examples
# Set the idle timeout time to 500 minutes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] sftp timeout 500
SFTP Client Configuration Commands
bye
Syntax
bye
View
SFTP client view
Parameters
None
Description
Use the bye command to terminate a connection with the remote SFTP server and return to system view.
This command has the same effect as that of the commands exit and quit.
Examples
# Terminate the connection with the remote SFTP server.
sftp-client> bye
Bye
[Sysname]
cd
Syntax
cd [ remote-path ]
View
SFTP client view
Parameters
remote-path: Path of the target directory on the remote server.
Description
Use the cd command to change the working path on the remote SFTP server. If no remote path is specified, this command displays the current working path.
l Use the cd .. command to return to the parent directory.
l Use the cd / command to return to the root directory.
Examples
# Change the working path to new1.
sftp-client>cd new1
Received status: Success
Current Directory is:
/new1
sftp-client>
cdup
Syntax
cdup
View
SFTP client view
Parameters
None
Description
Use the cdup command to change the working path on the remote SFTP server and return to the parent directory.
Examples
# Change the working path and return to the parent directory.
sftp-client>cdup
Received status: Success
Current Directory is:
/
delete
Syntax
delete remote-file&<1-10>
View
SFTP client view
Parameters
remote-file&<1-10>: Name of a file on the server. &<1-10> indicates that up to ten file names can be input. These file names should be separated by spaces.
Description
Use the delete command to delete a specified file from the remote SFTP server.
This command has the same effect as that of the remove command.
Examples
# Delete the file named test.txt on the server.
sftp-client> delete test.txt
The following files will be deleted:
/test.txt
Are you sure to delete it?(Y/N):y
This operation may take a long time.Please wait...
Received status: Success
File successfully Removed
dir
Syntax
dir [ -a | -l ] [ remote-path ]
View
SFTP client view
Parameters
-a: Displays the file and folder names in a specified directory.
-l: Displays the details about files and folders in a specified directory in a list.
remote-path: Name of the path where the file and folders to be queried reside.
Description
Use the dir command to query a specified directory on the remote SFTP server.
If -a or -l is not specified, the command displays details about the files and folders in the specified directory in a list.
If no remote path is specified, this command displays the files in the current working directory.
This command has the same effect as that of the Is command.
Examples
# Display the files in the current directory.
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey1
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:28 pub1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:24 new1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:18 new2
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:30 pub2
Received status: End of file
Received status: Success
display sftp source-ip
Syntax
display sftp source-ip
View
Any view
Parameters
None
Description
Use the display sftp source-ip command to display the source IP address specified for the current SFTP client.
If you have specified a source interface for the SFTP client, this command displays the IP address of the source interface; otherwise, this command displays the IP address 0.0.0.0.
Examples
# Display the source IP address for the current SFTP client.
<Sysname> display sftp source-ip
The source IP you specified is 192.168.1.1
exit
Syntax
exit
View
SFTP client view
Parameters
None
Description
Use the exit command to terminate a connection with the remote SFTP server and return to system view.
This command has the same effect as that of the commands bye and quit.
Examples
# Terminate a connection with the remote SFTP server.
sftp-client> exit
Bye
[Sysname]
get
Syntax
get remote-file [ local-file ]
View
SFTP client view
Parameters
remote-file: Name of a file on the remote SFTP server.
local-file: Name of a local file.
Description
Use the get command to download a file from the remote server.
By default, the remote file name is used for the file saved locally if no local file name is specified.
Examples
# Download the file tt.bak and save it with the name tt.txt.
sftp-client>get tt.bak tt.txt....
This operation may take a long time, please wait...
Remote file:tt.bak ---> Local file: tt.txt..
Received status: End of file
Received status: Success
Downloading file successfully ended
help
Syntax
help [ all |command ]
View
SFTP client view
Parameters
all: Displays all the command names.
command: Command name.
Description
Use the help command to display the help information about SFTP client commands.
If no command is specified, this command displays all the command names.
Examples
# View the help information about the get command.
sftp-client> help get
get remote-path [local-path] Download file.Default local-path is the same
with remote-path
ls
Syntax
ls [ -a | -l ] [ remote-path ]
View
SFTP client view
Parameters
-a: Displays the file and folder names in a specified directory.
-l: Displays the details about files and folders in a specified directory in a list.
remote-path: Name of the path where the files and folders to be queried reside.
Description
Use the Is command to display files in a specified directory on the remote SFTP server.
If -a or -l is not specified, the command displays details about the files and folders in the specified directory in a list.
If no remote path is specified, this command displays the files in the current working directory.
This command has the same effect as that of the dir command.
Examples
# Display the files in the current directory.
sftp-client> ls
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey1
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:28 pub1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:24 new1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:18 new2
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:30 pub2
Received status: End of file
Received status: Success
mkdir
Syntax
mkdir remote-path
View
SFTP client view
Parameters
remote-path: Name of a directory on the remote SFTP server.
Description
Use the mkdir command to create a directory on the remote SFTP server.
Examples
# Create a directory named hj on the remote SFTP server.
sftp-client>mkdir hj
Received status: Success
New directory created
put
Syntax
put local-file [ remote-file ]
View
SFTP client view
Parameters
local-file: Name of a local file.
remote-file: Name of a file on the remote SFTP server.
Description
Use the put command to upload a local file to the remote SFTP server.
By default, the local file name is used for the remote file if no remote file name is specified.
Examples
# Upload the file named config.cfg to the remote SFTP server and save it as 1.txt.
sftp-client>put config.cfg 1.txt
This operation may take a long time, please wait...
Local file:config.cfg ---> Remote file: /1.txt
Received status: Success
Uploading file successfully ended
pwd
Syntax
pwd
View
SFTP client view
Parameters
None
Description
Use the pwd command to display the working directory on the remote SFTP server.
Examples
# Display the working directory on the remote SFTP server.
sftp-client> pwd
/
quit
Syntax
quit
View
SFTP client view
Parameters
None
Description
Use the quit command to terminate a connection with the remote SFTP server and return to system view.
This command has the same effect as that of the commands bye and exit.
Examples
# Terminate a connection with the remote SFTP server.
sftp-client> quit
Bye
[Sysname]
remove
Syntax
remove remote-file&<1-10>
View
SFTP client view
Parameters
remote-file&<1-10>: Name of a file on the server. &<1-10> indicates that up to ten file names can be input. These file names should be separated by spaces.
Description
Use the remove command to delete a specified file from the remote SFTP server.
This command has the same effect as that of the delete command.
Examples
# Delete the file named temp.c from the server.
sftp-client> remove temp.c
The followed File will be deleted:
/temp.c
Are you sure to delete it?(Y/N):y
This operation may take a long time.Please wait...
Received status: Success
File successfully Removed
rename
Syntax
rename oldname newname
View
SFTP client view
Parameters
oldname: Old file name.
newname: New file name.
Description
Use the rename command to rename a specified file on the remote SFTP server.
Examples
# Change the file name temp.bat to temp.txt.
sftp-client> rename temp.bat temp.txt
File successfully renamed
rmdir
Syntax
rmdir remote-path&<1-10>
View
SFTP client view
Parameters
remote-path&<1-10>: Name of a directory on the remote SFTP server. &<1-10> indicates that up to ten file names can be input. These file names should be separated by spaces.
Description
Use the rmdir command to remove a specified directory from the remote SFTP server.
Examples
# Remove the directory hello on the SFTP server.
sftp-client>rmdir hello
The followed directory will be deleted
/hello
Are you sure to remove it?(Y/N):y
This operation may take a long time.Please wait...
Received status: Success
Directory successfully removed
sftp
Syntax
sftp { host-ip | host-name } [ port-num ] [identity-key { dsa | rsa } | prefer_kex { dh_group1 | dh_exchange_group } | prefer_ctos_cipher { 3des | des | aes128 } | prefer_stoc_cipher { 3des | des | aes128 } | prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } | prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 } ] *
View
System view
Parameters
host-ip: IP address of the server.
host-name: Host name of the server, a string of 1 to 20 characters.
port-num: Port number of the server, in the range of 0 to 65535. The default value is 22.
identity-key: The public key algorithm used by the publickey authentication. rsa is the default.
l dsa: The public key algorithm is DSA.
l rsa: The public key algorithm is RSA.
prefer_kex: Specifies a preferred key exchange algorithm. You can select either of the two algorithms.
l dh_group1: Key exchange algorithm diffie-hellman-group1-sha1. It is the default key exchange algorithm.
l dh_exchange_group: Key exchange algorithm diffie-hellman-group-exchange-sha1.
prefer_ctos_cipher: Preferred client-to-server encryption algorithm. The default algorithm is aes128.
prefer_stoc_cipher: Preferred server-to-client encryption algorithm. The default algorithm is aes128.
l 3des: 3des_cbc encryption algorithm.
l des: des_cbc encryption algorithm.
l aes128: aes_128 encryption algorithm.
prefer_ctos_hmac: Preferred client-to-server HMAC algorithm. The default algorithm is sha1_96.
prefer_stoc_hmac: Preferred server-to-client HMAC algorithm. The default algorithm is sha1_96.
l sha1: HMAC algorithm hmac-sha1.
l sha1_96: HMAC algorithm hmac-sha1-96.
l md5: HMAC algorithm hmac-md5.
l md5_96: HMAC algorithm hmac-md5-96.
Description
Use the sftp command to establish a connection with the remote SFTP server and enter SFTP client view.
If you specify to authenticate a client through public key on the server, the client needs to read the local private key when logging in to the SFTP server. Since both RSA and DSA are available for public key authentication, you need to use the identity-key key word to specify the algorithms to get correct local private key; otherwise you will fail to log in.
Examples
# Connect the SFTP server with the IP address 10.1.1.2. Use the default encryption algorithm.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]sftp 10.1.1.2
Input Username: kk
Trying 10.1.1.2...
Press CTRL+K to abort
Connected to 10.1.1.2 ...
The Server is not authenticated. Do you continue access it?(Y/N):y
Do you want to save the server's public key?(Y/N):y
Enter password:
sftp-client>
sftp source-interface
Syntax
sftp source-interface interface-type interface-number
undo sftp source-interface
View
System view
Parameters
interface-type: Type of a source interface. It can be loopback or VLAN interface.
interface-number: Number of a source interface.
Description
Use the sftp source-interface command to specify a source interface for the SFTP client. If the specified interface does not exist, the system prompts that the configuration fails.
Use the undo sftp source-interface command to remove the specified source interface. Then the client accesses the SFTP server with the local device address determined by the system.
Examples
# Specify VLAN-interface 1 as the source interface of the SFTP client.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] sftp source-interface Vlan-interface 1
sftp source-ip
Syntax
sftp source-ip ip-address
undo sftp source-ip
View
System view
Parameters
ip-address: Source IP address to be set.
Description
Use the sftp source-ip command to specify a source IP address for the SFTP client. If the specified IP address is not the IP address of the local device, the system prompts that the configuration fails.
Use the undo sftp source-ip command to remove the specified source IP address. Then the client accesses the SFTP server with the local device address determined by the system.
Examples
# Specify 192.168.0.1 as the source IP address of the SFTP client.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] sftp source-ip 192.168.0.1
TFTP Configuration Commands
When accessing a TFTP server configured with an IPv6 address, use the tftp ipv6 command. For details, refer to the IPv6 Management part in this manual.
display tftp source-ip
Syntax
display tftp source-ip
View
Any view
Parameters
None
Description
Use the display tftp source-ip command to display the source IP address that a TFTP client uses every time it connects to a TFTP server (use the tftp source-ip command). If a source interface is specified for the TFTP client with the tftp source-interface command, the IP address of the source interface is displayed. If neither source IP address nor source interface is specified for the TFTP client, 0.0.0.0 is displayed.
Related commands: tftp source-ip, tftp-source-interface.
Examples
# Display the source IP address that a TFTP client uses every time it connects to a TFTP server.
<Sysname> display tftp source-ip
The source IP you specified is 192.168.0.1
tftp { ascii | binary }
Syntax
tftp { ascii | binary }
View
System view
Parameters
ascii: Transfers data in ASCII mode, which is used for transferring text files.
binary: Transfers data in binary mode, which is used for transferring program files.
Description
Use the tftp { ascii | binary } command to set the TFTP data transfer mode.
By default, the binary mode is adopted.
Examples
# Specify to adopt the ASCII mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] tftp ascii
TFTP transfer mode changed to ASCII.
tftp get
Syntax
tftp tftp-server get source-file [ dest-file ]
View
User view
Parameters
tftp-server: IP address or the host name of a TFTP server, a string of 1 to 20 characters. If the switch belongs to a cluster, the value cluster means to connect to the TFTP server of the cluster. For the configuration of the TFTP server of a cluster, refer to the Cluster part in this manual.
source-file: Name of the file to be downloaded from the TFTP server.
dest-file: File name used when a file is downloaded and saved to the switch.
Description
Use the tftp get command to download a file from a TFTP server, and save it to the local storage device.
Different from the FTP function, the working directory of a TFTP server cannot be changed or specified on a TFTP client. To enter another working directory, you need to modify the working directory on the TFTP server and relog in.
The H3C S3600 series switch supports the TFTP file size negotiation function, namely, before downloading a file, the switch requests the size of the file to be downloaded to the TFTP server, thus to ensure whether there is enough space on the Flash for file downloading. If the TFTP server also supports the function, when the file size is too large, the switch can know this in advance and stops the download operation to save network resources; if the TFTP server does not support the function, the switch can only download the file to its memory, and delete the file if it finds the file is too large when writing the file to the Flash.
Related commands: tftp put.
Examples
# Download file abc.txt from the TFTP server whose IP address is 1.1.1.1 and save it as efg.txt (suppose free space of the flash memory is sufficient).
<Sysname> tftp 1.1.1.1 get abc.txt efg.txt
File will be transferred in binary mode.
Downloading file from remote tftp server, please wait......
TFTP: 35 bytes received in 0 second(s).
File downloaded successfully.
# Download file temp.txt from the TFTP server (1.1.1.1) and save it as test1.txt (suppose that free space of the Flash is insufficient and the TFTP server does not support file size negotiation).
<Sysname> tftp 1.1.1.1 get temp.txt test1.txt
File will be transferred in binary mode.
Downloading file from remote tftp server, please wait......
Not enough space; Writing to device failed; Downloaded data will be deleted.............
Deleting file successful.
# Download file temp.txt from the TFTP server (1.1.1.1) and save it as test2.txt (suppose that free space of the Flash is insufficient and the TFTP server supports file size negotiation).
<Sysname> tftp 1.1.1.1 get temp.txt test2.txt
File will be transferred in binary mode.
Downloading file from remote tftp server, please wait......
Not enough space; Quit writing to device; Created file will be deleted.............
Deleting file successful.
tftp put
Syntax
tftp tftp-server put source-file [ dest-file ]
View
User view
Parameters
tftp-server: IP address or the host name of a TFTP server, a string of 1 to 20 characters. If the switch belongs to a cluster, the value cluster means to connect to the TFTP server of the cluster. For the configuration of the TFTP server of a cluster, refer to the Cluster part in this manual.
source-file: Name of the file to be uploaded to the TFTP server.
dest-file: File name used when a file is uploaded and saved to a TFTP server.
Description
Use the tftp put command to upload a file to a specified directory on a TFTP server.
When uploading files to a TFTP server, you can only select the files under the current working directory of the device. To upload files in another directory, use the cd command to change to the specified directory in user view before executing the tftp put command. For the execution of the cd command, refer to the File System Management part in this manual.
Related commands: tftp get.
Examples
# Upload file config.cfg to the TFTP server whose IP address is 1.1.1.1 and save it as temp.cfg.
<Sysname> tftp 1.1.1.1 put config.cfg temp.cfg
File will be transferred in binary mode.
Copying file to remote tftp server. Please wait... /
TFTP: 962 bytes sent in 0 second(s).
File uploaded successfully.
tftp tftp-server source-interface
Syntax
tftp tftp-server source-interface interface-type interface-number { get source-file [ dest-file ] | put source-file-url [ dest-file ] }
View
User view
Parameters
tftp-server: IP address or host name of the TFTP server to be connected to, a string of 1 to 20 characters. If the switch belongs to a cluster, the value cluster means to connect to the TFTP server of the cluster. For the configuration of the TFTP server of a cluster, refer to the Cluster part in this manual.
interface-type: Type of the source interface.
interface-number: Number of the source interface.
get: Specifies to download a file from the TFTP server.
source-file: Name of the file to be downloaded.
dest-file: File name used when a file is downloaded and saved to the switch.
put: Specifies to upload a file to the TFTP server.
source-file-url: Path and name of the file to be uploaded to the TFTP server.
dest-file: File name used when a file is uploaded and saved to a TFTP server.
Description
Use the tftp tftp-server source-interface command to connect to a TFTP server through the specified source interface, and perform download or upload operations. If the specified source interface does not exist, a prompt appears to show the command fails to be executed.
Examples
# Connect to the remote TFTP server whose IP address is 192.168.8.8 through the source interface VLAN-interface 1, and download the file named 3600.bin from it.
<Sysname> tftp 192.168.8.8 source-interface Vlan-interface 1 get 3600.bin
tftp tftp-server source-ip
Syntax
tftp tftp-server source-ip ip-address { get source-file [ dest-file ] | put source-file-url [ dest-file ] }
View
User view
Parameters
tftp-server: IP address or host name of the TFTP server to be connected to, a string of 1 to 20 characters. If the switch belongs to a cluster, the value cluster means to connect to the TFTP server of the cluster. For the configuration of the TFTP server of a cluster, refer to the Cluster part in this manual.
ip-address: IP address to be set as the source IP address.
get: Specifies to download a file from the TFTP server.
source-file: Name of the file to be downloaded.
dest-file: File name used when a file is downloaded and saved to the switch.
put: Specifies to upload a file to the TFTP server.
source-file-url: Path and name of the file to be uploaded to the TFTP server.
dest-file: File name used when a file is uploaded and saved to a TFTP server.
Description
Use the tftp tftp-server source-ip command to connect to a TFTP server through the specified source IP address, and perform download or upload operations. If the specified source IP address does not exist, a prompt appears to show the command fails to be executed.
Examples
# Connect to the remote TFTP server whose IP address is 192.168.8.8 through the source IP address 192.168.0.1, and download the file named 3600.bin from it.
<Sysname> tftp 192.168.8.8 source-ip 192.168.0.1 get 3600.bin
tftp source-interface
Syntax
tftp source-interface interface-type interface-number
undo tftp source-interface
View
System view
Parameters
interface-type interface-number: Source interface that the switch uses every time it connects to the TFTP server.
Description
Use the tftp source-interface command to specify the source interface of a TFTP client that the TFTP client uses every time it connects to a TFTP server. The system prompts that the configuration fails if the specified interface does not exist.
Use the undo tftp source-interface command to cancel the source interface setting. The switch uses the IP address of the outbound interface in the local routing table as the source IP address to connect to a TFTP server. The destination of the outbound interface is the subnet where the TFTP server resides
By default, no source interface is specified for the switch to connect to the TFTP server.
Examples
# Specify VLAN-interface 1 as the source interface that the TFTP client uses every time it connects to a TFTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] tftp source-interface Vlan-interface 1
tftp source-ip
Syntax
tftp source-ip ip-address
undo tftp source-ip
View
System view
Parameters
ip-address: The source IP address that the switch uses every time it connects to a TFTP server.
Description
Use the tftp source-ip command to specify the source IP address that a TFTP client uses every time it connects with a TFTP server. The specified IP address must exist; otherwise, a prompt appears to show the configuration fails.
Use the undo tftp source-ip command to cancel the source IP address setting. The switch uses the IP address of the outbound interface in the local routing table as the source IP address to connect to a TFTP server. The destination of the outbound interface is the subnet where the TFTP server resides.
By default, no source IP address is specified for the switch to connect to the TFTP server.
Examples
# Specify 192.168.0.1 as the source IP address that the TFTP client uses every time it connects to a TFTP server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] tftp source-ip 192.168.0.1
tftp-server acl
Syntax
tftp-server acl acl-number
undo tftp-server acl
View
System view
Parameters
acl-number: Basic ACL number, in the range 2000 to 2999.
Description
Use the tftp-server acl command to specify the ACL adopted for the connection between a TFTP client and a TFTP server.
Use the undo tftp-server acl command to cancel all ACLs adopted.
Examples
# Specify to adopt ACL 2000 on the TFTP client.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] tftp-server acl 2000