01-Fundamentals Command Reference

HomeSupportSwitchesH3C S12500 Switch SeriesReference GuidesCommand ReferencesH3C S12500 Command References-Release1828P04-6W18201-Fundamentals Command Reference
05-Configuration File Management Commands
Title Size Download
05-Configuration File Management Commands 141.81 KB

Configuration file management commands

The switch supports the FIPS mode that complies with NIST FIPS 140-2 requirements. Support for features, commands, and parameters might differ in FIPS mode and non-FIPS mode. For more information about FIPS mode, see Security Configuration Guide.

archive configuration

Syntax

archive configuration

View

User view

Default level

3: Manage level

Parameters

None

Description

Use archive configuration to manually archive the running configuration to the configuration archive directory.

Before manually archiving the running configuration, complete the following tasks:

1.     Create a directory for saving configuration archives.

2.     Use the archive configuration location command to specify the directory as the configuration archive directory and specify an archive name prefix.

Configuration archive is a function that facilitates configuration rollback. It provides the manual and automatic methods for saving the running configuration as checkpoint references. For more information about the archiving mechanism, see the section about configuration rollback in Fundamentals Configuration Guide.

To ensure system performance, follow these guidelines:

·     If the device configuration does not change frequently, manually archive the running configuration as needed.

·     If a low-speed storage medium (such as a flash memory) is used, archive the running configuration manually, or configure automatic archiving with an interval longer than 1440 minutes (24 hours).

·     If a high-speed storage medium (such as a CF card) is used and the device configuration changes frequently, set a shorter saving interval.

Examples

# Archive the running configuration.

<Sysname> archive configuration

Warning: Save the running configuration to an archive file. Continue? [Y/N]: Y

Please wait...

Info: The archive configuration file myarchive_1.cfg is saved.

archive configuration interval

Syntax

archive configuration interval minutes

undo archive configuration interval

View

System view

Default level

3: Manage level

Parameters

minutes: Specifies the interval (in minutes) for automatically saving the running configuration. The value range is 10 to 525600 (365 days).

Description

Use archive configuration interval to enable automatic running-configuration archiving and set the archiving interval.

Use undo archive configuration interval to restore the default.

By default, the system does not automatically archive the running configuration.

Before enabling automatic configuration archiving, complete the following tasks:

1.     Create a directory for saving configuration archives.

2.     Use the archive configuration location command to specify the directory as the configuration archive directory and specify an archive name prefix.

Configuration archive is a function that facilitates configuration rollback. It provides the manual and automatic methods for saving the running configuration as checkpoint references.

Automatic configuration archiving enables the system to automatically save the running configuration to the archive directory. For more information about the archiving mechanism, see the section about configuration rollback in Fundamentals Configuration Guide.

To ensure system performance, follow these guidelines:

·     If the configuration of the switch does not change frequently, manually archive the running configuration as needed.

·     If a low-speed storage medium (such as a flash memory) is used, archive the running configuration manually, or configure automatic archiving with an interval longer than 1440 minutes (24 hours).

·     If a high-speed storage medium (such as a CF card) is used and the configuration of the switch changes frequently, set a shorter saving interval.

·     Change the archiving interval depending on the amount of available storage space. The shorter the interval, the more free storage space is required.

Examples

# Configure the system to archive the running configuration every 60 minutes.

<Sysname> system-view

[Sysname] archive configuration interval 60

Info: Archive files will be saved every 60 minutes.

archive configuration location

Syntax

archive configuration location directory filename-prefix filename-prefix

undo archive configuration location

View

System view

Default level

3: Manage level

Parameters

directory: Specifies a configuration archive directory, a case-insensitive string of 1 to 63 characters. The directory must take the format storage-medium name:/folder name. In standalone mode, this directory must already exist on the active MPU. In IRF mode, this directory must already exist on the active MPU of the master.

filename-prefix: Specifies a file name prefix for configuration archives, a case-insensitive string of 1 to 30 characters. Valid characters are letters, digits, underscores (_), and hyphens (-).

Description

Use archive configuration location to configure the directory and file name prefix for archiving the running configuration.

Use undo archive config location to restore the default.

By default, no configuration archive directory or configuration archive file name prefix has been set, and the system does not regularly save the running configuration.

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

