SNMP协议.doc_第1页
SNMP协议.doc_第2页
SNMP协议.doc_第3页
SNMP协议.doc_第4页
SNMP协议.doc_第5页
免费预览已结束,剩余10页可下载查看

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

一、总体把握1、基于TCP/IP的网络管理的四个组成部分(1) 管理信息库(MIB),包含代理进程可能被查询或修改的所有参数,即被管理对象的参数。(2) 管理信息结构(SMI),管理信息是一个被管理对象的集合,SMI定义了一个设备维护的规则集,用于对被管理对象进行命名和编码。(3) SNMP协议,管理进程和代理进程之间的通信协议。SNMP协议是应用层协议,其下层协议一般为UDP,管理进程端口号为162,代理进程端口号为161。(4) 安全机制,在SNMPv1中安全机制很简单,v2和v3在安全机制上作了一些改善。2、管理信息库和管理信息结构(1) 管理信息结构之于管理信息库类似于模式之于数据库。管理信息结构定义了每一个对象“看上去像什么”,管理信息库则说明每个对象“是什么”。(2) 管理信息库的变量。有两种变量,一是简单变量,一是表格。简单变量对应于MIB树中的叶子结点,其标识方法是在其对象标识后面添加“.0”;表格的标识方法是采用联合索引的方式。3、SNMP协议和安全机制(1) SNMP协议主要有五种报文get、getnext、set、getresponse,trap。其中前三种报文是管理进程发出的;后两种是代理进程发出的。(2) 安全机制,SNMPv1采用了“共同体”的字段作为管理进程和代理进程的鉴别密码,只有具有相应的“共同体名”,才有访问权限,这种方式只是简单的明文交换方式;SNMPv2 的安全机制没有本质的改进;SNMPv3提出了新的安全机制,同时还有一套专门的网络安全和访问控制规则。二、SNMP网络管理工具1、snmpget是管理进程从代理进程获取信息的命令。例如:snmpget -c public localhost system.sysDescr.0system.sysDescr.0 = Unknown-c 指明共同体字符串。2、snmpgetnext3、snmpset4、snmptrap5、snmpwalk6、snmptranslate三、SNMP体系结构1、体系结构可满足的应用需求(1) 只具有命令应答器和通知产生器应用程序的SNMP实体(传统的代理端Agent);(2) 具有代理转发应用程序的SNMP实体(传统的SNMP Proxy Agent);(3) 具有命令产生器和通知接收器应用程序的命令行驱动的SNMP实体(传统的管理端Manager);(4) 具有命令产生器和通知接收器应用程序,加上命令应答器和通知产生器应用程序的SNMP实体(传统的SNMP中间水平管理器或双重实体);(5) 具有命令产生器和通知接收器和其他为了管理大量被管节点的应用程序(传统的(网络)管理站)。2、本体系结构的目标(1) 尽可能多的利用现有资源;(2) 完善对安全机制的支持;(3)3、三种安全需求(1) 主要安全威胁:篡改消息、伪装;(2) 次要安全威胁:篡改消息流、泄露;(3) 较小安全威胁:拒绝服务、通信量分解。4、文档概述图1所示文档结构定义了SNMP框架。5、SNMPv3的体系结构SNMPv3的一个目标是支持一种容易扩展的模块化体系结构,将以前版本中的代理和管理站统一为SNMP实体。SNMP实体由两部分组成:SNMP引擎和SNMP应用程序(如图2)。SNMP引擎。在同一管理域内,具有唯一的snmpEngineID,SNMP引擎与SNMP实体是一一对应的关系,它包含四个子系统。l Dispatcher(调度程序):在一个SNMP引擎中,具有唯一的调度程序,它允许并发支持多版本SNMP消息。主要功能:1) 从网络上接收或向网络发送SNMP消息;2) 进行版本确认,并且同相应的消息处理模块交互;3) 为SNMP应用程序之间传送PDU提供抽象接口。l Message Processing Subsystem(消息处理子系统):负责准备要发送的消息和从接收到的消息中提取数据。它包含多个消息处理模型(4个),各个模型对应一个SNMP版本,负责为特定的版本格式准备待发送的消息,和提取特定版本消息的数据。l Security Subsystem(安全子系统):包括基于用户的安全模型和基于共同体的安全模型。提供了诸如鉴别、加解密等安全服务。安全子系统定义可防范的威胁,和提供安全服务使用的安全协议。安全协议界定实现机制和过程,以及提供诸如鉴别和加解密服务的MIB对象。l Access Control Subsystem(访问控制子系统):包括基于视图的访问控制模型和其他访问控制模型。通过访问控制模型提供授权服务,即确定是否允许访问一个管理对象。访问控制模型为了支持访问权决策,详细定义了访问决策功能。Applications五种SNMP实体内部应用程序:l Command Generator(命令生成器):生成收集或设置管理数据的SNMP命令;l Command Responders(命令应答器):提供对管理数据的访问;l Notification Originators(通知产生器):初始化Trap或Inform消息;l Notification Receivers(通知接收器):接收并处理Trap或Inform消息;l Proxy Forwarders(代理转发器):转发SNMP实体之间的消息。这些应用程序都使用SNMP引擎提供的服务。包含命令生成器、通知产生器、通知接收器的SNMP实体,即传统的SNMP管理站(如图3) 包含一个或多个命令响应器、通知发生器、代理转发器的SNMP实体,即传统的SNMP代理(如图4)6、抽象服务接口(Abstract Service Interface)抽象服务接口描述了SNMP实体内各子系统之间概念接口的,它倾向有助于阐述SNMP实体的外部可见行为,而不倾向于约束内部执行的结构或组织形式,抽象服务接口不能认为是API,它由一组定义了所提供服务和抽象数据元素的原语所定义。(1) Dispatcher Primitives(调度程序原语)调度程序的典型功能是通过PDU调度程序为SNMP应用程序提供服务。l 产生流出的(Outgoing)请求或通知PDU调度为应用程序提供如下原语用于向其他SNMP实体发送SNMP请求或通知:statusInformation = - sendPduHandle if success - errorIndication if failure sendPdu( IN transportDomain - transport domain to be used IN transportAddress - transport address to be used IN messageProcessingModel - typically, SNMP version IN securityModel - Security Model to use IN securityName - on behalf of this principal IN securityLevel - Level of Security requested IN contextEngineID - data from/at this entity IN contextName - data from/in this context IN pduVersion - the version of the PDU IN PDU - SNMP Protocol Data Unit IN expectResponse - TRUE or FALSE ) l 处理引入的(Incoming)请求或通知PDUPDU调度通过如下原语将SNMP PDU传送给应用程序processPdu( - process Request/Notification PDU IN messageProcessingModel - typically, SNMP version IN securityModel - Security Model in use IN securityName - on behalf of this principal IN securityLevel - Level of Security IN contextEngineID - data from/at this SNMP entity IN contextName - data from/in this context IN pduVersion - the version of the PDU IN PDU - SNMP Protocol Data Unit IN maxSizeResponseScopedPDU - maximum size of the Response PDU IN stateReference - reference to state information ) - needed when sending a response l 产生流出的(Outgoing)响应PDU调度为应用程序返回SNMP响应PDU给PDU调度提供了如下原语:result = - SUCCESS or FAILURE returnResponsePdu( IN messageProcessingModel - typically, SNMP version IN securityModel - Security Model in use IN securityName - on behalf of this principal IN securityLevel - same as on incoming request IN contextEngineID - data from/at this SNMP entity IN contextName - data from/in this context IN pduVersion - the version of the PDU IN PDU - SNMP Protocol Data Unit IN maxSizeResponseScopedPDU - maximum size sender can accept IN stateReference - reference to state information - as presented with the request IN statusInformation - success or errorIndication ) - error counter OID/value if error l 处理引入的(Incoming)响应PDUPDU调度通过如下原语将引入的SNMP响应PDU传送给应用程序:processResponsePdu( - process Response PDU IN messageProcessingModel - typically, SNMP version IN securityModel - Security Model in use IN securityName - on behalf of this principal IN securityLevel - Level of Security IN contextEngineID - data from/at this SNMP entity IN contextName - data from/in this context IN pduVersion - the version of the PDU IN PDU - SNMP Protocol Data Unit IN statusInformation - success or errorIndication IN sendPduHandle - handle from sendPdu ) l 为操作的SNMP PDU注册职责(响应性)应用程序可以通过PDU调度的原语为一个特定的contextEngineID或特定的pduType注册或注销职责,可以注册的特定的pduType清单由Message Processing Model(消息处理模型)决定。statusInformation = - success or errorIndication registerContextEngineID( IN contextEngineID - take responsibility for this one IN pduType - the pduType(s) to be registered ) unregisterContextEngineID( IN contextEngineID - give up responsibility for this one IN pduType - the pduType(s) to be unregistered ) 注,实现registerContextEngineID或unregisterContextEngineID抽象服务接口,要为注册各种可能的contextEngineId或pduType参数值的应用程序提供具体实现方式。(2) Message Processing Subsystem Primitives(消息处理子系统原语)调度程序为了处理特定版本的SNMP消息,同消息处理子系统进行交互。l 准备外流的SNMP请求或通知消息消息处理子系统提供了准备外流的SNMP请求或通知消息的服务原语。statusInformation = - success or errorIndication prepareOutgoingMessage( IN transportDomain - transport domain to be used IN transportAddress - transport address to be used IN messageProcessingModel - typically, SNMP version IN securityModel - Security Model to use IN securityName - on behalf of this principal IN securityLevel - Level of Security requested IN contextEngineID - data from/at this entity IN contextName - data from/in this context IN pduVersion - the version of the PDU IN PDU - SNMP Protocol Data Unit IN expectResponse - TRUE or FALSE IN sendPduHandle - the handle for matching - incoming responses OUT destTransportDomain - destination transport domain OUT destTransportAddress - destination transport address OUT outgoingMessage - the message to send OUT outgoingMessageLength - its length ) l 准备外流的SNMP响应消息消息处理子系统提供准备外流的SNMP响应消息的服务原语。result = - SUCCESS or FAILURE prepareResponseMessage( IN messageProcessingModel - typically, SNMP version IN securityModel - same as on incoming request IN securityName - same as on incoming request IN securityLevel - same as on incoming request IN contextEngineID - data from/at this SNMP entity IN contextName - data from/in this context IN pduVersion - the version of the PDU IN PDU - SNMP Protocol Data Unit IN maxSizeResponseScopedPDU - maximum size able to accept IN stateReference - reference to state information - as presented with the request IN statusInformation - success or errorIndication - error counter OID/value if error OUT destTransportDomain - destination transport domain OUT destTransportAddress - destination transport address OUT outgoingMessage - the message to send OUT outgoingMessageLength - its length ) l 从引入的SNMP消息准备数据元素消息处理子系统提供从引入的SNMP消息抽象数据元素的服务原语。result = - SUCCESS or errorIndication prepareDataElements( IN transportDomain - origin transport domain IN transportAddress - origin transport address IN wholeMsg - as received from the network IN wholeMsgLength - as received from the network OUT messageProcessingModel - typically, SNMP version OUT securityModel - Security Model to use OUT securityName - on behalf of this principal OUT securityLevel - Level of Security requested OUT contextEngineID data from/at this entity OUT contextName - data from/in this context OUT pduVersion - the version of the PDU OUT PDU - SNMP Protocol Data Unit OUT pduType - SNMP PDU type OUT sendPduHandle - handle for matched request OUT maxSizeResponseScopedPDU - maximum size sender can accept OUT statusInformation - success or errorIndication - error counter OID/value if error OUT stateReference - reference to state information - to be used for possible Response ) (3) Access Control Subsystem Primitives(访问控制子系统原语)应用程序相对于访问控制子系统服务是典型客户机程序。访问控制子系统通过如下原语检查是否允许某个访问。statusInformation = - success or errorIndication isAccessAllowed( IN securityModel - Security Model in use IN securityName - principal who wants to access IN securityLevel - Level of Security IN viewType - read, write, or notify view IN contextName - context containing variableName IN variableName - OID for the managed object ) (4) Security Subsystem Primitives(安全子系统原语)消息处理子系统相对于安全子系统服务器是典型的客户机程序。l 产生一条请求或通知消息安全子系统通过如下原语产生一条请求或通知消息。statusInformation = generateRequestMsg( IN messageProcessingModel - typically, SNMP version IN globalData - message header, admin data IN maxMessageSize - of the sending SNMP entity IN securityModel - for the outgoing message IN securityEngineID - authoritative SNMP entity IN securityName - on behalf of this principal IN securityLevel - Level of Security requested IN scopedPDU - message (plaintext) payload OUT securityParameters - filled in by Security Module OUT wholeMsg - complete generated message OUT wholeMsgLength - length of the generated message ) l 处理引入的消息安全子系统通过如下原语处理引入的消息statusInformation = - errorIndication or success - error counter OID/value if error processIncomingMsg( IN messageProcessingModel - typically, SNMP version IN maxMessageSize - of the sending SNMP entity IN securityParameters - for the received message IN securityModel - for the received message IN securityLevel - Level of Security IN wholeMsg - as received on the wire IN wholeMsgLength - length as received on the wire OUT securityEngineID - authoritative SNMP entity OUT securityName - identification of the principal OUT scopedPDU, - message (plaintext) payload OUT maxSizeResponseScopedPDU - maximum size sender can handle OUT securityStateReference - reference to security state ) - information, needed for response l 产生应答消息安全子系统通过如下原语产生应答消息。statusInformation = generateResponseMsg( IN messageProcessingModel - typically, SNMP version IN globalData - message header, admin data IN maxMessageSize - of the sending SNMP entity IN securityModel - for the outgoing message IN securityEngineID - authoritative SNMP entity IN securityName - on behalf of this principal IN securityLevel - for the outgoing message IN scopedPDU - message (plaintext) payload IN securityStateReference - reference to security state - information from original request OUT securityParameters - filled in by Security Module OUT wholeMsg - complete generated messag

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论