CISCO交换机命令全集加说明2( 四 )


hostname# configure
hostname(config)#

This example shows how to enter global configuration mode from terminal t.
hostname# configure t
Related Commands
disable
enable
end
exit
interface
line console
copy (nvram tFTP)
Use the copy (nvram tftp) privileged Exec command to upload the running nondefault configuration to a Trivial File Transfer Protocol (TFTP) server host and the destination file dst_file.
copy nvram tftp://host/dst_file
Syntax Description
//host/dst_file Target host and destination file where host is an IP address or a hostname.

Command Mode
Privileged Exec
Usage Guidelines
Error messages appear in the following situations:
?The host is unreachable (using existing time-out implementation).
?The host terminates the TFTP session.
?The host specified cannot be resolved through DNS.
If other download or upload operations (firmware, configuration, web pages) are in progress, the following error message appears:
Other downloads or uploads in progress. Please wait until existing download or upload is completed.
Example
This example shows how to use TFTP to upload the switch NVRAM configuration to the host spaniel using destination file matilda.cfg.
hostname# copy nvram tftp://spaniel/matilda.cfg

Configuration upload is successfully completed

If the upload fails, the following message displays:
Error: Configuration upload operation failed
Related Commands
copy (tftp)
service (config)
show (running-config)
show (version)
tftp (accept)
tftp (server)
copy (tftp)
Use the copy tftp privileged Exec command to download a configuration or operation code file from the Trivial File Transfer Protocol (TFTP) server.
copy tftp://host/src_file {opcode [type module] nvram}
Syntax Description
//host/src_file Host and source file where host is an IP address or hostname. Source filename can be up to 80 characters.

opcode Download new operation code.
type Interface type. The valid values are fddi and atm.
module Interface number: 1 or A for module A, and 2 or B for module B.
nvram Download a configuration file into NVRAM.

Command Mode
Privileged Exec
Usage Guidelines
You must specify type and module if the download is for a module.
Downloaded configuration files are executed immediately. If the switch is connected to a console, any errors during execution will generate an error message. The switch attempts to execute all commands, irrespective of failures.
When downloading an operation code file, the entire system (including other CLI sessions) is inactive for about 30 seconds after the file is retrieved.
Error messages appear in the following situations:
?The operation code file is not in the correct format.
?The host is unreachable (using existing time-out implementation).
?The host aborts the TFTP session.
?The host specified cannot be resolved through DNS.
?The module specified does not have firmware or a configuration that can be downloaded.
If other download or upload operations (firmware, configuration, web pages) are in progress, the following message appears:
Other downloads or uploads in progress. Please wait until existing download or upload is completed.
Examples
This example shows how to download new system operational code op.bin from host spaniel.
hostname# copy tftp://spaniel/op.bin opcode

This example shows how to download new FDDI operational code fddi.bin from host spaniel to the FDDI module in slot A.
hostname# copy tftp://spaniel/fddi.bin opcode fddi A

TFTP successfully downloaded operational code

This example shows how to download configuration file matilda.cfg to NVRAM from host spaniel.
hostname# copy tftp://spaniel/matilda.cfg nvram

TFTP successfully downloaded configuration file

If the download fails, the following message displays:
Error: TFTP failed to download the configuration file

推荐阅读