No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 13

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Managing Configuration Files

Managing Configuration Files

You can perform operations such as saving the configuration file and backing up the configuration file.

Pre-configuration Tasks

Before managing configuration files, complete the following task:

  • Logging in to the device.

Configuration Process

Perform one or multiple of the following tasks:

Saving the Configuration File

Context

You can run commands to modify the current configuration of the device, but the modified configuration will be lost after the device restarts. To enable the new configuration to take effect after a restart, save the current configuration in the configuration file before restarting the device. Use either of the following methods to save the current configuration:
  • Configure the automatic save function.
  • Manually save the configuration.

Procedure

  • Save the configurations automatically.

    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      configuration file auto-save [ interval interval | cpu-limit cpu-usage | delay delay-interval ] *

      The system is configured to periodically save the configurations.

      By default, the system periodically saves configurations.

      The system cancels the automatic save operation when:
      • Content is being written into the configuration file.
      • The configurations are being recovered.
      • The CPU usage is excessively high.
    3. (Optional) Run:

      configuration file auto-save backup-to-server server server-ip [ vpn-instance vpn-instance-name ] transport-type { { ftp | sftp } user user-name password password | tftp } [ path folder ]

      The system is configured the server information. The information includes the IP address of the server to which the configuration is automatically saved, user name and password, the path to save the configuration file, and the mode in which the configuration file is transmitted to the server.

    4. Run:

      commit

      The configuration is committed.

  • Save the configurations manually.

    • Run:

      save [ configuration-file ]

      The current configuration is saved.

      The configuration file name extension must be .zip, .dat, or .cfg. The system startup file must be stored in the root directory of the storage device.

      • If the configuration file is a .dat file, the configuration cannot be synchronized to the management module, even if the display config-sync command output indicates a synchronization mode (Configurations are usually synchronized to the management module in this mode). The management module cannot manage .dat configuration files in a centralized manner. Therefore, the .dat file format is not recommended.
      • If you do not specify configuration-file when saving the configuration file for the first time, the system asks you whether to save the configuration file as vrpcfg.zip. The vrpcfg.zip file is the default system configuration file with empty configurations in initial state.
      • If you do not specify configuration-file, configurations are saved to the current startup configuration file. You can run the display startup command to check the name of the current startup configuration file.
      • You can run the pwd (user view) command in the user view to check the current storage directory.
      • You can run the cd (user view) command in the user view to modify the current storage directory.

Comparing Configuration Files

Context

You can compare the current configuration file with the specified configuration file to check whether they are consistent and determine whether to set the specified configuration file as the next startup configuration file.

The configuration file name extension must be .cfg or .zip.

Procedure

  • Run:

    display configuration changes [ running file file-name | file file-name running ]

    The system starts to check whether the current running configurations are identical with the specified configuration file.

  • Run:

    display configuration changes [ running  label label | label label running ]

    The system starts to check whether the current running configurations are identical with the configuration based on a specific user label.

Backing Up the Configuration File

Context

If the device is damaged unexpectedly, the configuration file cannot be recovered. You can back up the configuration file in advance using one of the following methods:

  • Copying the content in the display on the screen
  • Backing up the configuration file to the storage device
  • Backing up the configuration file using FTP, TFTP, SFTP, or SCP
  • Backing up the configuration file in the device storage to the management module
  • Backing up a specified device's configuration file in the management module

