01-Fundamentals Command Reference

HomeSupportRoutersCR16000-M1A SeriesCR16000-M1A SeriesTechnical DocumentsReference GuidesCommand ReferencesH3C CR16000-M1A Router Command Reference-R8630Pxx-6W10201-Fundamentals Command Reference
06-Configuration file management commands
Title Size Download
06-Configuration file management commands 265.30 KB

Configuration file management commands

archive configuration

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

Syntax

archive configuration

Views

User view

Predefined user roles

network-admin

Usage guidelines

Operating mechanism

This command saves the running configuration to the specified configuration archive directory with file names generated from the specified name prefix.

Restrictions and guidelines

Before executing this command, perform one of the following operations:

·     Execute the archive configuration location command to specify a directory and a name prefix for the configuration archives.

·     Execute the archive configuration server command to configure related settings to back up configuration files to the remote server.

Examples

# Archive the running configuration.

<Sysname> archive configuration

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

The archive configuration file myarchive_1.cfg is saved.

Related commands

archive configuration interval

archive configuration location

·     archive configuration server

archive configuration max

display archive configuration

archive configuration interval

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

Use undo archive configuration interval to disable automatic running-configuration archiving.

Syntax

archive configuration interval interval

undo archive configuration interval

Default

The automatic running-configuration archiving feature is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Specifies the interval for automatically saving the running configuration. The value range is 10 to 525600, in minutes.

Usage guidelines

Operating mechanism

Automatic configuration archiving enables the system to periodically save the running configuration to the archive directory. After the system finishes an automatic archive, it resets the archiving interval timer.

Restrictions and guidelines

Before enabling automatic configuration archiving, use the archive configuration location command to specify the configuration archive directory and archive file name prefix.

Examples

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

<Sysname> system-view

[Sysname] archive configuration interval 60

Archive file will be saved every 60 minutes.

Related commands

archive configuration

archive configuration location

archive configuration max

display archive configuration

archive configuration location

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

Use undo archive configuration location to restore the default.

Syntax

archive configuration location directory filename-prefix filename-prefix

undo archive configuration location

Default

No configuration archive directory or configuration archive file name prefix is set.

Views

System view

Predefined user roles

network-admin

Parameters

directory: Specifies the archive directory, a string of 1 to 63 characters. The value for this argument must take the format of storage-medium-name:/folder-name. The directory must already exist. (In standalone mode.)

directory: Specifies the archive directory, a string of 1 to 63 characters. The value for this argument must take the format of storage-medium-name:/folder-name. The directory must already exist. (In IRF mode.)

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 (-).

Usage guidelines

Operating mechanism

Configuration archives are named in the format of prefix_serial number.cfg, for example, archive_1.cfg and archive_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.

Restrictions and guidelines

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

If you change the file directory or file name prefix, the following events occur:

·     The old configuration archives change to common configuration files.

·     The configuration archive counter is reset. The serial number for new configuration archives starts at 1.

·     The display archive configuration command no longer displays the old configuration archives.

The configuration archive counter does not restart when you delete configuration archives from the archive directory. However, if the device reboots after all configuration archives have been deleted, the configuration archive counter restarts. The serial number for new configuration archives starts at 1.

The undo archive configuration location command removes the configuration archive directory and file name prefix settings. The command also performs the following operations:

·     Disables the configuration archive feature (both manual and automatic methods).

·     Restores the default settings of the archive configuration interval and archive configuration max commands.

·     Clears the configuration archive information displayed by using the display archive configuration command.

The archive configuration server command is muutally exclusive with the archive configuration location command. To execute the archive configuration server command, you must restore the default for the archive configuration location command, and vice versa.

Examples

# Set the configuration archive directory as flash:/archive and the archive file name prefix as my_archive.

<Sysname> mkdir flash:/archive

Creating directory flash:/archive... Done.

<Sysname> system-view

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

Related commands

archive configuration

archive configuration location

archive configuration max

display archive configuration

archive configuration server

Use archive configuration server to configure the parameters for archiving the running configuration to a remote server.

Use undo archive configuration server to restore the default.

Syntax

To archive the running configuration to a remote FTP server:

