|
Table Of Contents
7.1.1 Example of FTP from a Remote Server
7.1.2 Example of FTP to a Remote Server
7.2.1 Example of TFTP from a Remote Server
7.2.2 Example of TFTP to a Remote Server
File Transfers
This chapter discusses how to get and send image and configuration files between an FTP or TFTP server and the ONS 15216 EDFA2.
7.1 FTP Command Line
To start an FTP session, use the following command:
ash:hostname:ONS15216 EDFA2> network host ftp FTP_server_IP_address
To log off, type quit at the FTP command line. This command disconnects the user from the remote server and exits the FTP shell.
7.1.1 Example of FTP from a Remote Server
The following procedure shows how to FTP an image file from a remote server to the FFS of the ONS 15216 EDFA2.
Step 1 Start FTP on the remote server.
Step 2 At the hostname prompt, enter the following command to log in to the FTP site.
ash:hostname:ONS15216 EDFA2> network host ftp FTP_server_IP_address
The ONS 15216 EDFA2 should respond as follows:
connecting to FTP_server_IP_address
connected to FTP_server_IP_address
Once the login process is completed, the ftp prompt should be available.
Step 3 At the ftp prompt, enter the command as shown below to complete the FTP logon.
ftp> login FTP_username
Step 4 When prompted, enter the FTP user password as shown.
Password: *****
The ONS 15216 EDFA2 should respond as follows:
230 User FTP_username logged in.
Step 5 At the ftp prompt, change directories to where the remote file is located using the following command:
ftp> cd /Directory_of_FTP_site
Step 6 At the ftp prompt, enter the following command:
ftp> type i
The ONS 15216 EDFA2 should respond as follows:
type set to BINARY
Step 7 At the ftp prompt, get the file from the remote server using the following command:
ftp> get 15216EdfaSw_2.x.x
When the command is entered, the file transfer begins. When the file transfer is complete, the following information should be displayed:
Bytes received: 1963195
Transfer complete.
Step 8 At the ftp prompt, enter the following command:
ftp> quit
The FTP session is terminated and the following response should be displayed:
Ftp session terminated.
The ONS 15216 EDFA2 then returns to the hostname prompt.
Step 9 At the hostname prompt, check that the file was transferred and is complete using the following command:
ash:hostname:ONS15216 EDFA2> ffs file list
7.1.2 Example of FTP to a Remote Server
The following procedure shows how to FTP a database backup file from the FFS of the ONS 15216 EDFA2 to a remote server.
Step 1 Start FTP on the remote server.
Step 2 At the hostname prompt, enter the following command to log in to the FTP site.
ash:hostname:ONS15216 EDFA2> network host ftp FTP_server_IP_address
The ONS 15216 EDFA2 should respond as follows:
connecting to FTP_server_IP_address
connected to FTP_server_IP_address
Once the login process is completed, the ftp prompt should be available.
Step 3 At the ftp prompt, enter the command as shown below to complete the FTP logon.
ftp> login FTP_username
Step 4 When prompted, enter the FTP user password as shown.
Password: *****
The ONS 15216 EDFA2 should respond as follows:
230 User FTP_username logged in.
Step 5 At the ftp prompt, change directories to where the file is to be placed using the following command:
ftp> cd /Directory_of_FTP_site
Step 6 At the ftp prompt, enter the following command:
ftp> type i
The ONS 15216 EDFA2 should respond as follows:
type set to BINARY
Step 7 At the ftp prompt, put the file on the remote server using the following command:
ftp> put bkupfilename.txt
When the command is entered, the file transfer begins. When the file transfer is complete, the following information should be displayed:
Bytes sent: 18547
Transfer complete.
Step 8 At the ftp prompt, enter the following command:
ftp> quit
The FTP session is terminated and the following response should be displayed:
Ftp session terminated.
The ONS 15216 EDFA2 then returns to the hostname prompt.
Step 9 On the remote server, check that the file is present and complete.
7.1.3 FTP Commands
Typing the help command in FTP command line mode displays a list of all FTP commands. See Example 7-1.
Example 7-1 FTP Help Command
ftp> help
Available commands (optional parameters are in []):
cd dir Change remote directory to dir.
cdup Change remote directory to parent.
close Close ftp connection and quit ftp shell.
get remote_file Get remote_file from remote server and save as local_file.
lls List local files.
login [username] Login to remote server as username (prompted for password).
ls [expr] Detailed listing of remote files matching expr.
nls [expr] Name only listing of remote files matching expr.
open ip_address Open a connection to server at ip_address and port.
put local_file Send local_file to remote server and save as remote_file.
pwd Show current remote directory.
quit Lose ftp connection and quit ftp shell.
type t Set type to t, either I image/binary or A ascii.
7.2 TFTP File Transfer
TFTP can also be used to transfer files to and from an external server. See the sections below for examples of transferring a database backup file from and to and external server.
7.2.1 Example of TFTP from a Remote Server
To transfer a file from a TFTP server, see Example 7-2, which shows a database backup file transfer.
Example 7-2 TFTP Transfer of Database Backup File from TFTP Server
ash:hostname:ONS15216 EDFA2> snmp row set local cerent15216EdfaFfsOpGroup
cerent15216EdfaFfsOpAction perform
cerent15216EdfaFfsOpOperation cerent15216EdfaFfsTftpGet
cerent15216EdfaFfsOpRequestId 1
cerent15216EdfaFfsOpSrcName dbbkup
cerent15216EdfaFfsOpDstName dbbkup
cerent15216EdfaFfsOpTftpSrvAddr 10.75.0.32
7.2.2 Example of TFTP to a Remote Server
To transfer a file to a TFTP server, see Example 7-2, which shows a database backup file transfer.
Example 7-3 TFTP Transfer of Database Backup File to TFTP Server
ash:hostname:ONS15216 EDFA2> snmp row set local cerent15216EdfaFfsOpGroup
cerent15216EdfaFfsOpAction perform
cerent15216EdfaFfsOpOperation cerent15216EdfaFfsTftpPut
cerent15216EdfaFfsOpRequestId 1
cerent15216EdfaFfsOpSrcName dbbkup
cerent15216EdfaFfsOpDstName dbbkup
cerent15216EdfaFfsOpTftpSrvAddr 10.75.0.32
Posted: Sun Apr 2 01:40:11 PST 2006
All contents are Copyright © 1992--2006 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.