华为配置SNMP
华为配置SNMP
一、网络拓扑图
第一步:基本配置
sys
[Agent-GigabitEthernet0/0/0]ip address 10.1.1.254 24
第二步:开启Agent服务
[Agent]snmp-agent //开启Snmp Agent服务
[Agent]dis snmp-agent sys-info //查看SNMP信息
The contact person for this managed node:
R&D Shenzhen, Huawei Technologies Co., Ltd.
The physical location of this node:
Shenzhen China
SNMP version running in the system:
SNMPv1 SNMPv2c SNMPv3
第三步:配置SNMP版本
[Agent]snmp-agent sys-info version V3 //使用配置SNMP版本
[Agent]display snmp-agent sys-info version//配置完成后查看Agent信息
SNMP version running in the system:
SNMPv3
第四步:配置NMS管理权限
[Agent]acL 2000
[Agent-acl-basic-2000]rule 5 permit source 10.1.1.2 0.0.0.255
[Agent-acl-basic-2000]rule 10 deny source 10.1.1.1 0.0.0.255
[Agent]snmp-agent usm-user V3 user group acl 2000 //配置用户组为group,用户名为user,指定使用ACL2000
[Agent]dis snmp-agent usm-user //配置完成后,查看SNMPv3用户信息
User name: user
Engine ID: 800007DB03000000000000
Group name: group
Authentication mode: No authentication mode, Privacy mode: No privacy mode
Storage type: nonVolatile
User status: active
Acl: 2000
Total number is 1
第五步:配置向SNMP Agent 输出Trap信息
[Agent]snmp-agent target-host trap-hostname adminNMS2 address 10.1.1.2 udp-port 9991 trap-paramsname trapNMS2
[Agent] snmp-agent trap enable //开启设备的告警开关
Info: All switches of SNMP trap/notification will be open. Continue? [Y/N]:Y
[Agent]snmp-agent trap queue-size 200 //设置告警消息的队列长度为200
[Agent]snmp-agent trap life 240 //设置报文消息的保存时间240秒
[Agent]snmp-agent sys-info contact call admin 400-822-9999
[Agent]snmp-agent sys-info location chengduChina
[Agent]dis snmp-agent sys-info //查看系统信息
The contact person for this managed node:
call admin 400-822-9999
The physical location of this node:
chengduChuna
SNMP version running in the system:
SNMPv3