01-Fundamentals Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C WA Series Access Points Configuration Guides(R1507P09)-6W10101-Fundamentals Configuration Guide
05-Configuration File Management Configuration
Title Size Download
05-Configuration File Management Configuration 102.14 KB

Managing configuration files

Overview

You can use the CLI or the Boot ROM to manage configuration files. This chapter explains how to manage configuration files from the CLI.

A configuration file saves configurations as a set of text commands. You can save the running configuration to a configuration file so the configuration takes effect after you reboot the device. You can also back up the configuration file on to a host and download the file to the device as needed.

Configuration types

The device has the following types of configurations: startup configuration and running configuration.

Startup configuration

The device uses startup configuration to configure software features during startup. After the device starts up, you can specify a different configuration file to be loaded at the next startup. This configuration file is called the next-startup configuration file. The configuration file that has been loaded is called the current startup configuration file.

You can view the current startup configuration in either of the following ways:

·          Execute the display startup command. To view detailed file contents, use the more command.

·          After the device reboots, execute the display current-configuration command before making any configuration.

Running configuration

Running configuration is stored in a volatile storage medium and takes effect while the device is operating. It includes startup settings that have not been changed and new settings you have made.

A new setting takes effect immediately after it is made but must be saved to a configuration file to survive a reboot.

To view the running configuration, use the display current-configuration command.

Configuration file content organization and format

 

IMPORTANT:

To run on the device, a configuration file must meet the content and format requirements of the device. To avoid any configuration loading problem at startup, use a configuration file created on the device. If you edit the configuration file, make sure all edits are compliant with the requirements of the device.

 

A configuration file must meet the following requirements:

·          All commands are saved in their complete form.

·          Commands are sorted by different views, including system view, interface view, protocol views, and user interface view.