archive configuration server ftp [ user user-name password { cipher | simple } string ] { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix [ interval interval ]

To archive the running configuration to a remote TFTP server:

archive configuration server tftp { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix [ interval interval ]

To archive the running configuration to a remote SCP server:

archive configuration server  scp user user-name password { cipher | simple } string { ipv4-address | ipv6 ipv6-address } [ port port-number ] [ vpn-instance vpn-instance-name ] [ directory directory ] filename-prefix filename-prefix [ interval interval ]

undo archive configuration server

Default

No parameters are set for archiving the running configuration to a remote server.

Views

System view

Predefined user roles

network-admin

Parameters

ftp: Specifies a remote FTP server.

tftp: Specifies a remote TFTP server.

scp: Specifies a remote SCP server.

ipv4-address: Specifies a remote server by its IPv4 address.

ipv6 ipv6-address: Specifies a remote server by its IPv6 address.

port port-number: Specifies the TCP port number of the remote server. The value range for the port-number argument is 1 to 65535. The default port number is 22 for a remote SCP server, 21 for a remote FTP server, and 69 for a remote TFTP server.

vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If the remote server is on the public network, do not specify this option.

directory directory: Specifies the archive directory, a case-insensitive string. The specified archive directory must have been created on the remote server.

·     For a Linux SCP server, this option is required and the specified archive directory must be an absolute path.

·     For a Windows SCP server, this option is optional and the specified archive directory must be a relative path. The default archive directory is the root directory of the SCP server.

filename-prefix 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 (-).

interval interval: Enables automatic running-configuration remote archiving and sets the archiving interval. The value range for the interval argument is 10 to 525600, in minutes. By default, automatic running-configuration remote archiving is disabled.

user user-name: Specifies the username for accessing the FTP or SCP server that stores the configuration archives, a case-sensitive string of 1 to 63 characters.

password: Configures the password for accessing the FTP or SCP server that stores the configuration archives.

cipher: Specifies a password in encrypted form.

simple: Specifies a password in plaintext form. For security purposes, the password specified in plaintext form will be stored in encrypted form.

string: Specifies the password. Its plaintext form is a case-sensitive string of 1 to 63 characters. Its encrypted form is a case-sensitive string of 33 to 117 characters.

Usage guidelines

Operating mechanism

You can use the following methods to archive the running configuration to a remote server:

·     Manual configuration archiving: After you execute this command to specify the parameters for archiving the running configuration to a remote server, execute the archive configuration command for manual configuration archiving.

·     Automatic configuration archiving: Specify the interval keyword to enable automatic running-configuration remote archiving. After you execute this command, the system saves the running configuration to the archive directory on the remote server at the interval specified by the interval argument. After the system finishes an automatic archive, it resets the archiving interval timer.

If you archive the running configuration to a remote server, configuration archives are named in the format of prefix_YYYYMMDD_HHMMSS.cfg (for example, archive_20170526_203430.cfg).

Restrictions and guidelines

Non-default vSystems do not support this command.

If you use a remote TFTP, FTP, or SCP server, make sure the device is consistent with that server in, TFTP. FTP, or SCP settings. If a login username and password is configured on the server, you must specify that login username and password on the device.

The archive configuration server and archive configuration location commands are mutually exclusive. To execute the archive configuration server command, you must restore the default for the archive configuration location command, and vice versa.

If you execute this command multiple times, the most recent configuration takes effect.

After you execute the undo archive configuration server command, the output from the display archive configuration command will be cleared.

Examples

# Set the configuration archive directory as archive/ on the SCP server at 192.168.1.1 and set the archive file name prefix as my_archive.

<Sysname> system-view

[Sysname] archive configuration server scp user aaa password simple 123 192.168.1.1 port 22 directory /archive/ filename-prefix my_archive

# Set the configuration archive directory as archive/ on the FTP server at 192.168.1.1 and set the archive file name prefix as my_archive.

<Sysname> system-view

[Sysname] archive configuration server ftp user aaa password simple 123 192.168.1.1 port 22 directory /archive/ filename-prefix my_archive

Related commands

archive configuration

archive configuration location

display archive configuration

archive configuration max

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

Use undo archive configuration max to restore the default.

Syntax

archive configuration max file-number

undo archive configuration max

Default

The maximum number is 5.

Views

System view

Predefined user roles

network-admin

Parameters

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

Usage guidelines

Operating mechanism

Changing the limit setting to a lower value does not cause immediate deletion of excess archives. Instead, the configuration archive feature deletes the oldest n files when a new archive is manually or automatically saved, where n = current archive count – new archive limit + 1. For example, 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. After the maximum number of configuration archives is reached, the system deletes the oldest archive for the new archive.

Restrictions and guidelines

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.

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

Related commands

archive configuration

archive configuration location

archive configuration interval

display archive configuration

backup startup-configuration

Use backup startup-configuration to back up the main next-startup configuration file to a TFTP server.

Syntax

backup startup-configuration to { ipv4-server | ipv6 ipv6-server } [ dest-filename ] [ vpn-instance vpn-instance-name ]

Views

User view

Predefined user roles

network-admin

Parameters

ipv4-server: Specifies a TFTP server by its IPv4 address or host name. The host name is a case-insensitive string of 1 to 253 characters. Valid characters include letters, digits, hyphens (-), underscores (_), and dots (.).

ipv6 ipv6-server: Specifies a TFTP server by its IPv6 address or host name. The host name is a case-insensitive string of 1 to 253 characters. Valid characters include letters, digits, hyphens (-), underscores (_), and dots (.).

dest-filename: Specifies the name of the target file used for saving the file on the server. The file must be a .cfg file. The file name is a case-insensitive string of up to 255 characters. If you do not specify a target file name, the source file name is used.

vpn-instance vpn-instance-name: Specifies the MPLS L3VPN instance to which the TFTP server belongs. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the server belongs to the public network, do not specify this option.

Examples

# Back up the main next-startup configuration file to the IPv4 TFTP server at 2.2.2.2 in the public network, 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

Backing up the main startup configuration file to 2.2.2.2...

Done.

# Back up the main next-startup configuration file to the IPv4 TFTP server at 2.2.2.2 in MPLS L3VPN instance VPN1, 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 vpn-instance VPN1

Backing up the main startup configuration file to 2.2.2.2 in VPN VPN1...

Done.

# Back up the main next-startup configuration file to the IPv6 TFTP server at 2001::2 in the public network, and set the target file name to 192-168-1-26.cfg.

<Sysname> backup startup-configuration to ipv6 2001::2 192-168-1-26.cfg

Backing up the main startup configuration file to 2001::2...

Done.

Related commands

restore startup-configuration

configuration encrypt

Use configuration encrypt to enable configuration encryption.

Use undo configuration encrypt to disable configuration encryption.

Syntax

configuration encrypt

undo configuration encrypt

Default

Configuration encryption is disabled.

Views

System view

Predefined user roles

network-admin

Usage guidelines

Operating mechanism

Configuration encryption enables the device to automatically encrypt a configuration file by using the master key when saving the running configuration to the file. For more information about the master key, see public key management in Security Configuration Guide.

Restrictions and guidelines

After a configuration file is encrypted by using this feature on the device, only devices that use the same master key as the device can decrypt the encrypted configuration file.

Examples

# Enable configuration encryption.

<Sysname> system-view

[Sysname] configuration encrypt

configuration commit max-number

Use configuration commit max-number to set the maximum number of rollback points.

Use undo configuration commit max-number to restore the default.

Syntax

configuration commit max-number max-number

undo configuration commit max-number

Default

The maximum number of rollback points is 100.

Views

System view

Predefined user roles

network-admin

Parameters

max-number: Specifies the maximum number of rollback points, in the range of 1 to 65535.

Usage guidelines

To store a new rollback point when the number of rollback points reaches the maximum, the system deletes the earliest rollback point.

Examples

# Set the maximum number of rollback points to 10.

<Sysname> system-view

[Sysname] configuration commit max-number 10

configuration replace

Use configuration replace to roll back the running configuration based on a rollback point.

Syntax

configuration replace { last number | commit-id commit-id }

Views

System view

Predefined user roles

network-admin

Parameters

last number: Specifies a rollback point by its number, counting from the most recent rollback point.

commit-id commit-id: Specifies a rollback point by its commit ID. The value range for the commit-id argument depends on the number of existing rollback points.

Usage guidelines

说明: CAUTION

CAUTION:

This operation will cause settings not in the replacement configuration file to be lost, which might cause service interruption. When you perform configuration rollback, make sure you fully understand its impact on your network.

 

When you roll back the running configuration or commit target configuration command lines, the system creates a rollback point and assigns a unique commit ID to the rollback point.

Examples

# Roll back the running configuration based on rollback point 2.

<Sysname> system-view

[Sysname] configuration replace commit-id 2

Current configuration will be lost, Save running configuration? [Y(yes)/N(no)/C(cancel)]:n

Now rolling back the running configuration. Please wait...

Running configuration successfully rolled back.

configuration replace file

Use configuration replace file to to roll back the running configuration based on a configuration file.

Syntax

configuration replace file filename

Views

System view

Predefined user roles

network-admin

Parameters

filename: Specifies the path and name of the replacement configuration file, a string of up to 255 characters. The value length is calculated starting from the storage medium path (for example, flash:/). If the storage medium path is not provided, the system will automatically add it and then calculate whether the total length exceeds 255 characters. The file must be a .cfg file. The file and file path must be valid.

Usage guidelines

Prerequisites

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

If the configuration file is not created on the device, make sure the command lines in the configuration file are fully compatible with the device.

Operating mechanism

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

When you roll back the running configuration or commit target configuration command lines, the system creates a rollback point and assigns a unique commit ID to the rollback point.

Restrictions and guidelines

This operation will cause settings not in the replacement configuration file to be lost, which might cause service interruption. When you perform configuration rollback, make sure you fully understand its impact on your network.

Make sure the replacement configuration file is not encrypted.

Examples

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

<Sysname> system-view

[Sysname] configuration replace file basic.cfg

Current configuration will be lost, save current configuration? [Y(yes)/N(no)/C(

cancel)]:n

Now rolling back the running configuration. Please wait...

Running configuration successfully rolled back.

configuration report interval

Use configuration report interval to set the interval for automatic configuration change report.

Use undo configuration report interval to restore the default.

Syntax

configuration report interval interval-value

undo configuration report interval

Default

The device automatically reports configuration changes at intervals of 5 minutes.

Views

System view

Predefined user roles

network-admin

Parameters

interval-value: Sets the interval for the device to automatically report configuration changes. The value range is 1 to 3600, in minutes. The default value is 5.

Usage guidelines

Application scenarios

The configuration change report feature helps you to timely obtain any changes in the running configuration compared to a baseline. This feature enables automatic monitoring of device configuration changes. You can use this command to configure the interval for automatic configuration change report.

Operating mechanism

To use the configuration change report feature, you must perform the following tasks:

·     Perform NETCONF action-type operations to create configuration change check points on the device.

·     Subscribe to configuration change check points through the subscription function of the NETCONF or gRPC module.

After you complete the above tasks, the device will check for configuration changes at intervals configured by using this command. The check mechanism is as follows:

·     After the first configuration change check point is created through NETCONF, the device starts a configuration change check timer. Upon timer expiration, the device compares the running configuration with the configuration at the configuration change check point.

¡     If the configurations are the same, the device determines that its configuration has not changed. In this case, it does not report configuration changes to the network management device and starts a new round of configuration change check.

¡     If the configurations are different, the device determines that its configuration has changed. In this case, it uses NETCONF or gRPC subscription packets to report the changed settings to the network management device and starts a new round of configuration change check.

·     The configuration change check interval is the interval set by using this command.

For more information about NETCONF, see Network Management and Monitoring Configuration Guide. For more information about gRPC, see Telemetry Configuration Guide.

Examples

# Configure the device to automatically report configuration changes at intervals of 10 minutes.

<Sysname> system-view

[Sysname] configuration report interval 10

Related commands

display configuration report check-point

display archive configuration

Use display archive configuration to display configuration archive information.

Syntax

display archive configuration

Views

Any view

Predefined user roles

network-admin

network-operator

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   Wed Jan 15 14:20:18 2012   my_archive_1.cfg

  2   Wed Jan 15 14:33:10 2012   my_archive_2.cfg

# 3   Wed Jan 15 14:49:37 2012   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

Absolute path of the directory for saving running-configuration archives.

Filename prefix

File name prefix for configuration archives.

Archive interval in minutes

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

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

Maximum number of archive files

Maximum number of configuration archives that can be saved.

Saved archive files

Configuration archives that have been saved.

TimeStamp

Time when the configuration archive was created.

 

Related commands

archive configuration

archive configuration interval

archive configuration location

archive configuration max

archive configuration server

display configuration commit diff

Use display configuration commit diff to display configuration differences between a rollback point and the running configuration or between two rollback points.

Syntax

display configuration commit diff [ at commit-id | last number | since commit-id ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

at commit-id: Displays the configuration differences between a rollback point and the next rollback point. The commit-id argument identifies a rollback point by its commit ID. The value range depends on the commit IDs of existing rollback points. If you specify the most recently created rollback point, this command displays configuration differences between the most recently created rollback point and the running configuration.

last number: Displays the configuration differences between a rollback point and the running configuration. The number argument specifies a rollback point by its number counting from the most recent rollback point.

since commit-id: Displays the configuration differences between a rollback point and the running configuration. The commit-id argument identifies a rollback point by its commit ID. The value range depends on the commit IDs of existing rollback points.

Usage guidelines

If you do not specify any parameters, this command displays the configuration differences between each two adjacent rollback points, and between the most recent rollback point and the running configuration.

If the at commit-id option specifies the most recent rollback point, this command displays the configuration differences between the most recent rollback point and the running configuration.

Examples

# Display the configuration differences between rollback point 2 and the next rollback point.

<Sysname> display configuration commit diff at 2

--- CommitId 2 configuration

+++ CommitId 3 configuration

@@ -3,4 +3,4 @@

  #

Vlan1

-  description test

+  description world

  #

Table 2 Command output

Field

Description

--- A

+++ B

·     A represents the configuration for comparison, which can be the configuration of the specified rollback point.

·     B represents the configuration compared by the command, which can be the running configuration or configuration of the next rollback point.

@@ -linenumber1,number1  +linenumber2,number2  @@

Location summary for sections that have command line differences:

·     -linenumber1,number1—Configuration A section that has command line differences. The linenumber1 argument represents the start line of the section. The number1 argument represents the number of lines between the start line and the end line of the section.

·     +linenumber2,number2—Configuration B section that has command line differences. The linenumber2  argument represents the start line of the section. The number2 argument represents the number of lines between the start line and the end line of the section.

cmd1

- cmd2

+ cmd3

cmd4

Displays command line differences.

·     cmd1 and cmd4—Command lines are contained in both configurations A and B if they are not prefixed with a minus (-) or plus (+) sign. They provide a context for locating command line differences.

·     - cmd2—Command lines are prefixed with a minus sign if they are contained in configuration A but not in configuration B.

·     + cmd3—Command lines are prefixed with a plus sign if they are contained in configuration B but not in configuration A.

 

display configuration commit list

Use display configuration commit list to display rollback point information.

Syntax

display configuration commit list [ number ] [ verbose ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

number: Displays the most recent rollback points.

verbose: Displays detailed rollback point information. If you do not specify this keyword, the command displays brief rollback point information.

Usage guidelines

If you do not specify any parameters, this command displays brief information about all rollback points.

Examples

# Display the most recent three rollback points.

<Sysname> display configuration commit list 3

--------------------------------------------------------------------------------

Commit ID      Label           User            Time stamp

3              -               -               2016-07-11 14:34:06

2              -               -               2016-07-11 14:33:06

1              -               -               2016-07-11 14:32:19 

Table 3 Command output

Field

Description

Commit ID

Commit ID of the rollback point.

Label

Label of the rollback point. This field displays a hyphen (-) if the rollback point does not have a label.

User

Username of the session.

·     For a NETCONF over SSH, NETCONF over Telnet, or NETCONF over console session that was established after scheme authentication, this field displays the username of the session. For other NETCONF sessions, this field displays a hyphen (-).

·     For SNMP and CWMP sessions, this field displays a hyphen (-).

Time stamp

Time when the rollback point was created.

 

display configuration report check-point

Use display configuration report check-point to display information about check points for reporting configuration changes.

Syntax

display configuration report check-point

Views

Any view

Predefined user roles

network-admin

network-operator

Usage guidelines

To use the configuration change report feature, you must perform the following tasks:

·     Perform NETCONF action-type operations to create configuration change check points on the device.

·     Subscribe to configuration change check points through the subscription function of the NETCONF or gRPC module.

A subscription creates one session. One subscription allows subscription to multiple configuration change check points. A subscription uses its session to report the configuration change content corresponding to each configuration change check point.

Different subscriptions can subscribe to the same configuration change check points.

Examples

# Display information about check points for reporting configuration changes.

<Sysname> system-view

[Sysname] display configuration report check-point

Check point: A1

Created at: 20230215 14:00:00

Subscription session number: 1

Last report time: 20230215 15:30:00

 

Subscription session ID                 Soure     Subscription time

100001c4b160cdb6fe5c4f7d557115a2d3dd    gRPC      20230214 15:30:00

 

 

Check point: A2

Created at: 20230115 14:00:00

Subscription session number: 3

Last report time: 20230215 15:30:00

 

Subscription session ID                 Soure     Subscription time

300001c4b160cdb6fe5c4f7d557115a2d3dd    gRPC      20230215 15:30:00

400001c4b160cdb6fe5c4f7d557115a2d3dd    NETCONF   20230216 15:30:00

500001c4b160cdb6fe5c4f7d557115a2d3dd    grpc      20230217 15:30:00

Table 4 Command output

Field

Description

Check point

Name of a configuration change check point.

Created at

Time when the configuration change check point was created.

Subscription session number

Number of subscription sessions for the configuration change check point.

Last report time

Most recent time when configuration changes were reported.

Subscription session ID

ID of a subscription session for the configuration change check point.

Soure

Source of the subscription session for the configuration change check point:

·     gRPC.

·     NETCONF.

Subscription time

Time when the configuration change check point was subscribed.

 

Related commands

configuration report interval

display configuration sessions

Use display configuration sessions to display device configuration sessions, such as CLI, NETCONF, CWMP, and SNMP sessions.

Syntax

display configuration sessions

Views

Any view

Predefined user roles

network-admin

network-operator

Examples

# Display device configuration sessions.

<Sysname> display configuration sessions

  Type       Line     User             Time               Lock

+ CLI        VTY 0    admin            May 04 09:13:33    -

  CLI        VTY 1    ad               May 04 08:55:21    *

  NETCONF    VTY 1    user1            May 04 08:55:34    -

  SNMP       -        -                May 04 08:55:20    -

  CWMP       -        -                May 04 08:55:25    -

Table 5 Command output

Field

Description

Type

Type of the session. The plus sign (+) indicates the session you are using.

For sessions established over RESTful, this field displays NETCONF.

Line

CLI user line used by the session, identified by the user line type and relative number. For information about user lines, see "Configuring CLI login."

·     For a NETCONF over SSH, NETCONF over Telnet, or NETCONF over console session, this field displays the user line used by the session. For other NETCONF sessions, this field displays a hyphen (-).

·     For SNMP and CWMP sessions, this field displays a hyphen (-).

User

Username of the session.

·     For a NETCONF over SSH, NETCONF over Telnet, or NETCONF over console session that was established after scheme authentication, this field displays the username of the session. For other NETCONF sessions, this field displays a hyphen (-).

·     For SNMP and CWMP sessions, this field displays a hyphen (-).

Time

Time when the session was established.

Lock

Whether the user of the session is in an exclusive-mode or private-mode view.

·     Asterisk (*)—The user is in an exclusive-mode view.

·     Hyphen (-)—The user is in a private-mode view.

 

display current-configuration

Use display current-configuration to display the running configuration.

Syntax

display current-configuration [ configuration [ module-name [ instance instance-name ] ] | controller | exclude-provision | interface [ interface-type [ interface-number ] ] | vpn-instance [ vpn-instance-name ] ] [ by-section { begin | exclude | include } regular-expression ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

configuration [ module-name [ instance instance-name ] ]: Specifies feature or feature instance configuration. To display the running configuration for all features, specify the configuration keyword without specifying a feature module. To display the running configuration for a feature, specify that feature without specifying a feature instance. To specify the running configuration of a feature instance, specify that instance. Values available for the instance-name argument depend on the configuration on the device. For example, VLAN 20 has been created on the device. To display the running configuration for VLAN 20, use the display current-configuration configuration vlan instance vlan20 command.

controller: Specifies OpenFlow port configuration.

exclude-provision: Excludes preprovisioned settings from the running configuration.

interface [ interface-type [ interface-number ] ]: Specifies interface configuration. The interface-type argument represents the interface type and the interface-number argument represents the interface number. If you do not specify the interface-type interface-number arguments, the command displays the running configuration for all interfaces. If you specify only the interface-type argument, the command displays the running configuration for all interfaces of this type.

vpn-instance [ vpn-instance-name ]: Specifies one or all MPLS L3VPN instances. Use the vpn-instance-name argument to specify one MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you specify the vpn-instance keyword without specifying the vpn-instance-name argument, this command displays the running configuration for all VPN instances. If you do not specify VPN instances, this command displays the running configuration for all VPN instances and the public network.

by-section: Displays the running configuration by section. Each section contains the configuration in a command view and two adjacent sections are separated by a pound sign (#). If you do not specify this keyword, the command displays the running configuration by line.

begin: Displays the first configuration section that matches the specified regular expression and all subsequent configuration sections.

exclude: Displays all configuration sections not matching the specified regular expression.

include: Displays all configuration sections matching the specified regular expression.

regular-expression: Specifies a regular expression to filter the configuration sections, a case-sensitive string of 1 to 256 characters. A section matches the specified regular expression if it contains command lines that match the specified regular expression.

Usage guidelines

Application scenarios

Use this command to verify the configuration you have made.

If the system has automatically changed the setting you have made for a parameter, this command displays the effective setting instead of the configured one. An automatic change typically occurs because of system restrictions.

This command does not display parameters that are using the default settings.

Restrictions and guidelines

Executing this command with the vpn-instance [ vpn-instance-name ] option displays only part of the running configuration for the specified VPN instances. The displayed information includes settings made on the VPN instances, interfaces associated with the VPN instances, and routing protocol settings. To obtain the complete running configuration, execute the display current-configuration command without specifying any parameters. To obtain the desired running configuration related to VPN instances, use the | include regular-expression option. With the include regular-expression option, you can specify a regular expression to identify the configuration you want to display.

When you execute the display current-configuration configuration module-name instance ? command to view the names of instances for a module, the and sign (&) and the question mark (?) in an instance name will be displayed as && and &q, respectively.

Examples

# Display local user configuration.

<Sysname> display current-configuration configuration local-user

#

local-user ftp class manage

 password hash $h$6$D5A6pqcGpnZXxFUO$OJqnqffG7m1wTH3C6v+FBCjZZBzqgJjTZlbATl1dnKNlYwFMJcWDMbDn8HD1j4XzuKggDp2LrP40kGIOvQGYhQ==

 service-type ftp

 authorization-attribute user-role network-operator

#

local-user root class manage

 password hash $h$6$GcTZyXO04qmom21z$GjeAeDMjP/xtknMLf9NHUNIvebNYR3tkd5aWS6sKbkFh/ECFJZOjh2FVUI0GW7u44fNK6Ke7ANE7dhhAFcytUQ==

 service-type ssh telnet terminal

 authorization-attribute user-role network-admin

#

return

# Display VLAN interface configuration.

<Sysname> display current-configuration interface Vlan-interface

#

interface Vlan-interface1

 ip address 192.168.1.84 255.255.255

#

return

# Display the local user configuration.

<Sysname> display current-configuration by-section include local-user

#

local-user ftp

 password hash $h$6$GcTZyXO04qmom21z$GjeAeDMjP/xtknMLf9NHUNIvebNYR3tkd5aWS6sKbkFh/ECFJZOjh2FVUI0GW7u44fNK6Ke7ANE7dhhAFcytUQ==

 service-type ftp

 authorization-attribute user-role network-operator

#

local-user root

 password hash $h$6$D5A6pqcGpnZXxFUO$OJqnqffG7m1wTH3C6v+FBCjZZBzqgJjTZlbATl1dnKNlYwFMJcWDMbDn8HD1j4XzuKggDp2LrP40kGIOvQGYhQ==

 service-type ssh telnet terminal

 authorization-attribute user-role network-admin

#

return

display current-configuration diff

Use display current-configuration diff to display the differences that the running configuration has as compared with the next-startup configuration.

Syntax

display current-configuration diff

Views

Any view

Predefined user roles

network-admin

network-operator

Usage guidelines

This command searches for the next-startup configuration in the following order:

1.     The .cfg main next-startup configuration file.

2.     The .cfg backup next-startup configuration file if the .cfg main next-startup configuration file is unavailable.

If both configuration files are unavailable, the system displays a message indicating that no next-startup configuration files exist.

Examples

# Display the differences that the running configuration has as compared with the next-startup configuration. 

<Sysname> display current-configuration diff

--- Startup configuration

+++ Current configuration

@@ -5,7 +5,7 @@

 #

  sysname Sysname

 #

-alias dhc display history-command

+alias dh display hotkey

 #

Table 6 Command output

Field

Description

- - - A

+++ B

·     A represents the source configuration for comparison, which can be Startup configuration, Current configuration, or the name of the source configuration file with its directory information.

·     B represents the target configuration for comparison, which can be Current configuration, Startup configuration, or the name of the target configuration file with its directory information.

In this example, the startup configuration and the current configuration are the source and target, respectively.

@@ -linenumber1,number1 +linenumber2,number2 @@

Location information for identifying the command line differences:

·     -linenumber1,number1—Source configuration section that contains differences. The linenumber1 argument represents the start line of the section. The number1 argument represents the number of lines between the start line and the end line of the section.

·     +linenumber2,number2—Target configuration section that contains differences. The linenumber2 argument represents the start line of the section. The number2 argument represents the number of lines between the start line and the end line of the section.

cmd1

- cmd2

+ cmd3

cmd4

Displays command differences.

·     cmd1 and cmd4—Command lines are contained in both source and target configurations if they are not prefixed with a minus (-) or plus (+) sign. They provide a context for locating command line differences.

·     - cmd2—Command lines are prefixed with a minus sign if they are contained in the source configuration but not in the target configuration.

·     + cmd3—Command lines are prefixed with a plus sign if they are contained in the target configuration but not in the source configuration.

In this example, the sample output shows that the alias dhc display history-command command is contained only in the source configuration, and the alias dh display hotkey command is contained only in the target configuration.

 

Related commands

display current-configuration

display diff

display saved-configuration

display default-configuration

Use display default-configuration to display the factory defaults.

Syntax

display default-configuration

Views

Any view

Predefined user roles

network-admin

network-operator

Usage guidelines

Factory defaults are custom basic settings that came with the device. Factory defaults vary by device models and might differ from the initial default settings for the commands.

The device starts up with the factory defaults if it does not have a next-startup configuration file or all the specified next-startup configuration files are corrupt or deleted.

Examples

# Display the factory defaults.

<Sysname> display default-configuration

display diff

Use display diff to display differences between configurations.

Syntax

display diff configfile file-name-s { configfile file-name-d | current-configuration | startup-configuration }

display diff current-configuration { configfile file-name-d | startup-configuration }

display diff startup-configuration { configfile file-name-d | current-configuration }

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

configfile file-name-s: Specifies the source configuration file for comparison.

configfile file-name-d: Specifies the target configuration file for comparison.

current-configuration: Specifies the running configuration. In the display diff current-configuration command, this keyword specifies the source configuration for comparison. In the display diff configfile file-name-s and display diff startup-configuration commands, this keyword specifies the target configuration.

startup-configuration: Specifies the next-startup configuration. In the display diff startup-configuration command, this keyword specifies the source configuration for comparison. In the display diff configfile file-name-s and display diff current-configuration commands, this keyword specifies the target configuration.

Usage guidelines

If you specify the startup-configuration keyword, the system searches for the next-startup configuration in the following order:

1.     The .cfg main next-startup configuration file.

2.     The .cfg backup next-startup configuration file if the .cfg main next-startup configuration file is unavailable.

If both configuration files are unavailable, the system displays a message indicating that no next-startup configuration files exist.

Examples

# Display the differences between startup.cfg and test.cfg.

<Sysname> display diff configfile startup.cfg configfile test.cfg

--- flash:/startup.cfg

+++ flash:/test.cfg

@@ -5,7 +5,7 @@

 #

  sysname Sysname

 #

-alias dhc display history-command

+alias dh display hotkey

<Sysname>

The output shows that the alias dhc display history-command command is contained only in startup.cfg, and the alias dh display hotkey command is contained only in test.cfg.

# Display the differences between the running configuration and the next-startup configuration.

<Sysname> display diff current-configuration startup-configuration

--- Current configuration

+++ Startup configuration

@@ -5,7 +5,7 @@

 #

  sysname Sysname

 #

-alias dhc display history-command

+alias dh display hotkey

<Sysname>

The output shows that the alias dhc display history-command command is contained only in the running configuration, and the alias dh display hotkey command is contained only in the next-startup configuration.

For the command output description, see Table 6.

Related commands

display current-configuration

display current-configuration diff

display saved-configuration

display saved-configuration

Use display saved-configuration to display the contents of the configuration file for the next system startup.

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

by-section: Displays the configuration used at the next startup by section. Each section contains the configuration in a command view and two adjacent sections are separated by a pound sign (#). If you do not specify this keyword, the command displays the configuration used at the next startup by line.

begin: Displays the first configuration section that matches the specified regular expression and all subsequent configuration sections.

exclude: Displays all configuration sections not matching the specified regular expression.

include: Displays all configuration sections matching the specified regular expression.

regular-expression: Specifies a regular expression to filter the configuration sections, a case-sensitive string of 1 to 256 characters. A section matches the specified regular expression if it contains command lines that match the specified regular expression.

Usage guidelines

Application scenarios

Use this command to verify that important settings have been saved to the configuration file for the next system startup.

Operating mechanism

This command selects the configuration file to display in the following order:

1.     If the main startup configuration file is available, this command displays the contents of the main startup configuration file.

2.     If only the backup startup configuration file is available, this command displays the contents of the backup file.

3.     If both the main and backup startup configuration files are not available, this command does not display anything.

Examples

# Display the contents of the configuration file for the next system startup.

<Sysname> display saved-configuration

#

 version 7.1.045, Release 1201

#

 sysname Sysname

#

 ftp server enable

#

 telnet server enable

#

 domain default enable system

#

vlan 1

#

domain system

#

  ---- More ----

Related commands

reset saved-configuration

save

display startup

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

Syntax

display startup

Views

Any view

Predefined user roles

network-admin

network-operator

Usage guidelines

Examples

# Display names of the startup configuration files.

<Sysname> display startup

MainBoard:

 Current startup saved-configuration file: flash:/startup.cfg(*)

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

 Next backup startup saved-configuration file: NULL

Table 7 Command output

Field

Description

MainBoard

(In standalone mode.) Displays the startup configuration files.

Current startup saved-configuration file

Configuration file that the device has started up with.

If the device started up with the binary file for a .cfg startup configuration file, this field displays that .cfg file with a bracketed asterisk (*) next to that file.

Next main startup saved-configuration file

Primary configuration file to be used at the next startup.

Next backup startup saved-configuration file

Backup configuration file to be used at the next startup.

 

Related commands

startup saved-configuration

display this

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

Syntax

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

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

by-section: Displays the running configuration in the current view by section. Each section contains the configuration in a command view and two adjacent sections are separated by a pound sign (#). If you do not specify this keyword, the command displays the running configuration in the current view by line.

begin: Displays the first configuration section that matches the specified regular expression and all subsequent configuration sections.

exclude: Displays all configuration sections not matching the specified regular expression.

include: Displays all configuration sections matching the specified regular expression.

regular-expression: Specifies a regular expression to filter the configuration sections, a case-sensitive string of 1 to 256 characters. A section matches the specified regular expression if it contains command lines that match the specified regular expression.

Usage guidelines

Application scenarios

Use this command to verify the configuration you have made in a certain view.

Restrictions and guidelines

This command does not display parameters that are using the default settings.

Some parameters can be successfully set even if their dependent features are not enabled. For these parameters, this command displays their settings after the dependent features are enabled.

This command can be executed in any user line view to display the running configuration of all user lines.

Examples

# Display the running configuration on VLAN-interface 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] display this

#

interface Vlan-interface1

#

return

reset configuration commit

Use reset configuration commit to clear rollback points.

yntax

reset configuration commit number

Views

User view

Predefined user roles

network-admin

Parameters

number: Specifies the number of the earliest rollback points to be cleared. This argument must be equal to or less than the number of existing rollback points.

Usage guidelines

说明: CAUTION

CAUTION:

Use this command with caution. You cannot restore the rollback points cleared by using this command.

 

Clear unused rollback points to free up memory space for higher system performance.

Examples

# Clear the earliest nine rollback points.

<Sysname> reset configuration commit 9

reset saved-configuration

Use reset saved-configuration to delete a next-startup configuration file.

Syntax

reset saved-configuration [ backup | main ]

Views

User view

Predefined user roles

network-admin

Parameters

backup: Specifies the backup next-startup configuration file.

main: Specifies the main next-startup configuration file.

Usage guidelines

Application scenarios

If you do not specify a configuration file attribute, the reset saved-configuration command deletes the main next-startup configuration file.

Restrictions and guidelines

If you do not specify the backup and main keywords, this command deletes a main next-startup configuration file.

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 sets the target file attribute to NULL instead of deleting the file. You can delete the main file, the backup file, or both.

(In standalone mode.) This command permanently deletes the specified next-startup configuration file from the device. As a best practice, make sure you have a configuration backup before you perform this task.

(In IRF mode.) In an IRF fabric, this command permanently deletes the specified next-startup configuration file from all IRF member devices. As a best practice, make sure you have a configuration backup before you perform this task.

Examples

# Delete the main 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 ...........

Configuration file is cleared.

Related commands

display saved-configuration

restore startup-configuration

Use restore startup-configuration to download a configuration file from a TFTP server and specify it as the main next-startup configuration file.

Syntax

restore startup-configuration from { ipv4-server | ipv6 ipv6-server } src-filename [ vpn-instance vpn-instance-name ]

Views

User view

Predefined user roles

network-admin

Parameters

ipv4-server: Specifies a TFTP server by its IPv4 address or host name. The host name is a case-insensitive string of 1 to 253 characters. Valid characters include letters, digits, hyphens (-), underscores (_), and dots (.).

ipv6 ipv6-server: Specifies a TFTP server by its IPv6 address or host name. The host name is a case-insensitive string of 1 to 253 characters. Valid characters include letters, digits, hyphens (-), underscores (_), and dots (.).

src-filename: Specifies the name of the configuration file to be downloaded. The file must be a .cfg file. The file name is a case-insensitive string of up to 255 characters.

vpn-instance vpn-instance-name: Specifies the MPLS L3VPN instance to which the TFTP server belongs. The vpn-instance-name argument is a case-sensitive string of 1 to 31 characters. If the server belongs to the public network, do not specify this option.

Usage guidelines

Prerequisites

Before restoring the configuration file for the next startup, make sure the following requirements are met:

·     The server is reachable.

·     The server is enabled with TFTP service.

·     You have read and write permissions to the server.

Operating mechanism
Restrictions and guidelines

Examples

# Download test.cfg from the IPv4 TFTP server at 2.2.2.2 in the public network, and specify the file as the main next-startup configuration file.

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

Restoring the next startup-configuration file from 2.2.2.2. Please wait...finished.

# Download test.cfg from the IPv4 TFTP server at 2.2.2.2 in MPLS L3VPN instance VPN1, and specify the file as the main next-startup configuration file.

<Sysname> restore startup-configuration from 2.2.2.2 test.cfg vpn-instance VPN1

Restoring the next startup-configuration file from 2.2.2.2. Please wait...finished.

# Download test.cfg from the IPv6 TFTP server at 2001::2 in the public network, and specify the file as the main next-startup configuration file.

<Sysname> restore startup-configuration from ipv6 2001::2 test.cfg

Restoring the next startup-configuration file from 2001::2. Please wait...finished.

Related commands

backup startup-configuration

save

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 a next-startup configuration file.

Use save [ safely ] [ backup | main ] [ force ] [ changed ]  to save the running configuration to a file in the root directory of the storage medium. This command automatically saves the file and specifies the file as a next-startup configuration file.

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 a next-startup configuration file.

Use save [ safely ] [ backup | main ] [ force ] [ changed ]  to save the running configuration to a file in the root directory of the storage medium. This command automatically saves the file and specifies the file as a next-startup configuration file.

Syntax

In standalone mode:

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

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

In IRF mode:

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

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

Views

Any view

Predefined user roles

network-admin

Parameters

file-url: Specifies a file path, a string of up to 255 characters. The file must be a .cfg file. The value length is calculated starting from the storage medium path (for example, flash:/). If the storage medium path is not provided, the system will automatically add it and then calculate whether the total length exceeds 255 characters. If you specify the all keyword or the slot slot-number option, the file path cannot include a slot number. If the file path includes a folder name, the folder must already exist. (In standalone mode.)

file-url: Specifies a file path, a string of up to 255 characters. The file must be a .cfg file. The value length is calculated starting from the storage medium path (for example, flash:/). If the storage medium path is not provided, the system will automatically add it and then calculate whether the total length exceeds 255 characters. If you specify the all keyword or the chassis chassis-number slot slot-number option, the file path cannot include a chassis or slot number. If the file path includes a folder name, the folder must already exist. (In IRF mode.)

all: Saves the running configuration. If you do not specify this keyword or the slot slot-number option, the command saves the running configuration only to the active MPU. (In standalone mode.)

all: Saves the running configuration. If you do not specify this keyword or the chassis chassis-number slot slot-number option, the command saves the running configuration only to the global active MPU in the IRF fabric. (In IRF mode.)

slot slot-number: Specifies the slot number. If you do not specify the standby MPU or the all keyword, this command saves the running configuration only to the active MPU. (In standalone mode.)

chassis chassis-number slot slot-number: Specifies an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the standby MPU. If you do not specify a standby MPU or the all keyword, this command saves the running configuration only to the global active MPU in the IRF fabric. (In IRF mode.)

safely: Saves the configuration file in safe mode. If you do not specify this keyword, the device saves the configuration file in fast mode.

backup: Saves the running configuration to a configuration file, and specifies the file as the backup next-startup configuration file. If you do not specify this keyword or the main keyword, the command specifies the saved file as the main next-startup configuration file.

main: Saves the running configuration to a configuration file, and specifies the file as the main next-startup configuration file. If you do not specify this keyword or the backup keyword, the command specifies the saved file as the main next-startup configuration file.

force: Saves the running configuration to the existing next-startup configuration file without prompting for confirmation. If you do not specify this keyword, the system prompts you to confirm the operation. If you do not confirm the 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 target file name during the process.

changed: Overwrites the target configuration file with the running configuration if an inconsistency is detected between the settings in the configuration file and the running configuration. The save command does not take effect if no inconsistency is detected. If you do not specify this keyword, the save command always overwrites the target configuration file with the running configuration.

Usage guidelines

Operating mechanism

This command saves the running configuration to an .mdb binary file as well as a .cfg text file. The two files use the same file name. An .mdb file takes less time to load than a .cfg file.

Restrictions and guidelines

If the file specified for this command does not exist, the system creates the file before saving the configuration. If the file already exists, the system prompts you to confirm whether to overwrite the file. If you choose to not overwrite the file, the system cancels the save operation.

Use the save command with caution. This command will overwrite the settings in the target configuration file. When you execute this command, carefully read the messages displayed by the system and make sure you fully understand the impact of this command on services.

When you use the save [ safely ] [ backup | main ] [ force ] [ changed ]  command, follow these guidelines:

·     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, power failure, out of memory, or out of storage space event occurs during the save operation, the next-startup configuration file is retained.

·     In fast mode, the device directly overwrites the target next-startup configuration file. If a reboot, power failure, out of memory, or out of storage space event occurs during this process, all settings in the next-startup configuration file are lost.

Safe mode is slower than fast mode, but more secure. As a best practice, specify the safely keyword for reliable configuration saving.

Examples

# Save the running configuration to backup.cfg, without specifying the file as a next-startup configuration file.

<Sysname> save backup.cfg

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

Now saving current configuration to the device.

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

Configuration is saved to device successfully.

# Save the running configuration to the main next-startup configuration file without any confirmation required.

<Sysname> save force

Validating file. Please wait....

Saved the current configuration to mainboard device successfully.

# Save the running configuration to a file in the root directory of the default storage medium, and specify the file as the main next-startup configuration file.

<Sysname> save

The current configuration will be written to the device. Are you sure? [Y/N]:y

Please input the file name(*.cfg)[flash:/backup.cfg]

(To leave the existing filename unchanged, press the enter key):test.cfg

Validating file. Please wait............

Saved the current configuration to mainboard device successfully.

Related commands

display current-configuration

display saved-configuration

save current-configuration interval

Use save current-configuration interval to enable the automatic configuration saving feature and set the automatic saving interval.

Use undo save current-configuration interval to restore the default.

Syntax

save current-configuration interval interval

undo save current-configuration interval

Default

The automatic configuration saving feature is disabled.

Views

System view

Predefined user roles

network-admin

Parameters

interval: Sets the automatic saving interval, in minutes. The value range is 10 to 525600.

Usage guidelines

This feature enables the device to automatically save the running configuration to both the .cfg and .mdb main next-startup configuration files at intervals. At each interval, the device performs an automatic saving operation only if the running configuration contains different settings than the main next-startup configuration files.

If no main next-startup configuration files exist, this feature automatically creates configuration files startup.cfg and startup.mdb to save the running configuration and specifies the files as the main next-startup configuration files.

Examples

# Enable the device to automatically save the running configuration to the .cfg and .mdb main next-startup configuration files every 60 minutes.

<Sysname> system-view

[Sysname] save current-configuration interval 60

startup saved-configuration

Use startup saved-configuration to specify a file as a next-startup configuration file.

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

Syntax

startup saved-configuration cfgfile [ backup | main ]

undo startup saved-configuration

Default

No next-startup configuration files are specified.

Views

User view

Predefined user roles

network-admin

Parameters

cfgfile: Specifies the path and name of a configuration file, a string of up to 255 characters. .The file must be a .cfg file. The value can include only the file name, or the storage medium information and file name. The value length is calculated starting from the storage medium path (for example, flash:/). If the storage medium path is not provided, the system will automatically add it and then calculate whether the total length exceeds 255 characters.

backup: Specifies the configuration file as the backup next-startup configuration file.

main: Specifies the configuration file as the main next-startup configuration file. This is the primary configuration file that the device attempts to load at startup. If the loading attempt fails, the device tries the backup next-startup configuration file.

Usage guidelines

Prerequisites
Recommended configuration

As a best practice, specify different files as the main and backup next-startup configuration files.

Restrictions and guidelines

If you do not specify the backup or main keyword, the startup saved-configuration command specifies the main next-startup configuration file.

The undo startup saved-configuration command changes the file attribute of the main and backup next-startup configuration files to NULL. However, the command does not delete the two configuration files.

You can also specify a configuration file as a next startup file when you use the save command to save the running configuration.

(In IRF mode.) In an IRF fabric, the undo startup saved-configuration command can cause an IRF split after the IRF fabric or an IRF member reboots.

Examples

# Specify the main next-startup configuration file.

<Sysname> startup saved-configuration testcfg.cfg

Please wait ....

... Done

Related commands

display startup

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
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
新华三官网