Procedure

  • Copying the content in the display on the screen

    Run the display current-configuration command and copy all command outputs to a .txt file. The configuration file is backed up in the hard disk of the maintenance terminal.

    If a configuration is too long, it may be displayed in two lines on the terminal screen, depending on the terminal software. When copying a two-line configuration from the screen to a .txt file, ensure that the configuration is displayed in only one line. Otherwise, configuration restoration may fail when the .txt file is used.

  • Backing up the configuration file to the storage device

    The current configuration file can be backed up immediately to the flash memory of the device. After the device starts, run the following commands to back up the configuration file to the flash memory of the device:

    <HUAWEI> save config.cfg
    <HUAWEI> copy config.cfg backup.cfg

  • Backing up the configuration file using FTP, TFTP, SFTP, or SCP

    The device supports configuration file backup through FTP, TFTP, SFTP, or SCP. Configuration file backup through FTP or TFTP is simple, but there are security risks. In scenarios with high security requirements, configuration file backup through SFTP or SCP is recommended. The following describes the configuration file backup process using FTP as an example. For details about TFTP, SFTP, and SCP, see "File Management" in CX11x&CX31x&CX710&CX91x Series Switch Modules Configuration Guide - Basic Configurations.

    1. Start the FTP service when the device works as the FTP server.

      Enable the FTP server function on the device. Create an FTP user with the name huawei and password Helloworld@6789. The user is authorized to access the flash directory.

      <HUAWEI> system-view
      [~HUAWEI] ftp server enable
      Warning: FTP is not a secure protocol, and it is recommended to use SFTP.
      [*HUAWEI] aaa
      [*HUAWEI-aaa] local-user huawei password irreversible-cipher Helloworld@6789
      [*HUAWEI-aaa] local-user huawei ftp-directory flash:
      [*HUAWEI-aaa] local-user huawei service-type ftp
      [*HUAWEI-aaa] local-user huawei level 15
      [*HUAWEI-aaa] commit

    2. On the maintenance terminal, initiate an FTP connection to the device.

      On the PC, set up an FTP connection to the device through the FTP client. Assume that the device IP address is 10.110.24.254.

      C:\Documents and Setting\Administrator> ftp 10.110.24.254
      Connected to 10.110.24.254.
      220 FTP service ready.
      User (10.110.24.254:(none)): huawei
      331 Password required for huawei.
      Password:
      230 User logged in.

    3. Configure transfer parameters.

      If the FTP user is authenticated, the FTP client displays the prompt character of ftp>. Enter binary following the prompt character, and specify the path where the uploaded file is to be saved on the FTP client.

      ftp> binary
      200 Type set to I.
      ftp> lcd c:\temp
      Local directory now C:\temp.

    4. Transfer the configuration file.

      On the PC, run the get command to load the configuration file to the specified path and save the file as backup.cfg.

      ftp> get flash:/config.cfg backup.cfg

    5. Check whether the config.cfg and backup.cfg files have the same size. If they have the same size, the backup is successful.
  • Backing up the configuration file in the device storage to the management module

    For details, see Exporting the Configuration File (Version of the MM910 Is Earlier Than 3.30) or Exporting the Configuration File (Version of the MM910 Is 3.30 or Later).

  • Backing up a specified device's configuration file in the management module

    For details, see Exporting the Configuration File (Version of the MM910 Is Earlier Than 3.30) or Exporting the Configuration File (Version of the MM910 Is 3.30 or Later).

Recovering the Configuration File

Context

When incorrect configurations are performed and functions are not normal, you can use one of the following methods:

  • Recovering the configuration file that is backed up in the storage device
  • Recovering the configuration file using FTP, TFTP, SFTP, or SCP
  • Recovering the configuration file that is backed up in the management module

After recovering the configuration file, you must restart the device to make the file take effect. Run the startup saved-configuration command to specify the next startup configuration file. If the configuration file name is unchanged, you do not need to run this command. Run the reboot command to restart the device.

