Where does the switch configuration file exist?

Source: Internet
Author: User
Tags cisco switch

The switch configuration file is like the registry we use in daily use. If the registry is damaged or the configuration is inaccurate, the operating system cannot be started or run stably, once a problem occurs in the vswitch configuration file, the operation of the vswitch may be unstable.

If the vswitch is used. If an error occurs in the configuration file, the switch and other network devices will not work properly. In this article, I will talk about how to improve the security of configuration files by managing Switch configuration files to eliminate security risks related to configuration files.

I. Location of the configuration file

As shown in, the Cisco switch configuration file is generally stored in three locations, namely RAM (switch memory, which will be lost after power failure) NVRAM (another kind of memory inside the switch, non-volatile random access memory), TFTP server.

These three locations can be used to store the switch configuration files, but their functions are different. Before talking about their specific differences, I think it is necessary for the network administrator, especially the technical staff of the just basic Cisco network equipment, to understand two basic concepts: startup configuration and running configuration.

The STARTUP configuration, as the name implies, is the configuration of the switch during the startup process, that is, the Initialization Configuration. The running configuration is the configuration of the switch during operation. For example, some so-called dynamic parameters can be directly modified during the switch operation. After understanding these two concepts, it is easier to understand the above.

When the switch is started, it reads the switch configuration file from NVRAM (non-volatile random access memory. Use the content specified in this initial configuration file to initialize the vswitch. Note that the configuration files in the RAM memory will be lost after the power-off, so there is no content in RAM before the switch starts.

During the startup process, the switch RAM reads the configuration file from NVRAM, generates a copy of the configuration file in its own RAM, and then uses the content in the copy for initialization. That is to say, before initialization, the switch will first copy the configuration file from NVRAM to its own RAM. Instead of initializing through the configuration file in NVRAM. In this case, we can regard the configuration file in NVRAM as the startup configuration file. The configuration file in RAM is regarded as a running configuration file.

Note that the startup configuration file is generally the same as the running configuration file. However, if you change the vswitch configuration file during startup, the startup configuration file may be different from the running configuration file. In fact, this is similar to the database initialization parameters.

Database parameters include dynamic parameters and static parameters. Dynamic parameters can be changed in the database running status. However, the database design is better than Cisco's IOS design. It can be controlled to change the content in the memory (equivalent to the switch configuration file) when changing the dynamic parameters) or change the content in the memory and the initialization parameter file (equivalent to the startup configuration file of the switch) at the same time ).

When changing some dynamic parameters, a vswitch only saves the changed content to RAM. However, after a power failure, the RAM will be lost after the switch is restarted. That is to say, the IOS system of the switch will use the startup configuration file again to initialize the next time the switch is restarted. However, the last modification is not saved in the startup configuration file, so the last update will be lost. The network administrator may need to reconfigure it. Obviously, this is what the network administrator does not want to see.

II. Key points for managing Configuration Files

To put it simply, to manage the switch configuration file, you must run the copy command in a timely manner at an appropriate time and location. By using the copy command, IOS software can move the configuration file from one component or device to another required component and device.

This command mainly has two parameters. The first parameter indicates the source location of the configuration file, that is, the file to be copied. The second parameter indicates the target location, that is, the location where the configuration file is to be copied. If you use the copy running-config tftp command, you can copy the running configuration file to the TFTP server on the network for configuration.

However, during replication, note that if the target location has the same configuration file, this command overwrites the configuration file with the same name in the target file. However, this sentence is easy, but it is difficult to do it. Specifically, you need to do the following.

First, after changing the running configuration file in RAM, you need to back up the latest running configuration file. This is mainly because the content in the RAM memory will be lost after power failure. If the network administrator wants to make changes to the vswitch during its operation, the change will remain valid at the next startup. You need to save the changed content in the startup configuration file.

To achieve this, run copy running-config startup-config. This command saves the running configuration file to the startup configuration file. In this case, the latest update of the vswitch is saved.

Note that when copying the running configuration file in RAM to NVRAM, you must ensure the accuracy of the current configuration. That is to say, when we modify the parameters related to the running configuration file in RAM, we generally do not rush to copy the relevant content to NVRAM.

Instead, we need to test and track the new parameters to determine whether they meet our expected needs. That is, to determine whether the new parameter has taken effect and whether it meets the user's needs. This update can be saved to the startup configuration file only when the new configuration parameter runs normally.

Otherwise, if this parameter is set incorrectly, problems may occur during the next startup. For the sake of security, it is best to back up the content in NVRAM before copying the running configuration file to NVRAM.

This is mainly because when the copy running-config startup-config command is used, the command will automatically overwrite the startup configuration file at the target location. At this time, if the configuration file is running incorrectly, even the gods will be unable to go back to the sky. For this reason, the author sets up a network administrator. When managing configuration files, be careful and take another step.

For example, before saving the update, back up the original STARTUP configuration file on the tftp server. In this case, even if the latest configuration is incorrect and the network administrator saves it, you can use the backup configuration file to start the switch.

To complete this function, the network administrator can run the copy start tftp Command to save the startup configuration file to the TFTP server ). If there is a problem with the startup configuration file, you can also use the copy tftp start command to copy the backup configuration file to NVRAM so that the switch can use this configuration file for initialization.

  1. Correct Interpretation and test of vswitch Port
  2. Summarize the market status of high-end Switches
  3. Focuses on core layer switch faults
  4. PythonAndroid
  5. Let's talk about the stacking of Ethernet switches.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.