MIB Viewer

Huawei

Huawei's VRP operating system (used across most Huawei switches and routers) has its own distinct command style - system-view instead of Cisco's configure terminal, and snmp-agent instead of snmp-server as the command prefix. If you're coming from Cisco or Arista, expect the concepts to be familiar but almost none of the actual keywords to match.

Entering configuration mode

<HUAWEI> system-view
[HUAWEI] snmp-agent

The bare snmp-agent command itself enables the SNMP agent - VRP doesn't turn SNMP on implicitly just because you've configured a community, unlike IOS.

SNMPv1/v2c (communities)

VRP requires you to explicitly declare which protocol versions are active before communities of that version will work:

[HUAWEI] snmp-agent sys-info version v2c
[HUAWEI] snmp-agent community read comaccess acl 2001
[HUAWEI] snmp-agent community write mgr acl 2001

Unlike Cisco's optional ACL restriction, an ACL argument is a standard, expected part of the Huawei community command - acl 2001 above ties the community to a numbered basic ACL defining which source addresses may use it:

[HUAWEI] acl 2001
[HUAWEI-acl-basic-2001] rule permit source 10.0.0.0 0.0.0.255
[HUAWEI-acl-basic-2001] quit

SNMPv3

[HUAWEI] snmp-agent sys-info version v3
[HUAWEI] snmp-agent group v3 MYGROUP privacy
[HUAWEI] snmp-agent usm-user v3 MYUSER MYGROUP
[HUAWEI] snmp-agent usm-user v3 MYUSER authentication-mode sha MYAUTHPASS
[HUAWEI] snmp-agent usm-user v3 MYUSER privacy-mode aes128 MYPRIVPASS

privacy on the group (matching Cisco's priv) requires both authentication and encryption; the user is created, associated with the group, and then has its authentication and privacy credentials set as separate follow-up commands rather than all in one line.

Sending traps

[HUAWEI] snmp-agent trap enable
[HUAWEI] snmp-agent target-host trap address udp-domain 192.168.1.100 params securityname comaccess v2c

snmp-agent trap enable must be run before any traps are sent at all, regardless of what's configured below it - a commonly missed step when traps don't seem to be arriving despite an apparently-correct target-host line.

Model/platform differences

This snmp-agent-based syntax is shared across VRP-based platforms - the Huawei enterprise switch and router lines (S-series, AR-series) and the CloudEngine data-center switch line both use it, though CloudEngine (VRP8-based) organizes some of the more advanced SNMPv3 target-host options slightly differently from the classic VRP5 command set used on older S-series hardware. For a specific platform and firmware version, checking that model's own command reference before assuming full parity is worth the extra step given how much the SNMP command set has grown across VRP releases.