H3C vs Huawei CLI: VLAN, Link Aggregation and Save Commands - 夜莺博客

H3C vs Huawei CLI: VLAN, Link Aggregation and Save Commands

H3C Comware and Huawei VRP are close siblings, which makes them more dangerous to work across than two completely different CLIs: the commands look right, autocomplete accepts them, and a subtle keyword difference quietly does something else. This is a working command map for the three areas engineers touch first on a new site — VLAN and port membership, link aggregation, and saving the configuration.

VLAN and port membership

Task H3C Comware Huawei VRP
Create VLANs vlan 10 20 vlan batch 10 20
Access port port link-type access + port default vlan 10 port link-type access + port default vlan 10
Trunk port port link-type trunk + port trunk permit vlan 10 20 port link-type trunk + port trunk allow-pass vlan 10 20
Native VLAN on trunk port trunk pvid vlan 99 port trunk pvid vlan 99
Hybrid port port link-type hybrid + port hybrid vlan 10 untagged port link-type hybrid + port hybrid untagged vlan 10
Show VLANs display vlan all display vlan

The permit versus allow-pass difference on trunk ports is the single most common copy-paste error between the two platforms. Hybrid port syntax also reverses the word order, which autocomplete will not forgive.

Link aggregation

# H3C Comware - static LAG
interface Bridge-Aggregation 1
 link-aggregation mode dynamic
interface GigabitEthernet1/0/1
 port link-aggregation group 1

# Huawei VRP - static LAG (Eth-Trunk)
interface Eth-Trunk 1
 mode lacp-static
interface GigabitEthernet0/0/1
 eth-trunk 1

Both platforms distinguish static and dynamic (LACP) aggregation, but the container interface is named differently and the member command differs. Verify with display link-aggregation verbose on H3C and display eth-trunk 1 on VRP, and always confirm that the member ports show Selected rather than Unselected — an Unselected member means an attribute mismatch.

Saving and leaving configuration mode

# H3C
<H3C> save
The current configuration will be written to the device. Continue? [Y/N]:y
<H3C> display saved-configuration

# Huawei
<HUAWEI> save
<HUAWEI> display saved-configuration

Both platforms hold changes in running-config only until you save. Reboot without saving and the change vanishes — a scenario that produces "the config was there yesterday" tickets on both platforms equally. On H3C you can also use save force in scripts to skip the confirmation prompt.

Reference discipline

Keep a one-page command map per platform pair at the site, and never assume a command exists because it exists on the sibling platform. On both systems, display current-configuration | include <keyword> is the fastest way to confirm what is really configured before changing anything.

Related reading: H3C vs Huawei CLI command comparison, 华为交换机恢复出厂设置三种方法, LACP hashing and load balancing.

原文链接:https://blog.router-switch.com/2023/06/master-the-basic-command-configurations-of-huawei-h3c-ruijie-and-cisco-switches-with-router-switch-com/