H3C vs Huawei CLI: Command Comparison for Network Engineers - 夜莺博客

H3C vs Huawei CLI: Command Comparison for Network Engineers

H3C and Huawei switches share a common ancestor, so their command-line interfaces look almost identical - but the subtle differences trip up engineers who manage both fleets. This article lines up the two CLIs side by side: system view navigation, VLAN creation, port security, MAC address lookups and verification commands, with Cisco and Ruijie included as reference points for cross-platform fluency.

System View Navigation

Both platforms use the user view / system view model, unlike Cisco's enable / configure terminal:

<Huawei> system-view
[Huawei] quit

<H3C> system-view
[H3C] quit

VLAN Configuration Side by Side

! Huawei VRP
<Huawei> system-view
[Huawei] vlan 10
[Huawei-vlan10] description Marketing
[Huawei-vlan10] quit

! H3C Comware
<H3C> system-view
[H3C] vlan 10
[H3C-vlan10] description Marketing
[H3C-vlan10] quit

! Cisco IOS (reference)
Router> enable
Router# configure terminal
Router(config)# vlan 10
Router(config-vlan)# name Marketing

Key insight: H3C's CLI mirrors Huawei's almost one-to-one for VLAN, interface and display commands - the prompts differ only in the bracket content.

Port Security Commands

! Huawei: limit MACs and block on violation
[Huawei] interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1] port-security enable
[Huawei-GigabitEthernet0/0/1] port-security max-mac-num 2
[Huawei-GigabitEthernet0/0/1] port-security protect-action shutdown

! H3C: same goal, different keywords
[H3C] interface GigabitEthernet1/0/1
[H3C-GigabitEthernet1/0/1] port-security max-mac-count 2
[H3C-GigabitEthernet1/0/1] port-security intrusion-mode blockmac

Note the vocabulary differences: max-mac-num vs max-mac-count, protect-action vs intrusion-mode.

MAC Address Lookup

<Huawei> display mac-address
<H3C> display mac-address
Router# show mac-address-table

Common Verification Commands

! interface status
display interface brief          (Huawei / H3C)
show ip interface brief          (Cisco)

! configuration
display current-configuration    (Huawei / H3C)
show running-config              (Cisco)

! ping (all platforms)
ping <IP>

Key Differences and Migration Tips

  • Huawei uses VRP, H3C uses Comware - both derived from the same heritage, so syntax migration is mostly renaming.
  • Watch command-name drift: port-security max-mac-num vs max-mac-count; display vs show prefixes are consistent within each vendor.
  • For teams that manage both, standardize on one naming convention in documentation and runbooks to avoid cross-vendor mistakes.

Related articles: H3C vs Huawei switches: Comware vs VRP, 华为静态路由配置详解, and Port mirroring on Cisco, Huawei and Arista.

原文链接:https://telecomate.com/cross-platform-network-mastery-unifying-switch-configurations-for-huawei-h3c-ruijie-and-cisco