In standalone mode, the configuration archive function saves running configuration only on the active MPU. In IRF mode, the function saves running configuration only on the active MPU in the master device. To make sure the system can archive running configuration after an active/standby or master/subordinate switchover, create the configuration archive directory on all MPUs.

Configuration archives take 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.

The undo archive configuration location command not only removes the configuration archive directory and file name prefix settings, but also disables the configuration archive function (both manual and automatic methods), restores the default settings of the archive configuration interval and archive configuration max commands, and clears all configuration archives.

Examples

In standalone mode:

# To configure the configuration archive directory and archive file name prefix as flash:/archive and my_archive:

1.     Create the directory on the active MPU.

<Sysname> mkdir archive

.

%Created dir flash:/archive.

2.     Create the directory on the standby MPU in slot 1.

<Sysname> mkdir slot1#flash:/archive

 

%Created dir slot1#flash:/archive.

3.     Specify the directory as the configuration archive directory, and configure an archive file name prefix.

<Sysname> system-view

[Sysname] archive configuration location flash:/archive filename-prefix my_archive

In IRF mode:

# To configure the configuration archive directory and archive file name prefix as flash:/archive/ and my_archive:

1.     Create the directory on the active MPU on the master.

<Sysname> mkdir archive

.

%Created dir flash:/archive.

2.     Create the directory on the standby MPU in slot 1 of IRF member device 2. (Repeat this step to create the directory on all MPUs in the IRF fabric.)

<Sysname> mkdir chassis2slot1#flash:/archive

 

%Created dir chassis2slot1flash:/archive.

3.     Specify the directory as the configuration archive directory, and configure an archive file name prefix.

<Sysname> system-view

[Sysname] archive configuration location flash:/archive filename-prefix my_archive

archive configuration max

Syntax

archive configuration max file-number

undo archive configuration max

View

System view

Default level

3: Manage level

Parameters

file-number: Sets the maximum number of configuration archives that can be saved. The value range is 1 to 10. Change the setting depending on the available amount of storage space.

Description

Use archive configuration max to set the maximum number of running-configuration archives.

Use undo archive configuration max to restore the default.

By default, a maximum of five configuration archives can be saved.

Before you can set a limit on configuration archives, use the archive configuration location command to specify a configuration archive directory and archive file name prefix.

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

Changing the limit setting to a lower value does not cause immediate deletion of exceeding archives. Instead, the configuration archive function deletes the oldest n files when a new archive is manually or automatically saved, where n = current archive count – new archive limit + 1. Suppose seven configuration archives have been saved before the archive limit is set to four. When saving a new configuration archive, the system first deletes the oldest four (7 – 4 + 1) archives.

If you execute the undo archive configuration location command, the default archive limit is restored.

Examples

# Set the maximum number of configuration archives to 10.

<Sysname> system-view

[Sysname] archive configuration max 10

backup startup-configuration

Syntax

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

View

User view

Default level

2: System level

Parameters

dest-addr: Specifies a TFTP server's IPv4 address or name, a string of 1 to 20 characters.

dest-filename: Specifies the target file name used for saving the file on the server. The file name must have the extension .cfg. If you do not specify a target file name, the source file name is used.

Description

Use backup startup-configuration in non-FIPS mode to backup the startup configuration file (used at the next system startup) to a TFTP server.

This command is not supported in FIPS mode.

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

Examples

# Back up the next-startup configuration file of the switch to the TFTP server with IP address 2.2.2.2, and set the target file name to 192-168-1-26.cfg.

<Sysname> backup startup-configuration to 2.2.2.2 192-168-1-26.cfg

Backup next startup-configuration file to 2.2.2.2, please wait…finished!

configuration replace file

Syntax

configuration replace file filename

View

System view

Default level

3: Manage level

Parameters

filename: Specifies the name of the replacement configuration file for configuration rollback.

Description

Use configuration replace file to perform 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.

To ensure a successful rollback:

·     Do not remove or install a card while the system is executing the configuration replace file command.

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

Examples

# Replace the running configuration with the configuration in the my_archive_1.cfg configuration file.

<Sysname> system-view

[Sysname] configuration replace file my_archive_1.cfg

Current configuration will be lost, save current configuration? [Y/N]:n

Info: Now replacing the current configuration. Please wait...

Info: Succeeded in replacing current configuration with the file my_archive_1.cfg.

display archive configuration

Syntax

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

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display archive configuration to display configuration archive information, including the archive directory, archive prefix, archive interval, maximum number of archives, and saved archives.

