H3C S3100 Series Ethernet Switches Operation Manual (For Soliton)(V1.02)

HomeSupportSwitchesH3C S3100 Switch SeriesConfigure & DeployConfiguration GuidesH3C S3100 Series Ethernet Switches Operation Manual (For Soliton)(V1.02)
03-Configuration File Management Operation
Title Size Download
03-Configuration File Management Operation 51.65 KB

Chapter 1  Configuration File Management

1.1  Introduction to Configuration File

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

I. 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.

II. 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.

III. 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.

IV. 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:

l           If the default configuration file config.def exists, the switch initializes with the default configuration file;

l           If the default configuration file does not exist, the switch starts up without loading the configuration file.

1.2  Management of Configuration File

Table 1-1 Complete these 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

 

1.2.1  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.

Table 1-2 Save current configuration

Operation

Command

Description

Save current configuration

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

Required

Available in any view

 

I. 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.

 

  Caution:

S3100 series Ethernet switches do not support the safe mode. When you are saving a configuration file using the save safely command, if the device reboots or the power fails during the saving process, the configuration file will be lost.

 

II. 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.

 

&  Note:

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

 

1.2.2  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.

Table 1-3 Erase the configuration file

Operation

Command

Description

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.

 

  Caution:

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

 

1.2.3  Specifying a Configuration File for Next Startup

Table 1-4 Specify a configuration file for next startup

Operation

Command

Description

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.

I. 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.

II. 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.

 

  Caution:

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.

 

1.2.4  Displaying Device Configuration

After the above configuration, you can execute the display command in any view to display the current and initial configurations of the device, so as to verify your configuration.

Table 1-5 Display Device Configuration

Operation

Command

Description

Display the initial configuration file saved in the storage device

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

You can execute the display command 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 | exclude | include } 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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网