18.3-SNMP原理与配置
一、SNMP配置
R1配置命令:
开启snmp-agent,配置版本,不指定版本默认开启所有
[R1]snmp-agent
[R1]snmp-agent sys-info version ?
all Enable the device to support SNMPv1, SNMPv2c and SNMPv3
v1 Enable the device to support SNMPv1
v2c Enable the device to support SNMPv2c
v3 Enable the device to support SNMPv3
[R1]snmp-agent sys-info version v2c
配置ACL只允许某个IP的网管软件访问,增加安全性,可选配置
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.6.110 0
192.168.6.110是网管系统的IP地址
配置读密码和写密码
[R1]snmp-agent community read 123 acl 2000
[R1]snmp-agent community write 456 acl 2000
配置Trap
[R1]snmp-agent target-host trap-hostname esight address 192.168.6.110 udp-port 162 trap-paramsname 789
[R1]snmp trap enable
Info: All switches of SNMP trap/notification will be open. Continue? [Y/N]:y
[R1]snmp trap source g0/0/0
[SW1]snmp-agent
[SW1]snmp-agent sys-info version v2c
[SW1]snmp-agent community read 123
[SW1]snmp-agent community write 456
交换机配置Trap
snmp-agent trap enable feature-name ?
自定义哪些项目变化时发送告警消息,默认全部开启
[SW1]snmp-agent target-host inform address udp-domain 192.168.6.110 source Vlanif 1 params securityname 789 v2c
[SW1]snmp trap enable
[SW1]snmp-agent trap source vlanif 1
community读写密码要不同,否则会被覆盖
二、配置验证
[SW1]dis snmp-agent sys-info
[SW1]dis snmp sys-info
三、eSight添加被管理设备
(1)SNMP模板配置、Telnet模板配置
(2)选择配置好的SNMP模板、Telnet模板
发表评论