Examples

# Display configuration archive information.

<Sysname> display archive configuration

Location: flash:/archive

Filename prefix: my_archive

Archive interval in minutes: 120

Maximum number of archive files: 10

Saved archive files:

  No. TimeStamp              FileName

  1   Aug 05 2007 20:24:54   my_archive_1.cfg

  2   Aug 05 2007 20:34:54   my_archive_2.cfg

# 3   Aug 05 2007 20:44:54   my_archive_3.cfg

'#' indicates the most recent archive file.

Next archive file to be saved: my_archive_4.cfg

Table 1 Command output

Field

Description

Location

Directory for saving running-configuration archives.

Archive interval in minutes

Interval (in minutes) for the system to automatically archive the running configuration.

If automatic configuration archiving is disabled, this field is not available.

 

display current-configuration

Syntax

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

View

Any view

Default level

2: System level

Parameters

configuration [ configuration ]: Displays feature settings. The configuration argument specifies a feature module. If no feature module is specified, this command displays all feature settings you have made. Available feature modules depend on your configuration.

interface [ interface-type [ interface-number ] ]: Displays interface configuration, where the interface-type argument represents the interface type and the interface-number argument represents the interface number.

exclude modules: Excludes the configuration of specific modules. The modules argument can be acl, acl6, or both separated by a space.

·     acl: Excludes the IPv4 ACL configuration.

·     acl6: Excludes the IPv6 ACL configuration.

by-linenum: Display the number of each line.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display current-configuration to display the running configuration.

This command helps verify the configuration you have made.

Typically, this command does not display parameters that are set to their default settings.

If the system has automatically changed the setting you have made for a parameter, for example, due to a system restriction, this command displays the effective setting rather than the configured one. For example, assign IP address 11.11.11.11 24 to a Loopback interface. However, the display current-configuration command displays 11.11.11.11 255.255.255.255, because the subnet mask for a Loopback interface must be 32 bits, and the system has automatically corrected the subnet mask.

Related commands: display saved-configuration, reset saved-configuration, and save.

Examples

# Display the configuration from the line containing "user-interface" to the last line of the running configuration.

<Sysname> display current-configuration | begin user-interface

user-interface con 0 1

user-interface aux 0 1

user-interface vty 0 15

 authentication-mode none

 user privilege level 3

#

return

display default-configuration

Syntax

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

View

Any view

Default level

2: System level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display default-configuration to display the factory defaults of the switch. The command displays all commands to be executed when the switch starts up with the factory defaults.

Related commands: display current-configuration, reset saved-configuration, and save.

Examples

# Display the factory defaults of the switch.

<Sysname> display default-configuration

display saved-configuration

Syntax

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

View

Any view

Default level

2: System level

Parameters

by-linenum: Identifies each line of displayed information with a line number.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display saved-configuration to display the contents of the configuration file to be used at the next startup.

During switch management and maintenance, you can use this command to check whether important configurations are saved to the configuration file to be used for the next startup of the switch.

If the system is not specified with a configuration file for the next startup or the specified configuration file does not exist, no information will be displayed when you execute the display saved-configuration command.

Related commands: display current-configuration, reset saved-configuration, and save.

Examples

# Display the next-startup configuration file.

<Sysname> display saved-configuration

#

 version 5.20, Release 2127

#

 sysname H3C

#

 domain default enable system

#

 telnet server enable

#

mac-address timer no-aging

#

vlan 1

#

vlan 100

#

vlan 1000

#

domain system

 access-limit disable

 state active

 self-service-url disable

  ---- More ----

The configurations are displayed in the following view order: global, port, and user interface. At the prompt of More, press Enter to display the next line, press Space to display the next screen of configuration, or press Ctrl+C or any other key to stop displaying the configuration.

# Display the next-startup configuration file, and number each line.

<Sysname> display saved-configuration by-linenum

    1:  #

    2:   version 5.20, Release 2127

    3:  #

    4:   sysname H3C

    5:  #

    6:   domain default enable system

    7:  #

    8:   telnet server enable

    9:  #

   10:   mac-address timer no-aging

   11:  #

   12:  vlan 1

   13:  #

   14:  vlan 100

   15:  #

   16:  vlan 1000

   17:  #

   18:  domain system

   19:   access-limit disable

   20:   state active

   21:   self-service-url disable