·          Sections are separated with one or more blank lines or comment lines that start with a pound sign (#).

·          The configuration file ends with the word return.

You can execute the save command to save the running configuration to a configuration file. To make sure that the configuration file can run normally, H3C recommends that you not edit the content and format of the configuration file.

Next-startup configuration file redundancy

You can specify one main next-startup configuration file and one backup next-startup configuration file for redundancy. If a configuration file is not assigned the main or backup attribute, its file attribute is NULL.

At startup, the device tries to start up with the main configuration file. If the main configuration file is corrupted or unavailable, the device tries the backup configuration file. If the backup configuration file is corrupted or unavailable, the device starts up with the factory defaults.

You can specify a main or backup next-startup configuration file directly (see "Specifying a configuration file for the next startup") or when saving the running configuration (see "Saving configuration in different ways").

For reliability, do not specify a configuration file as both the main and backup configuration files.

Startup with a configuration file

The device selects the configuration file to load at startup, as follows:

1.        If the specified main startup configuration file exists, the device starts up with this configuration file.

2.        If the specified main startup configuration file does not exist but the backup startup configuration file exists, the device starts up with the backup startup configuration file.

3.        If neither the main nor the backup startup configuration file exists, the device starts up with the factory defaults.

Hardware and storage medium compatibility

The following matrix shows the supported storage medium types:

 

Hardware series

Model

Storage medium types

WA4300 series

WA4320-ACN

Flash

WA4320H-ACN

Flash

WA4320i-ACN

Flash

WA4320-ACN-PI

Flash

WA4600 series

WA4620i-ACN/WA4620E-ACN

Flash

 

Saving configuration in different ways

When saving the running configuration to a configuration file, you can specify the file as the next-startup configuration file or not.

If you are specifying the file as the next-startup configuration file, use one of the following methods to save the configuration:

·          Fast mode—Use the save command without the safely keyword. In this mode, the device directly overwrites the target next-startup configuration file. If a reboot or power failure occurs during this process, the next-startup configuration file is lost. You must re-specify a new startup configuration file after the device reboots (see "Specifying a configuration file for the next startup").

·          Safe mode—Use the save command with the safely keyword. Safe mode is slower than fast mode, but more secure. In safe mode, the system saves configuration in a temporary file and starts overwriting the target next-startup configuration file after the save operation is complete. If a reboot or power failure occurs during the save operation, the next-startup configuration file is still retained.

Use the safe mode if the power source is not reliable or you are remotely configuring the device.

The configuration file extension must be .cfg.

To save the running configuration, perform either of the following tasks in any view:

 

Task

Command

Remarks

Save the running configuration to a configuration file without specifying the file as the next-startup configuration file.

save file-url

N/A

Save the running configuration to a configuration file and specify the file as the next-startup configuration file.

save [ safely ] [ backup | main ] [ force ]

This command saves the configuration to a file on the default storage medium.

If you execute the save [ safely ] command without specifying any other keyword, the command saves the configuration to the main startup configuration file.

If the force keyword is specified, the command saves the configuration to the next-startup configuration file that has been specified.

If the force keyword is not specified, you may choose to re-specify a next-startup configuration file as instructed by the system.

 

Configuring configuration rollback

To replace the running configuration with the configuration in a configuration file without rebooting the device, use the configuration rollback function. This function helps you revert to a previous configuration state or adapt the running configuration to different network environments.

The configuration rollback function compares the running configuration against the specified replacement configuration file and handles configuration differences as follows:

·          If a command in the running configuration is not in the replacement file, executes its undo form.

·          If a command in the replacement file is not in the running configuration, adds it to the running configuration.

·          If a command has different settings in the running configuration and the configuration file, replaces its running configuration with the setting in the configuration file.

To facilitate configuration rollback, the configuration archive function is developed. This function enables the system to automatically save the running configuration at regular intervals as checkpoint references.

Configuration task list

 

Task

Remarks

Configuring configuration archive parameters

Required.

·         Enabling automatic configuration

·         Manually archiving running configuration

Required.

Perform either task.

Performing configuration rollback

Required.

 

Configuring configuration archive parameters

Before archiving the running configuration, either manually or automatically, you must configure a file directory and file name prefix for configuration archives.

Configuration archives are saved with the file name format prefix_serial number.cfg, for example, 20080620archive_1.cfg and 20080620archive_2.cfg. The serial number is automatically assigned from 1 to 1000, increasing by 1. After the serial number reaches 1000, it restarts from 1.

After you change the file directory or file name prefix, or reboot the device, the old configuration archives are regarded as common configuration files, the configuration archive counter resets, and the display archive configuration command does not display them. The serial number for new configuration archives starts from 1.

After the maximum number of configuration archives is reached, the system deletes the oldest archive for the new archive.

To configure configuration archive parameters:

 

Step

Command

Remarks

1.       Create the configuration archive directory.

See "Managing the file system"

N/A

2.       Enter system view.

system-view

N/A

3.       Configure the directory and file name prefix for archiving the running configuration.

archive configuration location directory filename-prefix filename-prefix

By default, no path or file name prefix is set for configuration archives, and the system does not regularly save configuration.

* IMPORTANT:

The undo form of this command disables both manual and automatic configuration archiving, restores the default settings for the archive configuration interval and archive configuration max commands, and deletes all saved configuration archives.

4.       Set the maximum number of configuration archives.

archive configuration max file-number

Optional.

The default number is 5.

Change the setting depending on the available amount of storage device.

 

Enabling automatic configuration archiving

Make sure you have set an archive path and file name prefix before performing this task.

To enable automatic configuration archiving:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

2.       Enable automatic configuration archiving and set the archiving interval.

archive configuration interval minutes

By default, this function is disabled.

To view configuration archive names and their archiving time, use the display archive configuration command.

 

Manually archiving running configuration

To save system resources, disable automatic configuration archiving and manually archive configuration if the configuration will not be changed very often. You can also manually archive configuration before performing complicated configuration tasks so you can use the archive for configuration recovery after the configuration attempt fails.

Make sure you have set an archive path and file name prefix before performing this task.

Perform the following task in user view:

 

Task

Command

Manually archive the running configuration.

archive configuration

 

Performing configuration rollback

To avoid rollback failure, follow these guidelines:

·          Make sure the replacement configuration file is created by using the configuration archive function or the save command on the current device.

·          If the configuration file is not created on the current device, make sure the configuration file content format is fully compatible with the current device.

·          The replacement configuration file is not encrypted.

To perform a configuration rollback:

 

Step

Command

1.       Enter system view.

system-view

2.       Perform configuration rollback.

configuration replace file filename

 

The configuration rollback function might fail to reconfigure some commands in the running configuration for one of the following reasons:

·          A command cannot be undone, because prefixing the undo keyword to the command does not result in a valid undo command. For example, if the undo form designed for the A [B] C command is undo A C, the configuration rollback function cannot undo the A B C command, because the system does not recognize the undo A B C command.

·          A command (for example, a hardware-dependent command) cannot be deleted, overwritten, or undone due to system restrictions.

·          The commands in different views are dependent on each other.

·          Commands or command settings that the device does not support cannot be added to the running configuration.

Specifying a configuration file for the next startup

You can specify a .cfg configuration file as the main startup configuration file to be used at the next startup when you use the save command to save the running configuration to it.

Alternatively, perform the following task in user view to specify the next-startup configuration file:

 

Task

Command

Remarks

Specify the next-startup configuration file.

startup saved-configuration cfgfile [ backup | main ]

The configuration file must use the .cfg extension and be saved in the root directory of the default storage medium.

 

Backing up the next-startup configuration file to a TFTP server

Before performing this task, make sure the server is reachable and enabled with TFTP service, and you have read and write permissions.

This task backs up only the main next-startup configuration file.

To back up the next-startup configuration file to a TFTP server:

 

Step

Command

Remarks

1.       Verify that a next-startup configuration file has been specified in user view.

display startup

Optional.

If no next-startup configuration file has been specified, the back operation will fail.

2.       Back up the next-startup configuration file to a TFTP server in user view.

backup startup-configuration to dest-addr [dest- filename ]

N/A

 

Restoring the next-startup configuration file from a TFTP server

To download a configuration file from a TFTP server to the device and specify the file as the next-startup configuration file, perform the task in this section.

This task restores only the main next-startup configuration file.

Before restoring the next-startup configuration file, make sure the server is reachable, the server is enabled with TFTP service, and you have read and write permissions.

To restore the next-startup configuration file from a TFTP server:

 

Step

Command

Remarks

1.       Restore the main next-startup configuration file from a TFTP server in user view.

restore startup-configuration from src-addr src-filename

N/A

2.       Verify that the specified configuration file has been set as the main next-startup configuration file.

display startup

Optional.

 

Deleting the next-startup configuration file

 

CAUTION

CAUTION:

This task permanently deletes the next-startup configuration file from the device. Before performing this task, back up the file as needed.

 

Delete a next-startup configuration file if one of the following events occurs:

·          After you upgrade system software, the file no longer matches the new system software.

·          The file is corrupt or not fully compatible with the device.

If both the main and backup next-startup configuration files are deleted, the device uses factory defaults at the next startup.

To delete a file that is set as both main and backup next-startup configuration files, you must execute both the reset saved-configuration backup command and the reset saved-configuration main command. Using only one of the commands removes the specified file attribute instead of deleting the file.

For example, if the reset saved-configuration backup command is executed, the backup next-startup configuration file setting is set to NULL. However, the file is still used as the main file. To delete the file, you must also execute the reset saved-configuration main command.

Perform the following task in user view:

 

Task

Command

Delete the next-startup configuration file.

reset saved-configuration [ backup | main ]

 

Displaying and maintaining a configuration file

 

Task

Command

Remarks

Display information about configuration rollback.

display archive configuration [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display the running configuration.

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

Available in any view.

Display the next-startup configuration file.

display saved-configuration [ by-linenum ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display names of the configuration files used at this startup and the next startup.

display startup [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display the valid configuration in the current view.

display this [ by-linenum ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

 

  • 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
新华三官网