Saving and Loading Files

The configuration file can reside on the router's NVRAM or RAM, or on a TFTP server. When a router boots with the default configuration register (0x2102), the configuration file is copied from NVRAM to RAM.

Network administrators typically save the configuration files to a TFTP server as a backup, in case of a router failure.

To save a configuration file from RAM to NVRAM (after configuration changes are made), the IOS command is copy running-config startup-config. The write memory (legacy IOS command, removed in 12.2T versions) command will also copy the running configuration to startup configuration. The write command is a legacy command from earlier releases of IOS that is still valid in today's versions of Cisco IOS software.

Example 3-5 displays a successful configuration change on Ethernet 0/0, followed by a network administrator in PRIV EXEC (privileged EXEC mode) mode saving the new configuration file to NVRAM.

Example 3-5 Saving Cisco IOS Configuration Files R1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

R1(config)#interface ethernet 0/0

R1(config-if)#ip address 131.108.1.1 255.255.255.0

R1(config-if)#exit

R1(config)#exit

R1#copy running-config startup-config

Destination filename [startup-config]?

Building configuration...

Table 3-3 summarizes the configuration file manipulation that can be performed on Cisco IOS routers.

Table 3-3 Cisco IOS File Manipulations

Cisco IOS Command

Meaning

copy running-config startup-config

Copies the configuration file from RAM to NVRAM.

write memory

Copies the running configuration to NVRAM. (Superseded by the new command, copy running-config startup-config.)

copy startup-config running-config

Copies the configuration file from NVRAM to RAM.

Table 3-3 Cisco IOS File Manipulations (Continued)

Cisco IOS Command

Meaning

write terminal

Displays the current configuration file in RAM. (Superseded by the new command, show running-config.)

show config

Displays the current configuration file in NVRAM. (Superseded by the new command, show startup-config.)

copy running-config tftp

Copies the configuration file stored in RAM to a TFTP server. Can also be copied to an FTP or Remote Copy (RCP) server.

copy tftp running-config

Copies a configuration file from a TFTP server to the running configuration.

write memory

Copies the running configuration to NVRAM.

write erase

Clears the NVRAM.

0 0

Post a comment