62NOTE:Eachview-name oid-tree pair represents a view record. If you specify the same record with different MIBsubtree masks multiple times, the last configuration takes effect. Except the four subtrees in the default MIBview, you can create up to 16 unique MIB view records.Configuring basic SNMPv1 or SNMPv2c settingsFollow these steps to configure basic SNMPv1 or SNMPv2c settings:To do… Use the command… RemarksEnter system view system-view —Enable the SNMP agent snmp-agentOptionalDisabled by default.You can also enable the SNMPagent service by using anycommand that begins withsnmp-agent except the snmp-agentcalculate-password andsnmp-agent ifmib long-ifindexenable commands.Configure system informationfor the SNMP agentsnmp-agent sys-info { contactsys-contact | location sys-location |version { all |{ v1 | v2c | v3 }* } }RequiredBy default, the contact is HangzhouH3C Tech. Co.,Ltd., the physicallocation is Hangzhou, China, andthe protocol version is SNMPv3.Configure the local engine ID snmp-agent local-engineid engineidOptionalThe default local engine ID is thecompany ID plus the device ID.Create or update a MIB viewsnmp-agent mib-view { excluded |included } view-name oid-tree [ maskmask-value ]OptionalBy default, the MIB viewViewDefault is predefined and itsOID is 1.Configure SNMP access rightApproach 1: Create an SNMPcommunitysnmp-agent community { read | write }community-name [ acl acl-number |mib-view view-name ]*Approach 2: Create an SNMP group,and add a user to the SNMP group1. snmp-agent group { v1 | v2c }group-name [ read-viewread-view ] [ write-view write-view ][ notify-view notify-view ] [ aclacl-number ]2. snmp-agent usm-user { v1 | v2c }user-name group-name [ aclacl-number ]RequiredUse either approach.By default, no SNMP group exists.In approach 2, the username isequivalent to the community namein approach 1, and must be thesame as the community nameconfigured on the NMS.