H3C WX3000 Series Unified Switches Switching Engine Configuration Guide-6W103

HomeSupportWirelessH3C WX3000 Series Unified SwitchesConfigure & DeployConfiguration GuidesH3C WX3000 Series Unified Switches Switching Engine Configuration Guide-6W103
03-Configuration File Management Configuration

 

The sample output information in this manual was created on the WX3024. The output information on your device may vary.

 

Introduction to Configuration File

A configuration file records and stores user configurations performed to the device. It also enables users to check device configurations easily.

Types of configuration

The configuration of a device falls into two types:

l          Saved configuration, a configuration file used for initialization. If this file does not exist, the device starts up without loading any configuration file.

l          Current configuration, which refers to the user’s configuration during the operation of a device. This configuration is stored in dynamic random-access memory (DRAM). It is removed when rebooting.

Format of configuration file

Configuration files are saved as text files for ease of reading. They:

l          Save configuration in the form of commands.

l          Save only non-default configuration settings.

l          The commands are grouped into sections by command view. The commands that are of the same command view are grouped into one section. Sections are separated by comment lines. (A line is a comment line if it starts with the character “#”.)

l          The sections are listed in this order: system configuration section, logical interface configuration section, physical port configuration section, routing protocol configuration section, user interface configuration, and so on.

l          End with a return.

The operating interface provided by the configuration file management function is user-friendly. With it, you can easily manage your configuration files.

Main/backup attribute of the configuration file

Main and backup indicate the main and backup attribute of the configuration file respectively. A main configuration file and a backup configuration file can coexist on the device. As such, when the main configuration file is missing or damaged, the backup file can be used instead. This increases the safety and reliability of the file system compared with the device that only support one configuration file. You can configure a file to have both main and backup attribute, but only one file of either main or backup attribute is allowed on a device.

The following three situations are concerned with the main/backup attributes:

l          When saving the current configuration, you can specify the file to be a main or backup or normal configuration file.

l          When removing a configuration file from a device, you can specify to remove the main or backup configuration file. Or, if it is a file having both main and backup attribute, you can specify to erase the main or backup attribute of the file.

l          When setting the configuration file for next startup, you can specify to use the main or backup configuration file.

Startup with the configuration file

When booting, the system chooses the configuration files following the rules below:

1)        If the main configuration file exists, the device initializes with this configuration.

2)        If the main configuration file does not exist but the backup configuration file exists, the device initializes with the backup configuration.

3)        If neither the main nor the backup configuration file exists, the device starts up without loading the configuration file.

Management of Configuration File

Complete the following tasks to configure configuration file management:

Task

Remarks

Saving the Current Configuration

Optional

Erasing the Startup Configuration File

Optional

Specifying a Configuration File for Next Startup

Optional

 

Saving the Current Configuration

You can modify the configuration on your device at the command line interface (CLI). To use the modified configuration for your subsequent startups, you must save it (using the save command) as a configuration file.

Follow these steps to save current configuration:

To do…

Use the command…

Remarks

Save current configuration

save [ cfgfile | [ safely ] [ backup | main ] ]

Required

Available in any view

 

Modes in saving the configuration

l          Fast saving mode. This is the mode when you use the save command without the safely keyword. The mode saves the file quicker but is likely to lose the original configuration file if the device reboots or the power fails during the process.

l          Safe mode. This is the mode when you use the save command with the safely keyword. The mode saves the file slower but can retain the original configuration file in the device even if the device reboots or the power fails during the process.

 

The configuration file to be used for next startup may be lost if the device reboots or the power fails during the configuration file saving process. In this case, the device reboots without loading any configuration file. After the device reboots, you need to specify a configuration file for the next startup. Refer to Specifying a Configuration File for Next Startup for details.

 

Three attributes of the configuration file

l          Main attribute. When you use the save [ [ safely ] [ main ] ] command to save the current configuration, the configuration file you get has main attribute. If this configuration file already exists and has backup attribute, the file will have both main and backup attributes after execution of this command. If the filename you entered is different from that existing in the system, this command will erase its main attribute to allow only one main attribute configuration file in the device.

l          Backup attribute. When you use the save [ safely ] backup command to save the current configuration, the configuration file you get has backup attribute. If this configuration file already exists and has main attribute, the file will have both main and backup attributes after execution of this command. If the filename you entered is different from that existing in the system, this command will erase its backup attribute to allow only one backup attribute configuration file in the device.

l          Normal attribute. When you use the save cfgfile command to save the current configuration, the configuration file you get has normal attribute if it is not an existing file. Otherwise, the attribute is dependent on the original attribute of the file.

 

l          It is recommended to adopt the fast saving mode in the conditions of stable power and adopt the safe mode in the conditions of unstable power or remote maintenance.

l          The extension name of the configuration file must be .cfg.

 

Erasing the Startup Configuration File

You can clear the configuration files saved on the device through commands. After you clear the configuration files, the device starts up without loading the configuration file the next time it is started up.

Follow these steps to erase the configuration file:

To do…

Use the command…

Remarks

Erase the startup configuration file from the storage device

reset saved-configuration [ backup | main ]

Required

Available in user view

 

You may need to erase the configuration file for one of these reasons:

l          After you upgrade software, the old configuration file does not match the new software.

l          The startup configuration file is corrupted or not the one you needed.

The following two situations exist:

l          While the reset saved-configuration [ main ] command erases the configuration file with main attribute, it only erases the main attribute of a configuration file having both main and backup attribute.

l          While the reset saved-configuration backup command erases the configuration file with backup attribute, it only erases the backup attribute of a configuration file having both main and backup attribute.

 

This command will permanently delete the configuration file from the device.

 

Specifying a Configuration File for Next Startup

Follow the step below to specify a configuration file for next startup:

To do…

Use the command…

Remarks

Specify a configuration file for next startup

startup saved-configuration cfgfile [ backup | main ]

Required

Available in user view

 

You can specify a configuration file to be used for the next startup and configure the main/backup attribute for the configuration file.

Assign main attribute to the startup configuration file

l          If you save the current configuration to the main configuration file, the system will automatically set the file as the main startup configuration file.

l          You can also use the startup saved-configuration cfgfile [ main ] command to set the file as main startup configuration file.

Assign backup attribute to the startup configuration file

l          If you save the current configuration to the backup configuration file, the system will automatically set the file as the backup startup configuration file.

l          You can also use the startup saved-configuration cfgfile backup command to set the file as backup startup configuration file.

 

The configuration file must use “.cfg” as its extension name and the startup configuration file must be saved at the root directory of the device.

 

Displaying and Maintaining Device Configuration

To do…

Use the command…

Remarks

Display the initial configuration file saved in the storage device

display saved-configuration [ unit unit-id ] [ by-linenum ]

Available in any view

Display the configuration file used for this and next startup

display startup [ unit unit-id ]

Display the current VLAN configuration of the device

display current-configuration vlan [ vlan-id ] [ by-linenum ]

Display the validated configuration in current view

display this [ by-linenum ]

Display current configuration

display current-configuration [ configuration [ configuration-type ] | interface [ interface-type ] [ interface-number ] ] [ by-linenum ] [ | { begin | include | exclude } regular-expression ]

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网