---- More ----

display startup

Syntax

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

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display startup to display the current startup configuration file and the next-startup configuration file.

Current startup configuration file is the configuration file used at this startup. Next-startup configuration file is the configuration file used at the next startup.

In standalone mode, the standby MPU always maintains the same current startup configuration file as the active MPU. After an active/standby switchover, it is normal that the current startup configuration files on them are displayed as NULL, because the new active MPU continues to run with the running configuration rather than rebooting with the previous current startup configuration file.

In IRF mode, the MPUs in the IRF fabric always maintain the same current startup configuration file as the global active MPU. After an active/standby switchover, it is normal that the current startup configuration files on them are displayed as NULL, because the new global active MPU continues to run with the running configuration rather than rebooting with the previous current startup configuration file.

Related commands: startup saved-configuration.

Examples

# In standalone mode, display the startup configuration files.

<Sysname> display startup

  Current startup saved-configuration file:          flash:/testcfg.cfg

  Next startup saved-configuration file:             flash:/testcfg.cfg

# In IRF mode, display the startup configuration files.

<Sysname> display startup

MainBoard:

  Current startup saved-configuration file:          flash:/testcfg.cfg

  Next startup saved-configuration file:             flash:/testcfg.cfg

Chassis 2 Slot 0:

  Current startup saved-configuration file:          flash:/testcfg.cfg

  Next startup saved-configuration file:             flash:/testcfg.cfg

Table 2 Command output

Field

Description

Current Startup saved-configuration file

Configuration file used for the current startup.

Next startup saved-configuration file

Configuration file used for the next startup.

MainBoard:

Displays the startup configuration files on the IRF master.

Chassis x Slot n:

Displays the startup configuration files on the MPU in slot n of IRF member x.

 

display this

Syntax

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

View

Any view

Default level

1: Monitor level

Parameters

by-linenum: Displays the number of each line.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display this to display the valid configuration in the current view.

To check whether your configuration takes effect, use the display this command.

Typically, this command does not display parameters that are set to their default settings.

For some parameters that can be successfully configured even if their dependent features are not enabled, this command displays their settings after the dependent features are enabled.

Executed in any user interface view, this command displays the running configuration of all user view interfaces.

Executed in any VLAN view, this command displays the running configuration of all VLANs.

Examples

# Display the valid configuration on interface GigabitEthernet 3/0/1 (the output depends on the running configuration of the switch).

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/0/1

[Sysname-GigabitEthernet3/0/1] display this

#

interface GigabitEthernet 3/0/1

 port link-mode bridge

 port link-type hybrid

 undo port hybrid vlan 1

 port hybrid vlan 2 to 4 untagged

 port hybrid pvid vlan 2

#

Return

# Display the valid configuration on all user interfaces (the output depends on the running configuration of the switch).

<Sysname> system-view

[Sysname] user-interface vty 0

[Sysname-ui-vty0] display this

#

user-interface con 0

user-interface vty 0

 history-command max-size 256

user-interface vty 1 15

#

return

reset saved-configuration

Syntax

reset saved-configuration

View

User view

Default level

3: Manage level

Parameters

None

Description

CAUTION:

Use this command with caution. In standalone mode, this command permanently deletes the next-startup configuration file from the active MPU and standby MPU. In IRF mode, this command permanently deletes the next-startup configuration file from the active MPU and standby MPU of every IRF member switch.

 

Use reset saved-configuration to delete next-startup configuration files.

Delete the next-startup configuration file if it is corrupted or does not match the software version.

Related commands: display saved-configuration and save.

Examples

# In standalone mode, delete the next-startup configuration file.

<Sysname> reset saved-configuration

The saved configuration file will be erased. Are you sure? [Y/N]:y

Configuration file in flash is being cleared.

Please wait ...

..

MainBoard:

 Configuration file is cleared.

Slot 0:

 Erase next configuration file successfully

# In IRF mode, delete the next-startup configuration file.

<Sysname> reset saved-configuration

The saved configuration file will be erased. Are you sure? [Y/N]:y

Configuration file in flash is being cleared.

Please wait ...

..

MainBoard:

 Configuration file is cleared.

Chassis 2 Slot 0:

 Erase next configuration file successfully

restore startup-configuration

Syntax

restore startup-configuration from src-addr src-filename

View

User view

Default level

3: Manage level

Parameters