Procedure

  • Recovering the configuration file that is backed up in the flash memory

    This step recovers the backup configuration file stored in the flash memory of the device to the current system configuration file. When the device is working properly, run the following command:

    <HUAWEI> copy flash:/backup.cfg flash:/config.cfg

  • Recovering the configuration file using FTP, TFTP, SFTP, or SCP

    The device supports configuration file recovery through FTP, TFTP, SFTP, or SCP. Configuration file recovery through FTP or TFTP is simple, but there are security risks. In scenarios with high security requirements, configuration file recovery through SFTP or SCP is recommended. The following describes how to recover the configuration file that is backed up on a PC through FTP. For details about TFTP, SFTP, and SCP, see "File Management" in CX11x&CX31x&CX710&CX91x Series Switch Modules Configuration Guide - Basic Configurations.

    1. Start the FTP service when the device works as the FTP server.

      Enable the FTP server function on the device. Create an FTP user with the name huawei and password Helloworld@6789. The user is authorized to access the flash directory.

      <HUAWEI> system-view
      [~HUAWEI] ftp server enable
      Warning: FTP is not a secure protocol, and it is recommended to use SFTP.
      [*HUAWEI] aaa
      [*HUAWEI-aaa] local-user huawei password irreversible-cipher Helloworld@6789
      [*HUAWEI-aaa] local-user huawei ftp-directory flash:
      [*HUAWEI-aaa] local-user huawei service-type ftp
      [*HUAWEI-aaa] local-user huawei level 15
      [*HUAWEI-aaa] commit

    2. On the maintenance terminal, initiate an FTP connection to the device.

      On the PC, set up an FTP connection to the device through the FTP client. Assume that the device IP address is 10.110.24.254.

      C:\Documents and Setting\Administrator> ftp 10.110.24.254
      Connected to 10.110.24.254.
      220 FTP service ready.
      User (10.110.24.254:(none)): huawei
      331 Password required for huawei.
      Password:
      230 User logged in.

    3. Configure transfer parameters.

      If the FTP user is authenticated, the FTP client displays the prompt character of ftp>. Enter binary following the prompt character, and specify the path where the uploaded file is to be saved on the FTP client.

      ftp> binary
      200 Type set to I.
      ftp> lcd c:\temp
      Local directory now C:\temp.

    4. Transfer the configuration file.

      On the PC, run the put command to upload the configuration file to the specified path and save the file as backup.cfg.

      ftp> put flash:/config.cfg backup.cfg

    5. Check whether the backup.cfg file is successfully uploaded. If the backup.cfg file exists on the device and has the correct size, the configuration file recovery is successful.
  • Recovering the configuration file that is backed up in the management module

    For details, see Loading the Configuration File (Version of the MM910 Is Earlier Than 3.30) or Loading the Configuration File (Version of the MM910 Is 3.30 or Later).

Clearing the Configuration File

Context

You need to delete the configuration file when:

  • The software and configuration file do not match after the device software is upgraded.
  • The configuration file is damaged or an incorrect configuration file is loaded.

Exercise caution when you run the reset saved-configuration command. You are advised to run this command under the guide of Huawei technical support personnel.

To configure an interface on a device for other use, original configurations on the interface need to be deleted one by one. If the interface has a large number of configurations, deleting these configurations one-by-one takes a long time and increases the maintenance workload. To reduce the maintenance workload and simplify the deletion operation, you can perform one-touch configuration clearance on an interface.

Procedure

  • Run the reset saved-configuration command to cancel the configuration file used for next startup. The default device configurations are restored.

    If the next startup configuration file is empty, the device displays a message indicating that the file does not exist.

  • Delete configurations on an interface at a time to restore the default configurations.

    For details, see Table 1-95.

    Table 1-95 Commands for deleting configurations on an interface at a time to restore the default configurations

    View

    Command

    Description

    Precautions

    System view

    clear configuration interface interface-type interface-number

    Deletes the configuration information on the specified interface or restores the default settings. Make sure that the command is run in the system view and the specified interface type and number are correct. Otherwise, the configuration information on other interfaces may be deleted and services are interrupted.

    Deletes the configuration information on an interface. Therefore, exercise caution when running the two commands.

    This command takes effect immediately in two-stage mode, and you do not need to run the commit command to commit the configuration.

    Interface view

    clear configuration this

    Deletes the configuration information on the current interface or restores the default settings. The command is directly run in the interface view, which simplifies the operation.

  • Clear the inactive configurations of the device that have not been installed.
    1. Run:

      system-view

      The system view is displayed.

    2. Run:

      clear inactive-configuration { slot slot-id | all }

      The non-activated configurations on a specified device that is not installed are cleared.

