- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
05-Configuration File Management Configuration | 85.47 KB |
Contents
Format and content of a configuration file
Coexistence of multiple configuration files
Startup with the configuration file
Saving the running configuration
Specifying a startup configuration file for the next system startup
Backing up the startup configuration file
Deleting a startup configuration file to be used at the next startup
Restoring a startup configuration file
Displaying and maintaining a configuration file
The device provides the configuration file management function. You can manage configuration files at the CLI.
This chapter includes these sections:
· Saving the running configuration
· Specifying a startup configuration file for the next system startup
· Backing up the startup configuration file
· Deleting a startup configuration file to be used at the next startup
· Restoring a startup configuration file
· Displaying and maintaining a configuration file
|
NOTE: · The term "switch" or "device" in this chapter refers to the switching engine on a WX3000E wireless switch. · The WX3000E series comprises WX3024E and WX3010E wireless switches. · The port numbers in this chapter are for illustration only. |
Configuration file overview
A configuration file saves the device configurations as a set of text commands. You can save the current configuration to a configuration file so that the configuration takes effect after you reboot the device. In addition, you can view the configuration information conveniently, or upload or download the configuration file to or from another device.
Types of configuration
The device maintains the following types of configurations: factory defaults, startup configuration, and running configuration.
Factory defaults
Devices are shipped with some basic settings, which are called factory defaults. These default settings ensure that a device can start up and run normally when it has no configuration file or the configuration file is damaged.
To view the factory defaults of the device, you can use the display default-configuration command.
Startup configuration
Use startup configuration for initialization when the device boots. If this file does not exist, the system boots using the factory defaults.
You can view the startup configuration in either of the following ways:
· Use the display startup command to view the currently using startup configuration file, and use the more command to view the content of the configuration file.
· After the reboot of the device and before configuring the device, use the display current-configuration command to view the startup configuration.
Running configuration
The currently running configuration may include the startup configuration if the startup configuration is not modified during system operation. It also includes any new configurations performed by users during device operation.
The running configuration is stored in a temporary storage media of the device. You must save a setting you have made so it can survive a reboot.
You can use the display current-configuration command to view the current configuration.
Format and content of a configuration file
A configuration file is saved as a text file according to these rules:
· A configuration file contains commands.
· Only non-default configuration settings are saved.
· The commands are listed in sections by views, usually in this order: system view, interface view, routing protocol view, and user interface view.
· Sections are separated with one or more blank lines or comment lines that start with a pound sign #.
· A configuration file ends with a return.
Coexistence of multiple configuration files
The device can save multiple configuration files on its storage media. You can save the configurations used in different networking environments as different configuration files. When the device moves between networking environments, specify the configuration file as the startup configuration file to be used at the next startup of the device and then restart the device. Multiple configuration files allow the device adapt to the network rapidly, saving the configuration workload.
A device starts up using only one configuration file. However, you can specify two startup configuration files, main startup configuration file and backup startup configuration file to be used at the next startup of the device as needed when the device has main and backup configuration files. The device starts up using the main startup configuration file. If the main startup configuration file is corrupted or lost, the devices starts up using the backup startup configuration file. Devices supporting main and backup startup configuration files are more secure and reliable.
At a moment, there are at most one main startup configuration file and one backup startup configuration file. You can specify neither of the two files (displayed as NULL).
You can specify main and backup startup configuration files to be used at the next startup of the device in two methods:
· Specify them when saving the running configuration. For more information, see “Saving the running configuration.”
· Specify them when specifying the startup configuration file to be used at the next system startup. For more information, see “Specifying a startup configuration file for the next system startup.”
Startup with the configuration file
The device takes the following steps when it starts up:
1. If you have specified a startup configuration file to be used at the next startup, and this file exists, the device starts up with this startup configuration file.
2. If the specified startup configuration file does not exist, the device starts up with null configuration.
Saving the running configuration
To make configuration changes take effect at the next startup of the device, you can save the running configuration to the startup configuration file to be used at the next startup before the device reboots.
Complete these tasks to save the current configuration:
· Fast saving: In this mode, you use the save command without the safely keyword. The file is saved more quickly but is likely to be lost if the device reboots or the power fails during the process.
· Safe: In this mode, you use the save command with the safely keyword. The file is saved slowly, but the system retains the configuration file even if the device reboots or the power fails during the process.
The fast saving mode is suitable for environments where the power supply is stable. The safe mode is preferred in environments where a stable power supply is unavailable or remote maintenance is involved.
Follow the steps below to save the current configuration:
To do… |
Use the command… |
Remarks |
Save the current configuration to the specified file, but the configuration file will not be set as the file for the next startup |
save file-url |
Required Use either command Available in any view. |
Save the current configuration to the root directory of the storage media and specify the file as the startup configuration file that will be used at the next system startup |
save [ safely ] [ backup | main ] [ force ] |
|
NOTE: · The configuration file must have the .cfg extension. · The save [ safely ] and save [ safely ] main commands have the same effect: The system will save the current configuration and specify the configuration file as the main startup configuration file to be used at the next system startup. · During the execution of the save [ backup | main ] command, the startup configuration file to be used at the next system startup may be lost if the device reboots or the power supply fails. In this case, the device will boot with the factory defaults, and after the device reboots, you will need to re-specify a startup configuration file for the next system startup (see “Specifying a startup configuration file for the next system startup”). |
Specifying a startup configuration file for the next system startup
To specify a startup configuration file to be used at the next system startup, you can:
· Use the save command. If you save the running configuration to the specified configuration file in the interactive mode, the system automatically sets the file as the startup configuration file to be used at the next system startup.
· Use the command dedicated to specify a startup configuration file to be used at the next startup, which is described in the following table:
Follow the step below to specify a startup configuration file to be used at the next startup:
To do… |
Use the command… |
Remarks |
Specify a startup configuration file to be used at the next startup |
startup saved-configuration cfgfile [ backup | main ] |
Required Available in user view |
|
CAUTION: A configuration file must use .cfg as its extension name. The startup configuration file must be saved in the root directory of the storage media. |
Backing up the startup configuration file
The backup function allows you to copy the startup configuration file to be used at the next startup from the device to the TFTP server.
The backup operation backs up the main startup configuration file to the TFTP server.
Follow the step below to back up the startup configuration file to be used at the next startup:
To do… |
Use the command… |
Remarks |
Back up the startup configuration file to be used at the next startup to the specified TFTP server |
backup startup-configuration to dest-addr [dest- filename ] |
Required Available in user view |
|
NOTE: Before the backup operation, perform the following steps: · Ensure that the server is reachable and enabled with TFTP service, and the client has the read and write permission. · Use the display startup command (in user view) to check whether you have specified a startup configuration file to be used at the next startup. If the file is set as NULL or does not exist, the backup operation fails. |
Deleting a startup configuration file to be used at the next startup
You can delete the main, the backup, or both. If the main and backup next-startup configuration files are the same file, the system sets the attribute of the configuration file to NULL instead of deleting the file. You can permanently delete the file after its attribute changes to NULL.
You may need to delete a startup configuration file to be used at the next startup for one of the following reasons:
· After you upgrade system software, the existing startup configuration files do not match the new system software.
· Startup configuration files are corrupted, which is often caused by loading an incorrect configuration file.
With startup configuration files deleted, the device uses the factory defaults at the next startup.
Follow the step below to delete a startup configuration file to be used at the next startup:
To do… |
Use the command… |
Remarks |
Delete a startup configuration file to be used at the next startup from the storage media |
reset saved-configuration [ backup | main ] |
Required Available in user view |
|
CAUTION: This command permanently deletes startup configuration files to be used at the next startup from the device. Use it with caution. |
Restoring a startup configuration file
The restore function allows you to copy a configuration file from a TFTP server to the device and specify the file as the startup configuration file to be used at the next startup.
Follow the step below to restore a startup configuration file to be used at the next startup:
To do… |
Use the command… |
Remarks |
Restore a startup configuration file to be used at the next startup |
restore startup-configuration from src-addr src-filename |
Required Available in user view |
|
NOTE: · The restore function restores the main startup configuration file. · Before restoring a configuration file, ensure that the server is reachable, the server is enabled with TFTP service, and the client has read and write permission. · After execution of the command, use the display startup command (in user view) to verify that the filename of the configuration file to be used at the next system startup is the same with that specified by the filename argument. |
Displaying and maintaining a configuration file
To do… |
Use the command… |
Remarks |
Display the current configuration of the device |
display current-configuration [ configuration [ configuration ] | interface [ interface-type [ interface-number ] ] ] [ by-linenum ] [ | { begin | exclude | include } regular-expression ] |
Available in any view |
Display the factory defaults of the device |
display default-configuration [ | { begin | exclude | include } regular-expression ] |
Available in any view |
Display the next-startup configuration file saved on the storage media of the device |
display saved-configuration [ by-linenum ] [ | { begin | exclude | include } regular-expression ] |
Available in any view |
Display the configuration files used at this and the next system startup |
display startup [ | { begin | exclude | include } regular-expression ] |
Available in any view |
Display the valid configuration under the current view |
display this [ by-linenum ] [ | { begin | exclude | include } regular-expression ] |
Available in any view |