src-addr: Specifies a TFTP server's IPv4 address or name. The name can comprise 1 to 20 characters.

src-filename: Specifies the file name of the configuration file to be downloaded.

Description

Use restore startup-configuration in non-FIPS mode to download a configuration file from a TFTP server and specify it as the next-startup configuration file.

This command is not supported in FIPS mode.

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

This command provides an easy method for configuration file restoration by automatically performing all operations required for restoring the next-startup configuration file.

It downloads the configuration file to the root directory of the default storage medium on each MPU and specifies the file as the next-startup configuration file. (The default storage medium is user configurable. For more information, see "Managing the file system.")

If the storage medium has been partitioned, the configuration file is saved on the first partition.

This command assumes that all MPUs use the same type of storage medium. If a standby MPU uses a different type of storage medium than the active MPU, the command cannot propagate the configuration file to the standby MPU. For example, if the standby MPU uses a CF card, but the active MPU uses a flash memory, you must manually restore the next-startup configuration file on the standby MPU.

Examples

# In standalone mode, download the configuration file config.cfg from the TFTP server at 2.2.2.2, and specify the file as the next-startup configuration file.

<Sysname>restore startup-configuration from 2.2.2.2 config.cfg

Restore next startup-configuration file from 2.2.2.2. Please wait...finished!

Now restore next startup-configuration file from main to slave board. Please wait...finished!

# In IRF mode, download the configuration file config.cfg from the TFTP server at 2.2.2.2, and specify the file as the next-startup configuration file.

<Sysname> restore startup-configuration from 2.2.2.2 config.cfg

Restore next startup-configuration file from 2.2.2.2. Please wait...finished!

Now restore next startup-configuration file from main to slave board. Please wait...finished!

save

Syntax

In standalone mode:

save file-url [ all | slot slot-number ]

save [ safely ] [ force ]

In IRF mode:

save file-url [ all | chassis chassis-number slot slot-number ]

save [ safely ] [ force ]

View

Any view

Default level

2: System level

Parameters

file-url: Specifies a file path, where the file extension must be .cfg. If the keyword all or an MPU slot is specified, the file path cannot include a slot number. If the file path includes a folder name, you must first create the folder on the specific MPU. (In standalone mode.)

all: Saves the running configuration with the specified file name to all MPUs. (In standalone mode–In IRF mode.)

slot slot-number: Specifies an MPU by its slot number. Use this option when your switch is operating in standalone (the default) mode.

chassis chassis-number slot slot-number: Specifies an MPU on an IRF member switch. The chassis-number argument represents the ID of the IRF member switch, and the slot-number argument represents the number of the slot that holds the MPU. You can display the member ID and slot number with the display device command. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.

safely: Saves the configuration file in safe mode. If this keyword is not specified, the system saves the configuration file in fast mode. Safe mode is less fast 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. In fast 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.

force: Saves the running configuration to the next-startup configuration file already specified in the system. Without this keyword, the system asks you to confirm your operation. If you do not confirm your operation within 30 seconds, the system automatically aborts the operation. If you enter Y within the time limit, you can continue the save process and change the next-startup configuration file during this process.

Description

In standalone mode:

Use save file-url [ all | slot slot-number ] to save the running configuration to a configuration file, without specifying the file as the next-startup configuration file.

Use save [ safely ] [ force ] to save the running configuration to the root directory of the storage media on both active MPU and standby MPU, and specify the file as the next-startup configuration file.

If the file specified by file-url does not exist, the system creates the file before saving the configuration. If neither the all keyword nor an MPU slot is specified, the system saves the configuration to the active MPU.

The configuration auto-update function enables the standby MPU to automatically save the running configuration as the active MPU does when you execute the save [ safely ] [ force ] command or the save file-url all command. If this function is disabled, only the active MPU saves the configuration.

In IRF mode:

Use save file-url [ all | chassis chassis-number slot slot-number ] to save the running configuration to a configuration file, without specifying the file as the next-startup configuration file.

Use save [ safely ] [ force ] to save the running configuration to the root directory of the storage media on each member switch, and specify the file as the next-startup configuration file.

If the file specified for file-url does not exist, the system creates the file before saving the configuration. If neither the all keyword nor an MPU slot is specified, the system saves the configuration to the active MPU on the master.

