频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

Cisco IOS Cookbook 中文精简版第十七章 SNMP

来源: 作者: 出处:巧巧读书 2007-04-04 进入讨论组
下一页 1 2 3 4 5 6 

17.1.  配置SNMP

提问 在路由器上启用基本的SNMP服务

回答

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#snmp-server community ORARO ro

Router(config)#snmp-server community ORARW rw

Router(config)#end

Router#

从12.0以后启用了另一种配置方式

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#snmp-server group COOKRO v1

Router(config)#snmp-server user TESTRO1 COOKRO v1

Router(config)#snmp-server group BOOKRO v2c

Router(config)#snmp-server user TESTRO2 BOOKRO v2c

Router(config)#end

注释 注意的是这里启用的仅仅是简单SNMP服务,只会响应SNMP的GET和SET请求,不会发送SNMP traps informs.由于SNMP V1和V2c都是明文传输community值所以需要后续的一些安全限制。show snmp group可以用来验证

17.2.  通过SNMP工具获得路由器信息

注释 可以使用snmpget, snmpwalk,snmpset命令直接对MIB进行查询,建议使用Solarwinds等图形化工具,暂略。

思科MIBs信息:http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml.

17.3.  为SNMP访问配置一些路由器重要信息

提问 为SNMP访问提供类似路由器位置,序列号等重要信息

回答

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#snmp-server contact Ian Brown 416-555-2943

Router(config)#snmp-server location 999 Queen St. W., Toronto, Ont.

Router(config)#snmp-server chassis-id JAX123456789

Router(config)#end

Router#

注释 无

<!--[if !supportLists]-->17.4.       <!--[endif]-->使用SNMP获得批量路由设备信息

注释 使用perl脚本来进行批量化操作,暂略

17.5.  使用控制列表来限制SNMP访问

提问 使用控制列表的方式来提高SNMP访问的安全性

回答

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#access-list 99 permit 172.25.1.0 0.0.0.255

Router(config)#access-list 99 permit host 10.1.1.1      

Router(config)#access-list 99 deny any

Router(config)#snmp-server community ORARO ro 99

Router(config)#access-list 98 permit 172.25.1.0 0.0.0.255           

Router(config)#snmp-server community ORARW rw 98

Router(config)#end

Router#

SNMP Group的方法

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#access-list 99 permit 172.25.1.0 0.0.0.255

Router(config)#access-list 99 permit host 10.1.1.1       

Router(config)#access-list 99 deny any

Router(config)#snmp-server group COOKRO v1 access 99

Router(config)#snmp-server user TESTRO1 COOKRO v1  

Router(config)#end

Router#

从12.3(2)T以后支持命名控制列表

Router2#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router2(config)#ip access-list standard SNMPACL        

Router2(config-std-nacl)#permit 172.25.1.0 0.0.0.255           

Router2(config-std-nacl)#permit host 10.1.1.1

Router2(config-std-nacl)#deny any

Router2(config-std-nacl)#snmp-server community ORARO1 ro SNMPACL

Router2(config)#end

Router2#

注释 无

Web: http://www.qqread.com/cisco/p306906.html 更多文章 更多内容请看Cisco IOS技术手册Cisco路由器配置手册Cisco交换机专题专题,或进入讨论组讨论。
下一页 1 2 3 4 5 6 
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章