01-Fundamentals Configuration Guide

HomeSupportSwitchesS6550X-HI SeriesConfigure & DeployConfiguration GuidesH3C S6550X-HI Configuration Guides-R1116Pxx-6W10001-Fundamentals Configuration Guide
09-Target configuration management configuration

Managing target configuration

About target configuration

Target configuration enables you to configure and verify intended settings before merging them into the running configuration.

You can configure target configuration command lines in the following views:

·     Private-mode system view and its lower-level views.

·     Exclusive-mode system view and its lower-level views.

Commands available for real-time configuration are all available for target configuration.

Support for command lines in private-mode system view and in exclusive-mode system view depends on the device model. In private-mode system view and in exclusive-mode system, you do not need to commit hardware-related command lines and action command lines, because they take effect immediately.

Private-mode views and exclusive-mode views have an extra tilde sign (~) in their prompts as compared to their counterpart real-time-mode views. For more information about views, see "Using the CLI."

Committing the target configuration command lines

About this task

A commit operation commits all target configuration command lines. After a successful commit operation, the system creates a configuration rollback point.

Restrictions and guidelines

As a best practice, do not execute the commit command frequently. The system creates a configuration rollback point after each successful commit operation. Executing the command frequently increases device load and might cause commit failures.

Procedure

1.     (Optional.) Specify the maximum number of rollback points:

a.     Enter real-time-mode system view.

system-view

b.     Set the maximum number of rollback points.

configuration commit max-number max-number

By default, the maximum number of rollback points is 100.

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

c.     Return to user view.

quit

2.     Enter private-mode system view or exclusive-mode system view.

system-view { exclusive | private }

3.     Configure features as required.

For more information about configuring features, see the configuration guides.

4.     (Optional.) Display target configuration command lines.

display target-configuration

Incorrect target configuration command lines will affect the operation of the network. Use this command to verify that all target configuration command lines are correct.

5.     (Optional.) Refresh uncommitted target configuration.

refresh target-configuration

6.     Commit the target configuration command lines.

commit [ best-effort ] [ force ] [ label labelname ] [ save-running filename ] [ confirmed [ seconds ] | [ minutes minutes ] ] [ show-error ] [ clear-error ] [ description text ]

7.     (Optional.) Roll back the running configuration.

configuration replace { file filename | last number | commit-id commit-id | label labelname }

 

CAUTION

CAUTION:

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

 

To reclaim target configuration command lines that have been committed, use this command to roll back the running configuration as required.

Verifying and maintaining target configuration

Displaying and clearing rollback point information

Perform display tasks in any view.

·     Display the configuration differences between a rollback point and the running configuration or between two rollback points.

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

·     Display rollback point information.

display configuration commit list [ number | label ] [ verbose ]

To clear old rollback points, execute the following command in user view:

reset configuration commit number

 

CAUTION

CAUTION:

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

Displaying and clearing target configuration

To display the target configuration command lines, execute the following command in private-mode system view, exclusive-mode system view, or their lower-level views:

display target-configuration [ diff | failure [ brief ] | merge | success ]

To clear the target configuration command lines, execute the following command in private-mode system view, exclusive-mode system view, or their lower-level views:

reset target-configuration [ command [ text ] ]

 

CAUTION

CAUTION:

Use this command with caution. You cannot restore the target configuration command lines cleared by using this command. To use these command lines, you must reconfigure them.

Displaying configuration session information

To display device configuration sessions, such as CLI, NETCONF, and SNMP sessions, execute the following command in any view:

display configuration sessions

Target configuration management examples

Example: Committing the target configuration command lines

Network configuration

Preconfigure VLAN 100 and VLAN-interface 100 on the device for endpoint access in VLAN 100, verify the configuration, and then merge them into the running configuration.

Procedure

# Enter exclusive-mode system view.

<Sysname> system-view exclusive

# Display the target configuration command lines. Verify that no target configuration command lines are displayed.

~[Sysname] display target-configuration

~[Sysname]

