Mengaktifkan SNMP di Huawei VRP OS

Aktifkan SNMP menjadi v2c by default adalah v3

[Switch] snmp-agent sys-info version v2c

Konfigurasi Interface yang di izinkan untuk menerima traffic SNMP

[Switch] snmp-agent protocol source-interface vlanif 10

Buat ACL untuk membatasi akses SNMP server yang boleh grep

[Switch] acl 2001
[Switch-acl-basic-2001] rule permit source 172.19.19.210 0
[Switch-acl-basic-2001] rule deny
[Switch-acl-basic-2001] quit

Konfigurasi spesifik MIB object yang bisa diakses oleh NMS

[WARSCLOUD-SW] snmp-agent mib-view included allow-system system
[WARSCLOUD-SW]snmp-agent mib-view included allow-interface interfaces

Buat community

[WARSCLOUD-SW]snmp-agent community read warscloud-readsys mib-view allow-system acl 2001

[WARSCLOUD-SW]snmp-agent community write warscloud-writeiface mib-view allow-interface acl 2001
[WARSCLOUD-SW]snmp-agent trap enable
Warning: All switches of SNMP trap/notification will be open. Continue? [Y/N]:y
[WARSCLOUD-SW]snmp-agent target-host trap address udp-domain 172.19.19.210 params securityname warscloud-readsys v2c