Rolling Back Configurations

Context

If faults are caused by incorrect configurations or an unexpected configuration result occurs on the network after the configuration is submitted, you can roll back the configuration.

Before you roll back the configuration, the device has used either of two modes to submit the configuration and generated a configuration rollback point.

The modes for the configuration to take effect are as follows:
  • Immediate mode: After you enter the command and press Enter, the system checks whether the current configuration is the same as the historical configuration. If they are different, the system submits the configuration and generates the configuration rollback point. Therefore, multiple configuration rollback points may be generated when one feature is deployed.
  • Two-stage mode: When running a series of configuration commands, you must use the commit [ label label ] [ description description ] command to enable the system to compare the current configuration with the historical configuration and generate a configuration rollback point. In this way, all configurations for a certain service using a series of commands can take effect. To quickly find the required configuration rollback point, specify description description to configure the point description. You are advised to use this mode to edit and submit the configuration.

Procedure

  1. Check the configuration rollback points and the latest configuration changes.

    1. Run:

      display configuration commit list [ verbose ] [ number-of-commits | label ]

      All configuration rollback points and their details are displayed.

      To check one or more configuration rollback points, specify number-of-commits.

    2. Run:

      display configuration commit changes [ at commit-id | since commit-id | last number-of-commits ]

      The configuration change for a specified configuration rollback point is displayed.

      Based on the configuration change, you can determine whether to roll back the configuration and the possible effects on the system.

      • To check the configuration changes at all configuration rollback points, do not specify any parameters in the command.

      • To check the configuration change at a specified configuration rollback point, specify at commit-id.

      • To check the configuration change from a specified configuration rollback point to the current state, specify since commit-id.

      • To check one or multiple of the latest configuration changes, specify last number-of-commits.

  2. Roll back the configuration based on the required historical configuration state.

    1. Run:

      return

      Return to the user view to ensure that all data has been submitted before rollback.

    2. Run:

      rollback configuration { to { commit-id commit-id | label label | file file-name } | last number-of-commits }

      The system is rolled back to the historical configuration state based on the specified configuration rollback point , a user label for a configuration rollback point, a configuration file for configuration rollback, or the number of configuration changes.

      Based on the configured rollback rule, run this command to delete the created configuration, re-create the deleted configuration, or recover the quondam configuration.

      • To roll back the system to the historical configuration state at a certain configuration rollback point, specify commit-id commit-id.

      • To roll back the system to the historical configuration state at a user label for a configuration rollback point, specify label label.

      • To roll back the system to the historical configuration state at a configuration file for configuration rollback, specify file file-name.

      • To roll back the system to the historical configuration state before one or more latest configuration rollback points, specify last number-of-commits.

      After the configuration rollback operation is complete, you can run the display configuration rollback result command to view the result of the latest configuration rollback operation.

  3. (Optional) Run:

    set configuration commit commit-id label label-string

    A label is set for a configuration rollback point.

  4. (Optional) Run:

    clear configuration commit { commit-id label | oldest number-of-commits }

    The earliest configuration rollback points are deleted.

Checking the Configuration

  • Run the display configuration commit list [ verbose ] [ number-of-commits | label ] command to view the configuration rollback point list.
  • Run the display configuration commit changes [ at commit-id | since commit-id | last number-of-commits ] command to view information about configuration changes.
  • Run the display configuration rollback result command to view information about the latest configuration rollback operation, including prompt messages and failure messages.
Translation
Download
Updated: 2019-12-13

Document ID: EDOC1000041694

Views: 78699

Downloads: 3636

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next