H3C vs Huawei CLI Command Comparison: A Practical Mapping Table - 夜莺博客

H3C vs Huawei CLI Command Comparison: A Practical Mapping Table

H3C Comware and Huawei VRP share a common ancestor in the Chinese networking industry, so their CLIs look almost identical - but the differences are exactly where engineers get burned: interface naming conventions, VLAN port commands, save options and view structures. If you maintain both brands (very common in Chinese enterprise networks), this command mapping table will save you from typing the wrong command on the wrong device. Every command below is real VRP and Comware syntax, verified on Huawei S5700/CE switches and H3C S5130/S5560 switches.

System Views and Basic Navigation

Function Huawei VRP H3C Comware
Enter system view system-view system-view
Exit one level quit quit
Return to user view return return
Set hostname sysname SW-A sysname SW-A
Display version display version display version
Display current config display current-configuration display current-configuration
Save configuration save save force
Delete saved config reset saved-configuration reset saved-configuration
Undo a command undo <cmd> undo <cmd>

Interface Naming Differences (Watch Out!)

The biggest trap: the two vendors number interfaces differently.

  • Huawei: interface GigabitEthernet0/0/1 (slot/port, subcard 0)
  • H3C: interface GigabitEthernet1/0/1 (frame/slot/port - first frame number is 1)
  • Huawei S5700 10G: interface XGigabitEthernet0/0/1
  • H3C 10G: interface Ten-GigabitEthernet1/0/1

For 40G ports: Huawei uses 40GE0/0/1, H3C uses FortyGigE1/0/1. Both vendors support the short form GE0/0/1 / GE1/0/1.

VLAN Configuration Mapping

Function Huawei VRP H3C Comware
Create VLAN vlan 10 vlan 10
Create VLAN range vlan batch 10 to 20 vlan batch 10 to 20
Name VLAN name Sales name Sales
Set access port port link-type access port link-type access
Assign access VLAN port default vlan 10 port access vlan 10
Set trunk port port link-type trunk port link-type trunk
Allow VLANs on trunk port trunk allow-pass vlan 10 20 port trunk permit vlan 10 20
Native VLAN on trunk port trunk pvid vlan 1 port trunk pvid vlan 1
Show VLANs display vlan display vlan

Note the two classic differences: Huawei uses port default vlan, H3C uses port access vlan for the access VLAN, and Huawei uses allow-pass, H3C uses permit on trunks.

Routing and Link Aggregation

Function Huawei VRP H3C Comware
Static route ip route-static 10.1.0.0 24 192.168.1.1 ip route-static 10.1.0.0 24 192.168.1.1
Default route ip route-static 0.0.0.0 0 192.168.1.1 ip route-static 0.0.0.0 0 192.168.1.1
Create Eth-Trunk interface Eth-Trunk1 interface Bridge-Aggregation1
Add member (LACP) eth-trunk 1 (in interface) link-aggregation group 1 mode dynamic
Show routes display ip routing-table display ip routing-table
Show trunk display eth-trunk 1 display link-aggregation verbose

Huawei aggregates with Eth-Trunk, H3C with Bridge-Aggregation - a very common source of confusion in multi-vendor networks.

Operational and Troubleshooting Commands

Function Huawei VRP H3C Comware
Ping ping 10.0.0.1 ping 10.0.0.1
Traceroute tracert 10.0.0.1 tracert 10.0.0.1
Interface status display interface brief display interface brief
MAC table display mac-address display mac-address
Log buffer display logbuffer display logbuffer
Clear interface counters reset counters interface reset counters interface

Translation Cheat Sheet

  • Huawei port default vlan ↔ H3C port access vlan
  • Huawei allow-pass ↔ H3C permit
  • Huawei Eth-Trunk ↔ H3C Bridge-Aggregation
  • Huawei GE0/0/1 ↔ H3C GE1/0/1 (frame numbering)
  • Huawei save ↔ H3C save force

More CLI fundamentals: H3C Comware CLI basics and Huawei VRP common commands.

原文链接:https://www.h3c.com/cn/Support/Resource_Center/