H3C vs Huawei Switch Commands: Comware vs VRP - 夜莺博客

H3C vs Huawei Switch Commands: Comware vs VRP

Engineers moving between H3C Comware and Huawei VRP usually discover the differences at the worst possible moment: a command that exists in one platform does nothing in the other, or a VLAN interface refuses to come up because of a syntax detail. This comparison maps the everyday operations - entering system view, creating VLANs and VLAN interfaces, building link aggregation, saving configuration and configuring management access - and highlights the traps that cause outages when a template written for one vendor is pasted into the other. Both lineages share the same Comware ancestry, but Huawei's VRP has diverged in interface naming, file system handling and a number of default behaviours.

The shared foundation

Both operating systems inherit from the Comware family, so the skeleton is identical: system-view enters configuration mode, quit walks back up, return jumps to user view, and display replaces show. Three-tier command levels (user view, system view, context view) are the same concept on both platforms.

Core command mapping

The table below covers the operations that appear in almost every deployment.

  • Hostname: sysname SW1 on both - identical.
  • VLAN creation: H3C uses vlan 10 then name MGMT; Huawei uses vlan 10 then name MGMT - identical syntax, but H3C also supports vlan 10 to 20 whereas Huawei expects vlan batch 10 to 20.
  • Access port: H3C port link-type access + port access vlan 10; Huawei port link-type access + port default vlan 10. The access vs default keyword is the single most common paste error.
  • Trunk port: H3C port link-type trunk + port trunk permit vlan 10 20; Huawei port link-type trunk + port trunk allow-pass vlan 10 20.
  • VLAN interface: H3C interface Vlan-interface 10; Huawei interface Vlanif 10. Related interface names differ too: H3C Layer 3 aggregation is Route-Aggregation 1, Huawei uses Vlanif plus Eth-Trunk with undo portswitch for a routed LAG.
  • Link aggregation: H3C interface Bridge-Aggregation 1 with link-aggregation mode dynamic; Huawei interface Eth-Trunk 1 with the same mode keyword.

Saving and comparing configuration

# H3C Comware
[sysname] save
[sysname] display current-configuration
[sysname] display saved-configuration

# Huawei VRP
[Huawei] save
[Huawei] display current-configuration
[Huawei] display saved-configuration

The commands look the same, but the file handling differs: Comware writes startup.cfg and supports display diff style comparisons in newer releases, while VRP centralises files in the flash: file system and uses compare configuration to diff running against saved. When automating either platform, always verify which file the boot loader is pointed at before declaring a change persistent.

Management plane differences

H3C configures SSH with ssh server enable and a local user of type network-admin. VRP requires the same but also enforces user-interface vty authentication mode and frequently needs stelnet server enable before the transport is usable. On VRP, a failed login is more often a missing aaa local-user privilege level than a transport problem.

Migrating templates safely

The practical rule: treat the two languages as dialects, never synonyms. Grep a template for the keywords default vlan, allow-pass, Eth-Trunk, Vlanif and undo before applying it to the other vendor, and test on a lab port first. If you run both platforms in one campus, keep the migration mapping documented - see H3C Comware QoS trust and mapping and 华为交换机 iStack 堆叠配置 for platform-specific examples.

原文链接:https://www.linknewnet.com/blog/h3c-vs-huawei-switch-comparison