Cisco的SNMP设置

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Cisco的SNMP设置
一、设置IOS设备(路由器)
config terminal 进入全局配置状态
Cdp run 启用CDP
snmp-server community dmis ro 配置本路由器的只读字串为gsunion
snmp-server community dmis rw 配置本路由器的读写字串为gsunion
snmp-server enable traps 允许路由器将所有类型SNMP Trap发送出去
snmp-server host IP-address-server traps trapcomm 指定路由器SNMP Trap的接收者为10.238.18.17,发送Trap时采用trapcomm作为字串
snmp-server trap-source loopback0 将loopback接口的IP地址作为SNMP Trap的发送源地址
logging on 起动log机制
logging IP-address-server 将log记录发送到10.238.18.17 (CW2K安装机器的IP 地址)上的syslog server
logging facility local7 将记录事件类型定义为local7
logging trap warning 将记录事件严重级别定义为从warningl开始,一直到最紧急级别的事件全部记录到前边指定的syslog server.
logging source-interface loopback0 指定记录事件的发送源地址为loopback0的IP 地址
service timestamps log datetime 发送记录事件的时候包含时间标记
enable password ******
copy running start或write terminal保存配置
1.启用SNMP:
configure terminal
snmp-server community rw/ro (example: snmp-server community public ro)
2.启用陷阱:
configure terminal
snmp-server enable traps snmp authentication
3.配置snmp
#conf t
#snmp-server community cisco ro(只读);配置只读通信字符串
#snmp-server community secret rw(读写);配置读写通信字符串
#snmp-server enable traps ;配置网关SNMP TRAP
#snmp-server host 10.254.190.1 rw ;配置网关工作站地址
二、设置CatOS设备(交换机)
在CatOS的Enable状态下,敲入
set interface sc0 VLAN ID IP address 配置交换机本地管理接口所在VLAN ID,IP 地址,子网掩码
Set cdp enable all 启用CDP
set snmp community read-only gsunion 配置本交换机的只读字串为public
set snmp community read-write-all gsunion 配置本交换机的读写字串为private set snmp trap server-ip gsunion
指定交换机SNMP Trap的接收者为网管服务器,发送Trap时采用gsunion作为字串
set snmp trap enable all 将全部类型的SNMP Trap发送出去
set snmp rmon enable 激活交换机的SNMP RMON功能
set logging server IP-address-server 将log记录发送到网管服务器的IP (CW2K安装机器的IP地址)上的syslog server
set logging level 6 将记录事件严重级别定义为从informational开始,一直到最紧急级别的事件全部记录到前边指定的syslog server
set logging server facility local7 将记录事件类型定义为local7
set logging timestamp 发送记录事件的时候包含时间标记
set logging enable 起动log机制
write terminal 显示并检查配置
保存配置
Cisco snmp配置
在IOS的Enable状态下,敲入
config terminal 进入全局配置状态
Cdp run 启用CDP
snmp-server community gsunion ro 配置本路由器的只读字串为gsunion snmp-server community gsunion rw 配置本路由器的读写字串为gsunion
snmp-server enable traps 允许路由器将所有类型SNMP Trap发送出去snmp-server host IP-address-server traps trapcomm 指定路由器SNMP Trap 的接收者为10.238.18.17,发送Trap时采用trapcomm作为字串
snmp-server trap-source loopback0 将loopback接口的IP地址作为SNMP Trap 的发送源地址
show running
copy running start或write terminal 显示并检查配置
保存配置
配置Cisco设备的SNMP代理
配置Cisco设备上的SNMP代理的步骤如下:
启用SNMP:
configure terminal
snmp-server community rw/ro (example: snmp-server community public ro) end
copy running-configstartup-config
启用陷阱:
configure terminal
snmp-server enable traps snmp authentication
end
copy running-configstartup-config
配置snmp
#conf t
#snmp-server community cisco ro(只读);配置只读通信字符串#snmp-server community secret rw(读写);配置读写通信字符串#snmp-server enable traps ;配置网关SNMP TRAP
#snmp-server host 10.254.190.1 rw ;配置网关工作站地址。

相关文档
最新文档