# Create VLAN 100 and VLAN-interface 100, and assign IP address 3.3.3.4/16 to the VLAN interface.

~[Sysname] vlan 100

~[Sysname-vlan100] quit

~[Sysname] interface vlan-interface 100

~[Sysname-Vlan-interface100] ip address 3.3.3.4 16

~[Sysname-Vlan-interface100] quit

# Display the target configuration command lines. Verify that the target configuration command lines for VLAN 100 and VLAN-interface 100 are displayed.

~[Sysname] display target-configuration

vlan 100

interface Vlan-interface100

 ip address 3.3.3.4 16

~[Sysname]

# Verify that the configuration for VLAN 100 and VLAN-interface 100 has not taken effect.

~[Sysname] display interface vlan-interface brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface                         Link Protocol Primary IP        Description

Vlan1                             UP   UP       169.254.134.177

# Commit the target configuration command lines.

~[Sysname]commit

Verifying the configuration

# Display the target configuration command lines. Verify that the target configuration command lines for VLAN 100 and VLAN-interface 100 are no longer displayed.

~[Sysname] display target-configuration

~[Sysname]

# Verify that the configuration for VLAN 100 and VLAN-interface 100 has taken effect.

~[Sysname] display interface vlan-interface brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface                         Link Protocol Primary IP        Description

Vlan1                             UP   UP       169.254.134.177

Vlan100                           DOWN DOWN     3.3.3.4

Example: Clearing the target configuration command lines

Network configuration

After preconfiguring VLAN 100, VLAN 200, VLAN-interface 100, and VLAN-interface 200, you find that the configuration for VLAN 200 and VLAN-interface 200 is not required. You need to clear the target configuration command lines for VLAN 200 and VLAN-interface 200, and then commit the target configuration command lines for VLAN 100 and VLAN-interface 100.

Procedure

# Enter exclusive-mode system view.

<Sysname> system-view exclusive

# Display the target configuration command lines. Verify that no target configuration command lines are displayed.

~[Sysname] display target-configuration

~[Sysname]

# Create VLAN 100 and VLAN-interface 100, and assign IP address 3.3.3.4/16 to the VLAN interface.

~[Sysname] vlan 100

~[Sysname-vlan100] quit

~[Sysname] interface vlan-interface 100

~[Sysname-Vlan-interface100] ip address 3.3.3.4 16

~[Sysname-Vlan-interface100] quit

# Create VLAN 200 and VLAN-interface 200, and assign IP address 4.4.4.4/16 to the VLAN interface.

~[Sysname] vlan 200

~[Sysname-vlan200] quit

~[Sysname] interface vlan-interface 200

~[Sysname-Vlan-interface200] ip address 4.4.4.4 16

~[Sysname-Vlan-interface200] quit

# Display the target configuration command lines. Verify that the target configuration command lines for VLAN 100, VLAN 200, VLAN-interface 100, and VLAN-interface 200 are displayed.

~[Sysname] display target-configuration

vlan 100

interface Vlan-interface100

 ip address 3.3.3.4 16

vlan 200

interface Vlan-interface200

 ip address 4.4.4.4 16

~[Sysname]

# Clear the target configuration command lines for VLAN 200 and VLAN-interface 200.

 

IMPORTANT

IMPORTANT:

To clear all target configuration command lines, use the reset target-configuration command.

 

~[Sysname] reset target-configuration command vlan 200

# Display the target configuration command lines. Verify that the target configuration command lines for VLAN 200 and VLAN-interface 200 have been cleared.

~[Sysname] display target-configuration

vlan 100

interface Vlan-interface100

 ip address 3.3.3.4 16

~[Sysname]

# Commit the target configuration command lines.

~[Sysname] commit

Verifying the configuration

# Verify that the target configuration command lines have taken effect.

~[Sysname] display interface vlan-interface brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface                         Link Protocol Primary IP        Description

Vlan1                             UP   UP       169.254.134.177

Vlan100                           DOWN DOWN     3.3.3.4

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网