Managing IOS configuration files

Cisco specific stuff and tips

Managing IOS configuration files

Postby lik » Mon Feb 01, 2010 11:07 am

Backing Up Configurations Offline

Configuration files should be stored as backup files in the event of a problem. Configuration files can be stored on a Trivial File Transfer Protocol (TFTP) server, a CD, a USB memory stick, or a floppy disk stored in a safe place. A configuration file should also be included in the network documentation.

Backup Configuration on TFTP Server

As shown in the figure, one option is to save the running configuration or the startup configuration to a TFTP server. Use either the copy running-config tftp or copy startup-config tftp command and follow these steps:

1. Enter the copy running-config tftp command.

2. Enter the IP address of the host where the configuration file will be stored.

3. Enter the name to assign to the configuration file.

4. Press Enter to confirm each choice.

See the figure to view this process.

Removing All Configurations

If undesired changes are saved to the startup configuration, it may be necessary to clear all the configurations. This requires erasing the startup configuration and restarting the device.

The startup configuration is removed by using the erase startup-config command.

To erase the startup configuration file use erase NVRAM:startup-config or erase startup-config at the privileged EXEC mode prompt:

Router#erase startup-config

Once the command is issued, the router will prompt you for confirmation:

Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]

Confirm is the default response. To confirm and erase the startup configuration file, press the Enter key. Pressing any other key will abort the process.

Caution: Exercise care when using the erase command. This command can be used to erase any file in the device. Improper use of the command can erase the IOS itself or another critical file.

After removing the startup configuration from NVRAM, reload the device to remove the current running configuration file from RAM. The device will then load the default startup configuration that was originally shipped with the device into the running configuration.
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am

Re: Managing IOS configuration files

Postby lik » Mon Feb 01, 2010 11:08 am

Backup Configurations with Text Capture (HyperTerminal)

Configuration files can be saved/archived to a text document. This sequence of steps ensures that a working copy of the configuration files is available for editing or reuse later.

When using HyperTerminal, follow these steps:

1. On the Transfer menu, click Capture Text.

2. Choose the location.

3. Click Start to begin capturing text.

4. Once capture has been started, execute the show running-config or show startup-config command at the privileged EXEC prompt. Text displayed in the terminal window will be placed into the chosen file.

5. After the configurations have been displayed, Stop the capture.

6. View the output to verify that it was not corrupted.
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am

Re: Managing IOS configuration files

Postby lik » Mon Feb 01, 2010 11:09 am

Backup Configurations with Text Capture (TeraTerm)

Configuration files can be saved/archived to a text document using TeraTerm.

As shown in the figure, the steps are:

1. On the File menu, click Log.

2. Choose the location. TeraTerm will begin capturing text.

3. Once capture has been started, execute the show running-config or show startup-config command at the privileged EXEC prompt. Text displayed in the terminal window will be placed into the chosen file.

4. When the capture is complete, select Close in the TeraTerm: Log window.

5. View the output to verify that it was not corrupted.

Restoring Text Configurations

A configuration file can be copied from storage to a device. When copied into the terminal, the IOS executes each line of the configuration text as a command. This means that the file will require editing to ensure that encrypted passwords are in plain text and that non-command text such as "--More--" and IOS messages are removed. This process is discussed in the lab.

Further, at the CLI, the device must be set at the global configuration mode to receive the commands from the text file being copied.

When using HyperTerminal, the steps are:

1. Locate the file to be copied into the device and open the text document.

2. Copy all of the text.

3. On the Edit menu, click paste to host.

When using TeraTerm, the steps are:

1. On the File menu, click Send file.

2. Locate the file to be copied into the device and click Open.

3. TeraTerm will paste the file into the device.

The text in the file will be applied as commands in the CLI and become the running configuration on the device. This is a convenient method for manually configuring a router.
lik
Founder
Founder
 
Posts: 497
Joined: Wed Dec 15, 2010 3:21 am


Return to Cisco tips

 


  • Related topics
    Replies
    Views
    Last post
cron