ITPub博客

首页 > Linux操作系统 > Linux操作系统 > snmp syslog 配置

snmp syslog 配置

原创 Linux操作系统 作者:zhubao315 时间:2008-03-25 14:27:34 0 删除 编辑
在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的接收者为 21.25.132.223,发送Trap时采用trapcomm作为字串
snmp-server trap-source loopback0 将loopback接口的IP地址作为SNMP Trap的发送源地址
show running
copy running start或write terminal 显示并检查配置
保存配置
 
配置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  21.25.132.1 rw ;配置网关工作站地址
 
1、设置路由器
#test(config)logging on
#test(config)logging trap debugging
#test(config)logging host 192.168.161.1
#test(config)logging facility local4
 
2、配置服务器
vi /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-r -m 0"
vi /etc/syslog.conf
local4.* /var/log/router.log
touch /var/log/router.log
service syslog restart

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13315261/viewspace-217140/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-03-04

  • 博文量
    4
  • 访问量
    5814