A persistent copy of Cisco Router configuration file is called as "startup-config" file. The "startup-config" file is kept in NVRAM and the contents of the "startup-config" file are retained after a reboot. To save the changes of "running-config" file to "startup-config", run the following IOS command. Specifying the VRF in the copy command is easier and more efficient because you can directly change the source interface without having the need to change the configuration via a change request.
The following example shows how to copy files through a VRF, using the copy command:. To maintain a configuration file that exceeds size of NVRAM, you should be aware of the information in the following sections:. The service compress-config global configuration command specifies that the configuration file be stored compressed in NVRAM. Once the configuration file has been compressed, the router functions normally.
When the system is booted, it recognizes that the configuration file is compressed, expands it, and proceeds normally. The more nvram:startup-config EXEC command expands the configuration before displaying it.
Before you compress configuration files, refer to the appropriate hardware installation and maintenance publication. If not, you can install new ROMs that support file compression. If the boot ROMs do not recognize a compressed configuration, the following message is displayed:. The Parser Cache feature was developed to rapidly process large configuration files, thereby dramatically improving load time. This improvement is useful primarily for configuration files that repeat similar commands hundreds or thousands of times, such as cases in which thousands of virtual circuits must be configured for subinterfaces, or hundreds of access lists must be configured.
Performance will improve the most for those files in which the same commands are used repeatedly but the numerical arguments change from command to command.
However, users with Cisco devices that do not require large configuration files may want to disable the Parser Cache to free the resources used by this feature. Memory used by this feature depends on the size of the configuration files parsed, but is generally less than KB. To disable the Parser Cache feature, use the no parser cache command in global configuration mode.
When the parser cache is disabled, the no parser cache command line is written to the running configuration file. If you wish to disable the parser cache to free system resources, you should clear the parser cache before issuing the no parser cache command. You will not be able to clear the parser cache after disabling it. Reenabling the Parser Cache--To reenable the Parser Cache feature after disabling it, use the parser cache command in global configuration mode.
You can configure the router to load one or two configuration files at system startup. The configuration files are loaded into memory and read in as if you were typing the commands at the command line.
Thus, the configuration for the router will be a mixture of the original startup configuration and the one or two downloaded configuration files. For historical reasons, the first file the router downloads is called the network configuration file. The second file the router downloads is called the host configuration file.
Two configuration files can be used when all of the routers on a network use many of the same commands. The network configuration file contains the standard commands used to configure all of the routers.
The host configuration files contain the commands specific to one particular host. If you are loading two configuration files, the host configuration file should be the configuration file you want to have precedence over the other file. Log into the switch through the console port or through a Telnet or SSH session.
Cisco IOS is a monolithic OS which means it runs as a single operation with all processes sharing the same memory space. The operating system on home routers is usually called firmware.
The most common method for configuring a home router is using a web browser to access an easy to use GUI. Home » Apple. Like this post? EPROM is not suitable for routers because it generally requires an external device such as an ultraviolet light shone through a window on the chip to erase it. In Recipe 1. There are at least two main pieces of non-volatile storage in a Cisco router. The flash device, on the other hand, is usually upgradeable, and can be anywhere from a few megabytes to hundreds of megabytes.
There is the configuration file that describes the current running state of the router, which is called the running-config. Then, there is the configuration file that the router uses to boot, which is called the startup-config.
Only the startup-config is stored in NVRAM, so it is important to periodically check that the version of the configuration in the NVRAM is synchronized with the version that the router is currently running. Otherwise you could get a surprise from ancient history the next time the router reboots.
You can synchronize the two configuration files by simply copying the running-config onto the startup-config file:. Many Cisco engineers, including the authors, still use the old-fashioned version of this command out of force of habit:. The router uses the larger flash storage device for holding the operating system, or IOS. Unlike the operating systems on most computers, the IOS is a single file containing all of the features and functions available on the router.
Most of the examples throughout this book assume that you have IOS Version However, many of the features we discuss are also available in earlier versions. Although there may be slight syntax changes, we expect that Cisco will continue to support all of the features we describe well into the future. It is important to be flexible because if you work with Cisco routers a lot, you will encounter a large variety of different IOS versions, with various subtle differences.
Unfortunately, some of these subtle differences are actually bugs. Cisco offers a detailed bug tracking system on their web site for registered users. There are several important things to consider when you go to change the IOS version on a router. First is the feature set.
For each IOS release, Cisco produces several different versions. They usually offer an Enterprise Feature Set, which includes all of the different feature options available at a given time.
The Enterprise version is generally much more expensive than the various stripped-down versions. The contents of these different versions and even their names to some extent vary from release to release. One of the most important considerations with any IOS release is whether you have sufficient RAM and Flash memory to support the new version. You can see how much storage your router has by looking at the output of the show version command.
The router uses the bootstrap program while booting. Please refer to Recipe 1. Recipe 1. These values set a variety of boot options, and even allow you to force the router to stop its boot process before loading the IOS. This can be useful if the IOS image is corrupted, or if you need to do password recovery.
You can use the copy tftp : command to configure the router via the TFTP:. IOS versions before This command is still available in more recent versions, but it is now deprecated and may not continue to be available in the future. Generally, most people configure their routers using Telnet and the configure terminal command. For large configuration changes, people tend to resort to cutting and pasting a large set of commands. While this method works, it is inefficient and slow, particularly if you have to configure large numbers of routers.
The router copies the entire file via TFTP before entering the commands into the running configuration.
This is extremely useful because using some commands in the middle of a configuration could disrupt your access to the router—but the rest of the commands might fix the problem. If you tried to enter them manually using Telnet and configure terminal , you would simply lock yourself out of the router. A typical example of this problem happens when you replace an active access list.
When you enter the first line, the router puts an implicit deny all at the end, which could break your session. However, entering commands using TFTP avoids this problem. The last line of any configuration file that you copy into the router like this should be the end command.
This lets the router know that it has reached the end of the file. We cannot overstress the importance of making regular backups of your router configuration files, and keeping copies of these files in a safe place. Anybody who has had to reconstruct a complex router configuration file from memory can tell you how difficult and stressful this task is!
But, if you have a backup of the last working configuration file, you can usually get a router working again within minutes of fixing any hardware problems. This sounds like a long time, but in a large network it means that you can expect to see a few failures every year.
Unfortunately, human errors resulting in complete or partial loss of the configuration file are far more common than device failures. In the example, we created an empty backup configuration file on the TFTP server, then instructed the router to send its running configuration to this server. It is important to adjust the file permissions with the Unix chmod command. The transfer will fail if the configuration file is not world writable.
Since router configuration files contain passwords and IP addresses, you should take steps to protect these files as much as possible. In the following example, we are able to access the TFTP server and read a router configuration file from another router:. As you can see, any files left in the TFTP directory can be easily viewed or even deliberately corrupted.
TFTP is notoriously insecure, so we recommend using care whenever you work with this protocol. You want to boot the router using an alternate configuration. The following set of commands allows you to automatically load a configuration file located on a remote TFTP server when the router boots:. By default, when the router reloads, it will read the configuration information from a file in its NVRAM.
Cisco commonly refers to this file as the startup configuration file. However, you can configure the router to load all or part of its configuration from a remote server via TFTP. In fact, the router will load its local startup file before proceeding to the TFTP server files. Uses for this feature vary, although most people who implement it do so because their configuration file has grown too large for their NVRAM to handle.
It can also be a useful way of keeping an access list that is shared by a number of routers centralized and up-to-date. However, we consider this feature to be highly risky and recommend avoiding it in most cases. Also, since routers can operate for years without reloading, using this feature to keep your routers up-to-date seems pointless. If you choose to implement remote configuration despite these cautions, you need to understand how the boot process works.
When you enable the service config option, the router attempts to load a network file, then a host file. The router assumes that network files are common to all routers, while the host file contains router-specific information. Here you can see what happened when we enabled the service config option and reloaded our router, which was called router1.
It attempted to load several different files automatically. The first two files have generic network file names. The router then looks for the host file under two different names. It attempts to load these configuration files from IP address When we add the boot commands, the router looks for the specified files from the appropriate TFTP server.
Again, notice the order that the router loaded the files: the network file first, followed by the host file. If you do not configure the router to load specific network or host filenames, it will try to load the default files, shown in the trace above. When you use this feature, you should always include both a network and a host file to load. This feature loads configuration commands only into the running configuration.
It does not copy them into the startup configuration file. The show version tells you whether the router was able to load these files successfully:. The service config option is disabled by default. However, if the router tries to boot but cannot find its startup configuration file, it will automatically enable this option and attempt to find a configuration file through the network:.
Two interesting things happen if you reload a router with an empty configuration file. In this example, the router obtained a DHCP address of Second, after it obtains a dynamic address, it attempts to load a configuration file via TFTP. Notice the filenames that the router cycles through in an attempt to load a configuration file. If there happens to be a file with one of these names in the TFTP directory, the router will download it and use its contents to configure itself.
This can cause serious problems. The command service compress-config will compress the configuration information when the router saves the file, and uncompress it when it is required:. Cisco generally ships its routers with more than enough NVRAM to store an average configuration file. For instance, some routers contain large access lists that are hundreds of lines in length. The first sign of serious problems with an overly large configuration file is usually when the router refuses to save its configuration because of size.
This is a dangerous situation because the router can no longer keep a copy of the whole running-configuration file in its NVRAM storage, and it is difficult to predict how much of your configuration will be lost if you were to reload the router. Turning on compression roughly doubles the size of the configuration file you can store.
0コメント