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.

Managing configuration files using TFTP

Managing configuration files using TFTP
5.2.3
This page will explain how a TFTP server can be used to back up the configuration files for a Cisco device.
In a Cisco router or switch, the active configuration is in RAM and the default location for the startup configuration is NVRAM. The startup configuration should be backed up in case the configuration is lost. One of these backup copies of the configuration can be stored on a TFTP server. The copy running-config tftp command can be used to do this. The steps for this process are listed below:
  • Enter the command copy running-config tftp.
  • Enter the IP address of the TFTP server to store the configuration file.
  • Enter the name to assign to the configuration file or accept the default name.
  • Type yes to confirm each choice.
The backup configuration file can be loaded from a TFTP server to restore the router configuration. The steps below outline this process:
  • Enter the command copy tftp running-config.
  • Select a host or network configuration file at the prompt.
  • Enter the IP address of the TFTP server where the configuration file is located.
  • Enter the name of the configuration file or accept the default name.
  • Confirm the configuration filename and the server address that the system supplies.
The Lab Activity on this page will teach students how to back up a copy of a router configuration file and load it from a TFTP file server.
The next page will show students how the copy and paste feature can be used to manage configuration files.

The IOS naming convention

The IOS naming convention
5.2.2
This page will introduce the Cisco IOS naming convention. Students will learn why it is used and what each field represents.
There are many different versions of the Cisco IOS. The IOS supports varied hardware platforms and features. New versions of the IOS are continuously developed and released.
To identify the different versions, there is a naming convention for IOS files. This IOS naming convention uses different fields in the name. The fields include the hardware platform identification, the feature set identification, and the numerical release. 
The first part of the Cisco IOS file name identifies the hardware platform for which an image is designed.
The second part of the IOS file name identifies the various features that a file contains. There are many different features to choose from. These features are packaged in software images. Each feature set contains a specific subset of Cisco IOS features. Here are some examples of feature-set categories:
  • Basic - A basic feature set for a hardware platform such as IP and IP/FW
  • Plus - A basic feature set plus additional features such as IP Plus, IP/FW Plus, and Enterprise Plus
  • Encryption - A 56-bit data encryption feature set, such as Plus 56, that is combined with a basic or plus feature set. Examples include IP/ATM PLUS IPSEC 56 or Enterprise Plus 56.
The encryption designators for Cisco IOS Release 12.2 or later are k8 and k9:
k8 - Less than or equal to 64-bit encryption in IOS version 12.2 and later
k9 - Greater than 64-bit encryption in IOS version 12.2 and later
The third part of the file name indicates the file format. It specifies if the IOS is stored in flash in a compressed format and whether the IOS is relocatable. If the flash image is compressed, the IOS must be expanded during boot as it is copied to RAM. A relocatable image is copied from flash into RAM to run. A non-relocatable image is run directly from flash.
The fourth part of the file name identifies the release of the IOS. The numerical version number increases for newer versions of the IOS.
The Interactive Media Activity will help students become familiar with the fields in an IOS image name.
The next page will show students how a TFTP server can be used to manage configuration files.

Managing the Cisco File System / IOS file system overview

Managing the Cisco File System
IOS file system overview
5.2.1
This page will introduce the Cisco IOS File System.
Routers and switches depend on software for their operation. The two types of software required are operating systems and configuration.
The operating system used in almost all Cisco devices is the Cisco IOS. The Cisco IOS is the software that allows the hardware to function as a router or switch. The IOS file is several megabytes.
The software a router or switch uses is referred to as the configuration file or the config. The configuration contains the instructions that define how the device is to route or switch. A network administrator creates a configuration that defines the desired functionality of a Cisco device. The functions that can be specified by the configuration are the IP addresses of the interfaces, routing protocols, and networks to be advertised. The configuration file typically is a few hundred to a few thousand bytes.
Each of the software components is stored in memory as a separate file. These files are also stored in different types of memory. 
The IOS is stored in a memory area called flash. Flash memory provides non-volatile storage of an IOS that can be used as an operating system at startup. The flash allows the IOS to be upgraded or stores multiple IOS files. In many router architectures, the IOS is copied into and run from RAM.
A copy of the configuration file is stored in NVRAM to be used during startup. This is referred to as the startup configuration or startup config. The configuration in RAM is used to operate a router. It is referred to as the running configuration or running config.
Version 12 and later releases of the IOS provide a single interface to all the file systems that a router uses. This is referred to as the Cisco IOS File System (IFS). The IFS provides a single method to perform all the file system management for a router. This includes the flash memory file systems, the network file systems, such as TFTP and FTP, and read or write data, such as NVRAM, the running configuration, and ROM. The IFS uses a common set of prefixes to specify file system devices. 
The IFS uses the URL convention to specify files on network devices and the network. The URL convention identifies the location of the configuration files following the colon as [[[//location]/directory]/filename]. The IFS also supports FTP file transfers.
The Interactive Media Activity will help students become familiar with the IFS configuration files and their locations.
The next page will describe the IOS naming conventions.