![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
This chapter provides detailed descriptions of the Cisco ONS 15200 Command Line Interface File Transfer Protocol (FTP) commands supported by ONS 15200 network elements (NEs). The FTP client command group is the user interface to the ARPANET standard FTP. These commands allow a user to transfer files from and to a remote network site. The Network Control Board (NCB) of the ONS 15200 can work both as an FTP server (when you start a new ftp session) and as an FTP client (when you start an FTP client session, using the ftp command, after opening a telnet session).
To use FTP, log in as an administrative user to either the telnet or FTP session.
![]() |
Note Normal and error responses may vary between different implementations/interpretations of FTP, so responses listed in this document may not match responses you receive. |
Command | Ascii |
---|---|
Syntax | ascii |
Privilege Level | administrator |
The ascii command sets the file transfer mode for the FTP connection to network ASCII (default) mode. Use the network ASCII mode when transferring text files that contain only printable characters, such as the qdbs.cfg file, to the FTP server (using the put command) or from the FTP server (using the get command). The FTP connection remains in network ASCII transfer mode until it is changed by the binary command. See the individual descriptions of these commands in this chapter for more information.
None.
ftp:>ascii
200 Type set to A.
ftp:>
No connection to server
Control connect to server lost
Command | Binary |
---|---|
Syntax | binary |
Privilege Level | administrator |
The binary command sets the file transfer mode to binary mode. Use binary mode when transferring binary image files, such as snm.out, to the FTP server (using the put command) or from the FTP server (using the get command). The FTP connection remains in binary transfer mode until it is changed by the ascii command. See the individual descriptions of these commands for more information.
None.
ftp:>binary
200 Type set to I.
ftp:>
No connection to server
Control connect to server lost
Command | Cd |
---|---|
Syntax | cd <path> |
Privilege Level | administrator |
The cd command changes the working directory on the FTP server.
"<path>" is the directory path toward which you are navigating.
ftp:>cd <path>
250 CWD command successful.
ftp:>
ftp:>cd snmp
250 CWD command successful.
ftp:>
No connection to server
Control connect to server lost
Command | Close |
---|---|
Syntax | close |
Privilege Level | administrator |
The close and quit commands end an FTP session. The close command closes the connection to the FTP server without logging you out, which allows you to log onto another ftp server. The quit command logs you out of the FTP server before closing the connection to the server and terminating the FTP session.
ftp:>close
NCB:>
None.
Command | Exit |
---|---|
Syntax | exit |
Privilege Level | administrator |
The exit command terminates the FTP session and returns you to the previous command mode. Before the command mode changes, you are logged out and the connection to the FTP server is closed (similar to the quit command).
None.
ftp:>exit
221
NCB:=
Control connect to server lost
Command | Get |
---|---|
Syntax | get <file> |
Privilege Level | administrator |
The get command transfers a file from the FTP server to the NCB module (if you are opened the FTP session from a telnet session). Because the current transfer mode is used, before a file is transferred you must set the correct transfer mode. Set the transfer mode to network ASCII mode (using the ascii command) if a text file, such as qdbs.cfg, will be transferred or set the transfer mode to binary (using the binary command) if a binary file, such as snm.out, will be transferred.
![]() |
Note To permit FTP data connections, some firewalls require passive mode. If the file transfer fails, enable the FTP client's passive mode using the passive command and try the file transfer again. |
"<file>" is the path to the file on the FTP server that you want to transfer.
ftp:>get <file>
200 PORT command successful.
150 Opening ASCII mode data connection for <file> (x bytes).
226 Transfer complete.
ftp:>
ftp:>get /snmp/readme.txt
200 PORT command successful.
150 Opening ASCII mode data connection for /tomkarls/readme.txt(1413 bytes).
226 Transfer complete.
ftp:>
No connection to server
Control connect to server lost
Could not setup data connection
Could not open data connection
Could not write to file
Data connect to server lost
Unimplemented TYPE
Command | Ls |
---|---|
Syntax | ls <directory path> |
Privilege Level | administrator |
The ls command lists the files in a directory on the FTP server when the NCB is the FTP client. Before executing the ls command, the transfer mode must be set to network ASCII mode using the ascii command. If you enter the ls command without specifying a path, the files in the current working directory on the FTP server are listed. Dir is the corresponding command used when the NCB is the FTP server.
![]() |
Note To permit FTP data connections, some firewalls require passive mode. If the directory list does not display, enable the FTP client's passive mode using the passive command and try the ls command again. |
"<directory path>" is the path to the directory for which you want to see a list of files.
ftp:>ls /snmp
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
12-15-00 05:37PM 262219 snmpTools_0_1_0_16.exe
12-19-00 03:26PM 232323 snmptools_0_1_0_17.zip
01-08-01 11:26AM 274432 snmpTools_0_1_0_18.exe
04-05-01 12:16PM 266396 snmpTools_1_0_2_3.exe
04-05-01 12:11PM 236162 snmpTools_1_0_2_3.zip
226 Transfer complete.
ftp:>
No connection to server
Control connect to server lost
Could not setup data connection
Could not open data connection
Command | Open |
---|---|
Syntax | open <ip address | server name> |
Privilege Level | administrator |
The open command establishes a connection and logs you into an FTP server. First the connection is made, and then the FTP server enters an interactive mode and asks for a user name and password. After the server successfully authenticates your user name and password, you can transfer files from/to the FTP server. If the authentication fails, the connection to the FTP server remains open and you can use the user command to make a new login attempt. The connection to the FTP server remains open until you issue a close, exit, or quit command, or the FTP server shuts down.
If the NCB module's DNS client has been configured, you can use a server name rather than an IP address to identify the FTP server that you need to open. See "General Commands," for information on the dnsconf command.
"<ip address|server name>" is the IP address or the name of the FTP server where you want to establish a connection.
ftp:>open 10.52.18.44
220 hag-qs101 Microsoft FTP Service (Version 4.0).
User: anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
Password:******
230------------------------------------------
230--
230-- Welcome to Control System download area
230--
230------------------------------------------
230 Anonymous user logged in.
ftp:>
Could not connect to server [10.52.18.204]
Unresolvable IP address [ncb02.cisco.com]
Command | Passive |
---|---|
Syntax | passive |
Privilege Level | administrator |
The passive command toggles the FTP client's passive mode on and off. The default setting is off. Turning the passive mode on causes the FTP client to initiate a separate data connection for directory listings (ls command) and file transfers (put or get command). Passive mode is required for connections through some firewalls.
None.
ftp:>passive
Passive mode on
ftp:>
--------------------
ftp:>passive
Passive mode off
ftp:>
None.
Command | Put |
---|---|
Syntax | put <file> |
Privilege Level | administrator |
The put command transfers a file from the NCB module to the FTP server. Because the current transfer mode is used, before transferring a file set the correct transfer mode. Set the transfer mode to network ASCII mode (using the ascii command) if a text file, such as qdbs.cfg, will be transferred or set the transfer mode to binary (using the binary command) if a binary file, such as snm.out, will be transferred.
The file is copied to the current working directory on the FTP server. Use the pwd command can be used to display the path to the current working directory and use the cd command to change the working directory.
![]() |
Note To permit FTP data connections, some firewalls require passive mode. If the file transfer fails, enable the FTP client's passive mode using the passive command and try the file transfer again. |
"<file>" represents the file on the NCB module that you want to transfer onto the FTP server.
ftp:>put rs232d.out
200 PORT command successful.
150 Opening BINARY mode data connection for rs232d.out.
226 Transfer complete.
ftp:>
No connection to server
Control connect to server lost
Could not setup data connection
Could not open data connection
Could not read from file
Data connect to server lost
Unimplemented TYPE
No such file
Command | Pwd |
---|---|
Syntax | pwd |
Privilege Level | administrator |
The pwd command prints the path of the current working directory on the FTP server.
None.
ftp:>pwd
257 "/snmp" is current directory.
ftp:>
No connection to server
Control connect to server lost
Command | Quit |
---|---|
Syntax | quit |
Privilege Level | administrator |
The quit command closes an open connection to the FTP server. See the "Close" section for information on the differences between the quit and close commands.
None.
ftp:>quit
221
ftp:>
No connection to server
Control connect to server lost
Command | Status |
---|---|
Syntax | status |
Privilege Level | administrator |
The status command shows the current status of the FTP connection. This command gives information about the following:
None.
ftp:>status
Connected to [10.52.18.44]
Type: binary
Format:non-print
Structure: file
Mode: stream
Passive mode: off
ftp:>
No connection to server
Control connect to server lost
Command | Syst |
---|---|
Syntax | syst |
Privilege Level | administrator |
The syst command shows the type of operating system running on the FTP server.
None.
ftp:>syst
215 Windows_NT version 4.0
ftp:>
No connection to server
Control connect to server lost
Command | User |
---|---|
Syntax | user <user name> |
Privilege Level | administrator |
The user command sends a user name and password to an FTP server.
"<user name>" is the name of the user whose user name and password you want to save to an FTP server.
ftp:>user anonymous
331 Anonymous access allowed, send identity (e-mail name) as password.
Password:*******
230------------------------------------------
230--
230-- Welcome to Control System download area
230--
230------------------------------------------
230 Anonymous user logged in.
ftp:>
No connection to server
Control connect to server lost
Posted: Mon Sep 30 20:31:27 PDT 2002
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.