The configuration auto-update function enables all MPUs in the IRF fabric to automatically save the running configuration as the active MPU on the master device does when you execute the save [ safely ] [ force ] command or the save file-url all command. If this function is disabled, only the active MPU on the master device saves the configuration.

When you use the save [ safely ] [ force ] command to save the running configuration to the root directory of the storage medium on a member switch, and specify the file as the next-startup configuration file, do not specify the path for saving configuration files as a USB disk.

Related commands: display current-configuration, display saved-configuration, reset saved-configuration, and slave auto-update config.

Examples

# Save the running configuration file to the default directory.

<Sysname> save

The current configuration will be written to the device.

Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/testcfg.cfg](To leave the

existing filename unchanged, press the enter key):

flash:/testcfg.cfg exists, overwrite?[Y/N]:y

 

Validating file. Please wait...

Now saving current configuration to the device.

Saving configuration flash:/testcfg.cfg. Please wait...

.

Configuration is saved to flash successfully.

<Sysname>

# Save the running configuration in the name of test.cfg to all MPUs.

<Sysname> save test.cfg all

The current configuration will be saved to flash:/test.cfg. Continue? [Y/N]:y

Now saving current configuration to the device.

Saving configuration flash:/test.cfg. Please wait...

...

Configuration is saved to flash successfully.

Slot 7:

Configuration is saved to flash successfully.

Slot 8:

Configuration is saved to flash successfully.

<Sysname>

slave auto-update config

Syntax

slave auto-update config

undo slave auto-update config

View

System view

Default level

2: System level

Parameters

None

Description

In standalone mode:

Use slave auto-update config to enable the configuration file auto-update function for the standby MPU to automatically save the running configuration as the active MPU does when you execute the save [ safely ] [ force ] command or the save file-url all command.

Use undo slave auto-update config to disable the function.

In IRF mode:

Use slave auto-update config to enable the configuration auto-update function for all MPUs in the IRF fabric to automatically save the running configuration as the active MPU on the master does when you execute the save [ safely ] [ force ] command or the save file-url all command.

Use undo slave auto-update config to disable the function.

By default, the configuration auto-update function is enabled.

In standalone mode, if configuration auto-update is disabled, the save [ safely ] [ force ] command and the save file-url all command save the running configuration only to the active MPU. In IRF mode, the two commands save the running configuration only to the active MPU on the master.

To ensure configuration consistency across the IRF fabric, H3C recommends enabling the function.

The save command executed with only the file-url argument saves the running configuration only to the specified path, regardless of whether the configuration auto-update function has been enabled.

Examples

# Enable configuration auto-update.

<Sysname> system-view

[Sysname] slave auto-update config

startup saved-configuration

Syntax

startup saved-configuration cfgfile

undo startup saved-configuration

View

User view

Default level

3: Manage level

Parameters

cfgfile: Specifies a configuration file name with the extension .cfg. The file must be stored in the root directory of a storage medium. If the storage medium has been partition, the root directory must be on the first partition.

Description

CAUTION:

In an IRF fabric, use the undo startup saved-configuration command with caution. This command can cause an IRF split after the IRF fabric or an IRF member reboots.

 

In standalone mode:

Use startup saved-configuration to specify the next-startup configuration file for the active MPU and standby MPU.

Use undo startup saved-configuration to configure the active MPU and standby MPU to start up with the factory defaults at the next startup.

In IRF mode:

Use startup saved-configuration to specify the next-startup configuration file for all MPUs in the IRF fabric.

Use undo startup saved-configuration to configure all MPUs to start up with the factory defaults at the next startup.

The startup saved-configuration command applies to all MPUs. To successfully configure the command, verify that:

·     In standalone mode, the specified file has been saved to the root directory of a storage medium (flash memory or CF card) on both active MPU and standby MPU.

·     In IRF mode, the specified file has been saved to the root directory of a storage medium (flash memory or CF card) on each MPU.

·     If the storage medium has been partitioned, save the file on the first partition.

·     Do not save the startup configuration file to the USB disk.

Related commands: display startup.

Examples

# In standalone mode, specify a next-startup configuration file.

<Sysname> startup saved-configuration testcfg.cfg

Please wait ....... Done!

# In IRF mode, specify a next-startup configuration file.

<Sysname> startup saved-configuration testcfg.cfg

Please wait ...

Setting the master board ..........

... Done!

Setting the slave board ...

Chassis 2 Slot 0:

Set next configuration file successfully

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