Command:

write

Mode:

Switch> (enable)


Syntax:

write {host file | network | terminal} [rcp all]

write memory


Syntax Description:

host

Variable that specifies the IP address or IP alias of the host

file

Variable that specifies the name of the configuration file

network

Keyword that specifies interactive prompting for the IP address or IP alias of the host and the filename to upload

terminal

Keyword that displays the nondefault configuration file on the terminal

rcp

(Optional) Keyword that uploads a software image to a host using RCP

all

(Optional) Keyword that specifies all modules and system configuration information, including the IP address

memory

Keyword that uploads the current configuration to a specified location

 


Command Description:

Use the write command to upload or display nondefault configurations to a host, terminal, or memory.

The write host file command is a shorthand version of the write network command.

You cannot use the write network command to upload software to the ATM module. With the write network command, the file must already exist on the host (use the UNIX touch filename command to create the file).

The write memory command is applicable only when the switch is set to save its configuration to a text file.


Examples:

This sample session assumes that module 1 is a 2-port supervisor engine module; module 2 is a 12-port 10/100BASE-T switched Ethernet module; modules 3 and 5 are empty; and module 4 is a FDDI module. Details of the ATM configuration must be accessed through the special module mode. 

This example shows how to upload the system5.cfg file to the mercury host using the write network command:

Console> (enable) write network

IP address or name of host? mercury

Name of configuration file to write? system5.cfg

Upload configuration to system5.cfg on mercury (y/n) [y]? y

/
Done.  Finished Network Upload.  (9003 bytes)
Console> (enable)
 

This example shows how to upload the system5.cfg file to the mercury host using the write network rcp command:

Console> (enable) write network rcp

IP address or name of host? mercury

Name of configuration file to write? system5.cfg

Upload configuration to system5.cfg on mercury (y/n) [y]? y

/
Done.  Finished Network Upload.  (9003 bytes)
Console> (enable)
 

This example shows how to upload the system5.cfg file to the mercury host using the write host file command as a shorthand method:

Console> (enable) write mercury system5.cfg

Upload configuration to system5.cfg on mercury (y/n) [y]? y

/
Done.  Finished Network Upload.  (9003 bytes)
Console> (enable)
 

This example shows how to use the write terminal all command to display the entire (default and nondefault) configuration file on the terminal (partial display):

Console> (enable) write terminal all

begin
set password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
set prompt Console>
!
#system
set system baud 9600
set system modem  disable
set system name
set system location
set system contact
!
#snmp
set snmp community read-only public
set snmp community read-write private
set snmp community read-write-all secret
set snmp trap  disable
!
#vlan/trunk
set vlan 1    1/1-2,4/1
set vlan 2    2/1-5
!
#trunks
!
#cam
set cam agingtime 1    300
set cam agingtime 2    300
!
#ip
set interface sc0 0.0.0.0 0.0.0.0 0.0.0.0
set interface sl0 0.0.0.0 0.0.0.0
set ip redirect      enable
set ip unreachable   disable
set ip fragmentation enable
set ip alias default         0.0.0.0
set arp agingtime 1200
!
...
<<<<output truncated>>>>
Console> (enable)
 

This example shows how to upload the running system configuration to a pre-specified location:

Console> (enable) write memory

Upload configuration to bootflash:switch.cfg
7165844 bytes available on device bootflash, proceed (y/n) [n]? y

Console> (enable)

Misconceptions:

By default, the write command will upload or output only nondefault configurations. Use the keyword all to upload or output both default and nondefault configurations.


Related commands:
show config

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)