cc/td/doc/product/ong/15200/15200cli
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

FTP Commands

FTP Commands

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.

6.1 Ascii

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.

6.1.1 Input Parameters

None.

6.1.2 Normal Response Format


Example 6-1: Ascii Command Response ftp:>ascii 200 Type set to A. ftp:>

6.1.3 Error Response

No connection to server Control connect to server lost

6.2 Binary

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.

6.2.1 Input Parameters

None.

6.2.2 Normal Response Format


Example 6-2: Binary Command Response ftp:>binary 200 Type set to I.

ftp:>

6.2.3 Error Response

No connection to server Control connect to server lost

6.3 Cd

Command

Cd

Syntax

cd <path>

Privilege Level

administrator

The cd command changes the working directory on the FTP server.

6.3.1 Input Parameters

"<path>" is the directory path toward which you are navigating.

6.3.2 Normal Response Format

ftp:>cd <path> 250 CWD command successful.
ftp:>

Example 6-3: Cd Command Response ftp:>cd snmp 250 CWD command successful.
ftp:>

6.3.3 Error Response

No connection to server Control connect to server lost

6.4 Close

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.

6.4.1 Normal Response Format

ftp:>close
NCB:>

6.4.2 Error Response

None.

6.5 Exit

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).

6.5.1 Input Parameters

None.

6.5.2 Normal Response Format

ftp:>exit 221

NCB:=

6.5.3 Error Response

Control connect to server lost

6.6 Get

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.

6.6.1 Input Parameters

"<file>" is the path to the file on the FTP server that you want to transfer.

6.6.2 Normal Response Format

ftp:>get <file> 200 PORT command successful. 150 Opening ASCII mode data connection for <file> (x bytes). 226 Transfer complete. ftp:>
Example 6-4: Get Command Response 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:>

6.6.3 Error Response

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

6.7 Ls

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.

6.7.1 Input Parameters

"<directory path>" is the path to the directory for which you want to see a list of files.

6.7.2 Normal Response Format


Example 6-5: Ls Command Response 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:>

6.7.3 Error Response

No connection to server Control connect to server lost Could not setup data connection Could not open data connection

6.8 Open

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.

6.8.1 Input Parameters

"<ip address|server name>" is the IP address or the name of the FTP server where you want to establish a connection.

6.8.2 Normal Response Format


Example 6-6: Open Command Response 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:>

6.8.3 Error Response

Could not connect to server [10.52.18.204] Unresolvable IP address [ncb02.cisco.com]

6.9 Passive

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.

6.9.1 Input Parameters

None.

6.9.2 Normal Response Format

ftp:>passive Passive mode on ftp:> -------------------- ftp:>passive Passive mode off ftp:>

6.9.3 Error Response

None.

6.10 Put

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.

6.10.1 Input Parameters

"<file>" represents the file on the NCB module that you want to transfer onto the FTP server.

6.10.2 Normal Response Format


Example 6-7: Put Command Response ftp:>put rs232d.out 200 PORT command successful. 150 Opening BINARY mode data connection for rs232d.out. 226 Transfer complete. ftp:>

6.10.3 Error Response

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

6.11 Pwd

Command

Pwd

Syntax

pwd

Privilege Level

administrator

The pwd command prints the path of the current working directory on the FTP server.

6.11.1 Input Parameters

None.

6.11.2 Normal Response Format


Example 6-8: Pwd Command Response ftp:>pwd 257 "/snmp" is current directory. ftp:>

6.11.3 Error Response

No connection to server Control connect to server lost

6.12 Quit

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.

6.12.1 Input Parameters

None.

6.12.2 Normal Response Format

ftp:>quit 221 ftp:>

6.12.3 Error Response

No connection to server Control connect to server lost

6.13 Status

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:

6.13.1 Input Parameters

None.

6.13.2 Normal Response Format


Example 6-9: Status Command Response ftp:>status Connected to [10.52.18.44] Type: binary Format:non-print Structure: file Mode: stream Passive mode: off ftp:>

6.13.3 Error Response

No connection to server Control connect to server lost

6.14 Syst

Command

Syst

Syntax

syst

Privilege Level

administrator

The syst command shows the type of operating system running on the FTP server.

6.14.1 Input Parameters

None.

6.14.2 Normal Response Format


Example 6-10: Syst Command Response ftp:>syst 215 Windows_NT version 4.0 ftp:>

6.14.3 Error Response

No connection to server Control connect to server lost

6.15 User

Command

User

Syntax

user <user name>

Privilege Level

administrator

The user command sends a user name and password to an FTP server.

6.15.1 Input Parameters

"<user name>" is the name of the user whose user name and password you want to save to an FTP server.

6.15.2 Normal Response Format


Example 6-11: User Command Response 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:>

6.15.3 Error Response

No connection to server Control connect to server lost

hometocprevnextglossaryfeedbacksearchhelp
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.