Hello Dear,
Check it to config SNMPv1 e SNMPv2c :
https://support.huawei.com/hedex/hdx.do?docid=EDOC1100047618&id=EN-US_TASK_0248176533&lang=enCheck it to config SNMPv3 :
https://support.huawei.com/hedex/hdx.do?docid=EDOC1100047618&id=EN-US_TASK_0248176482&lang=enRecommended you use SNMPv3
Procedure
• Commission the inband network management on the device.
1. Configure the IP address of the inband network management port.
The upstream port (inband network management port) is 0/2/0, the VLAN ID is 1000, the VLAN type is standard VLAN, and the IP address is 10.50.1.10/24.
huawei(config)#vlan 1000 standard
huawei(config)#port vlan 1000 0/2 0
huawei(config)#interface vlanif 1000
huawei(config-if-vlanif1000)#ip address 10.50.1.10 255.255.255.0
huawei(config-if-vlanif1000)#quit
If the packet transmitted from the upstream port is untagged, run the native-vlan command to configure the native VLAN of the upstream port to be the same as the VLAN of the upstream port.
2. Bound the source interface.
Run sysman server source command to bound the source interface.
huawei(config)#sysman server source snmp vlanif 1000
3. Add a route for the inband network management.
Use the static route. The destination IP address is 10.10.1.0/24 (the network segment to which the NCE belongs), and the gateway IP address is 10.50.1.1/24 (the IP address of the gateway of the EA5801E).
huawei(config)#ip route-static 10.10.1.0 24 10.50.1.1
4. Set the SNMP parameters.
a. Configure the community name and the access authority.
The read community name is Public_12345, and the write community name is Private_12345.
The configurations of the read community name and the write community name must be the same as the configurations on the NCE.
huawei(config)#snmp-agent community read Public_12345
huawei(config)#snmp-agent community write Private_12345
b. (Optional) Set the ID and the contact means of the administrator.
The contact means of the administrator is 075512345678.
huawei(config)#snmp-agent sys-info contact 075512345678
c. (Optional) Set the location of the device.
The location of the device is Shenzhen_China.
huawei(config)#snmp-agent sys-info location Shenzhen_China
d. Set the SNMP version.
• The SNMP version is SNMPv1.
huawei(config)#snmp-agent sys-info version v1
• The SNMP version is SNMPv2c.
huawei(config)#snmp-agent sys-info version v2c
e.
f. The SNMP version must be the same as the SNMP version set on the NCE.
5. Enable the function of sending traps.
On the EA5801E, enable the function of sending traps to the NCE.
huawei(config)#snmp-agent trap enable standard
6. Configure the IP address of the destination host for the traps.
• When the SNMP V1 is used, the host name is test0001, the IP address of the host is 10.10.1.10/24 (IP address of the NCE), the trap parameter name is ABC, SNMP version is V1, and the parameter security name is Private_12345 (the parameter security name is the SNMP community name).
• huawei(config)#snmp-agent target-host trap-hostname test0001 address 10.10.1.10 trap-paramsname ABC
huawei(config)#snmp-agent target-host trap-paramsname ABC v1 securityname Private_12345
• When the SNMPv2c is used, the host name is test0001, the IP address of the host is 10.10.1.10/24 (IP address of the NCE), the trap parameter name is ABC, SNMP version is v2c, and the parameter security name is Private_12345 (the parameter security name is the SNMP community name).
• huawei(config)#snmp-agent target-host trap-hostname test0001 address 10.10.1.10 trap-paramsname ABC
huawei(config)#snmp-agent target-host trap-paramsname ABC v2c securityname Private_12345
1. Configure the IP address of the VLAN interface as the source address for sending traps.
Enable the forwarding of the SNMP packets from the L3 interface of VLAN 1000 of the EA5801E.
huawei(config)#snmp-agent trap source vlanif 1000
2. Save the data.
huawei(config)#save