Sunday, May 1, 2011

Managing configuration files using copy and paste

Managing configuration files using copy and paste
5.2.4
This page will explain how HyperTerminal can be used to copy a configuration. The file is then edited and pasted back into the router.
Another way to create a backup copy of the configuration is to capture the output of the show running-config command. To do this from the terminal session, copy the output, paste it into a text file, and then save the text file. This file will need to be edited before it can be used to restore the router configuration.  
Perform the following steps to capture the configuration from a HyperTerminal screen:
  1. Select Transfer.
  2. Select Capture Text.
  3. Specify a name for the text file to capture the configuration.
  4. Select Start to start capturing text.
  5. Use the show running-config command to display the configuration on the screen.
  6. Press the Spacebar when each "-More -" prompt appears.
After the complete configuration has been displayed, use the following steps to stop the capture:
  1. Select Transfer.
  2. Select Capture Text.
  3. Select Stop.
After the capture is complete, the configuration file needs to be edited to remove extra text. Remove any unnecessary information from the captured configuration so it can be pasted back into the router. Comments may also be added to explain the various parts of the configuration. To add a comment, begin a line with an exclamation mark (!).
The configuration file can be edited from a text editor such as Notepad. To edit the file from Notepad click on File > Open. Find the captured file and select it. Click Open.
The lines that need to be deleted contain the following information:
  • show running-config
  • Building configuration...
  • Current configuration:
  • - More -
  • Any lines that appear after the word "End"
Add the no shutdown command to the end of each interface section. Click File > Save to save a clean version of the configuration.
The backup configuration can be restored from a HyperTerminal session. Before the configuration is restored any remaining configuration should be removed from the router. To do this, enter the erase startup-config command at the privileged EXEC prompt and then enter the reload command to restart the router.
HyperTerminal can be used to restore a configuration. Use the following steps to copy a clean backup of the configuration into a router:
  1. Enter router global configuration mode.
  2. Click on Transfer > Send Text File in HyperTerminal.
  3. Select the name of the file for the saved backup configuration.
  4. Watch as the lines of the file are entered into the router.
  5. Observe any errors.
  6. Press Ctrl-Z to exit global configuration mode after the configuration is entered.
  7. Restore the startup configuration with the copy running-config startup-config command.
The next page will explain how TFTP can be used to mange IOS images.

No comments:

Post a Comment