Huawei CloudEngine – configuration basics.

By | 26.05.2019


This note was written to help network engineers to understand Huawei CloudEngine switches configuration basics.

There are different command views in Huawei VRP OS :

User view

˂HUAWEI>

In the user view, you can view the running status and statistics of the device.

system-view

[~HUAWEI]

In the system view, you can set the system parameters of the device. CloudEngine series switches have two-stage configuration mode enabled by default.

system-view immediately

[HUAWEI]

In immediately view all commands are applied in one stage mode.

Let’s configure the port in the two-stage mode:

Show active config:

[~HUAWEI]display current

View current interface config:

[~HUAWEI]int 10GE 0/0/38
[~HUAWEI-10GE0/0/38]display this 
#
interface 10GE0/0/38
 description default-config
 shutdown

Disable port:

[~HUAWEI]int 10GE 0/0/38
[~HUAWEI-10GE0/0/38]
[~HUAWEI-10GE0/0/38]undo shut
[*HUAWEI-10GE0/0/38]

Checking config changes:

[*HUAWEI-10GE0/0/38]display configuration candidate changes
Building configuration
  #
  interface 10GE0/0/38
-  shutdown
  #
[*HUAWEI-10GE0/0/38]

Checking all config, including current config changes:

[*HUAWEI]display configuration candidate merge

Clear all changes made:

[*HUAWEI]clear configuration candidate

Apply changes made:

[*HUAWEI]commit

Apply changes made with trial period of 5 minutes:

[*HUAWEI]commit trial 300
Info: The system enters the trial configuration mode.
The system will revert to previous configuration if the trial configuration is not confirmed in 300 seconds. 

Cancel trial config and rollback immediately:

[~HUAWEI]abort trial 
Warning: The trial configuration will be rolled back. Continue? [Y/N]:y
Info: The trial configuration rollback succeeded.

Save config :

[~HUAWEI]q
˂HUAWEI>save
Warning: The current configuration will be written to the device. Continue? [Y/N]:y
Now saving the current configuration ........
Info: Save the configuration successfully.

Rollback config to last one:

˂HUAWEI>rollback configuration last 1
Warning: This operation will revert configuration changes to the previous status. Continue? [Y/N]:y
Loading rollback changes
Committing
Check rollback result
Configuration rollback succeeded.
Please use 'display configuration commit changes last 1' to view the changes.

Show commit list :

˂HUAWEI>display configuration commit list

View changes made in last commit:

˂HUAWEI>display configuration commit changes last 1
Building configuration
  #
  interface 10GE0/0/38
+  shutdown

History of config change in all commits:

˂HUAWEI>display configuration commit changes
Building configuration
Commit changes of commitId 1000001274 2019-05-26 13:48:57+03:00
  #
  interface 10GE0/0/38
-  shutdown
  #

Commit changes of commitId 1000001273 2019-05-26 13:46:11+03:00
  #
  interface 10GE0/0/38
+  shutdown
  #

Changes made in particular commit:

˂HUAWEI>display configuration commit changes at 1000001252
Building configuration
  #
- vlan batch 4038 4043 to 4045
  #
+ vlan batch 4033 4038 4043 to 4045

Show changes made from specified commit to current one:

˂HUAWEI>display configuration commit changes since 1000000810

View changes made in last 4 commits:

 ˂HUAWEI>display configuration commit changes last 4


Huawei VRP OS also has an alias feature, it can save your time. I mainly work with Juniper, so I use short aliases similar to Junos:

command alias
 alias shc1 command "display configuration commit changes last 1"
 alias shch command " display configuration candidate changes"
 alias show command display
 alias shr command "display current"
 alias sht command "display this"

Leave a Reply

Your email address will not be published. Required fields are marked *