Example: Encoded SNMP Message - SNMP Tutorial

30.11 Example Encoded SNMP Message

  The encoded form of ASN.1 uses variable-length fields to represent items. In general, each field begins with a header that specifies the type of object and its length in bytes. For example, each SEQUENCE begins with an octet containing 30 (hexadecimal); the next octet specifies the number of following octets that comprise the sequence.

  Figure 30.11 contains an example SNMP message that illustrates how values are encoded into octets. The message is a get-request that specifies data item sysDescr (numeric object identifier 1.3.6.1.2.1.1.1.0).Because the example shows an actual message, it includes many details. In particular, the message contains a msgSecurityParameters section which has not been discussed above. This particular message uses the UsmSecurityParameters form of security parameters. It should be possible, however, to correlate other sections of the message with the definitions above.

  As Figure 30.11 shows, the message starts with a code for SEQUENCE which has a length of 103 octets8. The first item in the sequence is a 1-octet integer that specifies the protocol version; the value 3 indicates that this is an SNMPV3 message. Successive fields define a message ID and the maximum message size the sender can accept in a reply. Security information, including the name of the user (ComerBook) follows the message header.

  The GetRequest-PDU occupies the tail of the message. The sequence labeled ScopedPDU specifies a context in which to interpret the remainder of the message. The octet A0 specifies the operation as a get-Request. Because the high-order bit is turned on, the interpretation of the octet is context specific. That is, the hexadecimal value A0 only specifies a GetRequest-PDU when used in context; it is not a universally reserved value. Following the request octet, the length octet specifies the request is 26 octets long. The request ID is 2 octets, but each of the error-status and error-index are one octet. Finally, the sequence of pairs contains one binding, a single object identifier bound to a null value. The identifier is encoded as expected except that the fist two numeric labels are combined into a single octet.

8Sequence items occur frequently in an SNMPmessage because SNMP uses SEQUENCE instead of conventional

programming language constructs like arrayor struct

Abstract from Internetworking With TCP/IP Vol I: Principles, Protocols, and Architecture Fourth Edition,

DOUGLAS E. COMER,

Department of Computer Sciences Purdue University, West Lafayette, IN 47907,

PRENTICE HALL,

Upper Saddle River, New Jersey 07458

时间: 2024-12-18 09:46:24

Example: Encoded SNMP Message - SNMP Tutorial的相关文章

SNMP Message Format - SNMP Tutorial

30.10 SNMP Message Format Unlike most TCP/IP protocols, SNMP messages do not have fixed fields. Instead, they use the standard ASN.1 encoding. Thus, a message can be difficult for humans to decode and understand. After examining the SNMP message defi

cactiez 添加主机时出现:SNMP信息 SNMP错误

在使用cactiez的过程中,常常无法添加监控主机或添加主机时出现,SNMP信息 snmp错误 第一,首先确定cacti所监控的主机能ping通被监控主机:如果不能ping通,请确认网络配置和被监控主机的ip设置是否正确. 第二,如果能ping通,那么确认被监控主机是否启用snmpd服务: ps -ef | grep snmp 或者直接重启被监控主机的snmp服务: service snmp restart 若上面的命令不可用,则用这两个: service snmpd restart 然后到ca

cacti监控windows主机报错:SNMP Information SNMP error

我用Linux做cacti监控服务器监控windows主机时出现以下错误,自己检查windows主机的SNMP端口正常,防火墙也正常关闭,用snmpwalk命令也报错.自己百度和谷歌终于找到解决问题的,希望有朋友遇到过这种类型的错误快速解决. 1.错误如下: 2.检查windows主机的端口和防火墙 3.在Linux服务器上用snmpswak命令提示错误 4.解决问题(是因为windows主机的SNMP服务没有"接受团体名称") 5.测试正常 cacti监控windows主机报错:SN

SNMP Tutorial

Applications: Internet Management (SNMP) 30.1 Introduction 30.2 The Level Of Management Protocols 30.3 Architectural Model 30.4 Protocol Framework 30.5 Examples of MIB Variables 30.6 The Structure Of Management Information 30.7 Formal Definitions Usi

SNMP 原理与实战详解

原文地址:http://freeloda.blog.51cto.com/2033581/1306743 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://freeloda.blog.51cto.com/2033581/1306743 大纲 一.什么是SNMP 二.SNMP背景 三.SNMP结构概述 四.SNMP支持的网管操作 五.SNMP的实现结构 六.SNMP的技术内容 七.SNMP的发展历史 八.SNMP的技术术语 九.综合

Android实现snmp协议(一)

2015年一月初.接到华为一位老师的电话,让我帮忙做一款他们在北京展会上要用到的App,该App能够展示华为的网络设备运行状态并可以设置一些简单的参数,包括AP.LSW.AP.AR等. 华为老师跟我说他们是使用snmp协议v2c的版本进行管理的,这意味着我也得在Android设备实现该协议,并与他们的网络设备交互. 回去认真研究了一下并请教了一些对这块比较熟悉的小伙伴,总算对snmp有了一些粗浅的认识. snmp是指简单网络设备管理协议,顾名思义就是对网络设备进行管理的通用标准协议,属于TCP/

Snmp学习总结(七)——SNMP4J介绍

一.SNMP4J介绍 SNMP4J是一个用Java来实现SNMP(简单网络管理协议)协议的开源项目.它支持以命令行的形式进行管理与响应.SNMP4J是纯面向对象设计与SNMP++(用C++实现SNMPv1/v2c/v3)相类似. SNMP4J API 提供以下下特性: 支持MD5和SHA验证,DES,3DES,AES128.AES192和AES256加密的SNMPv3. 支持MPv1,MPv2C和MPv3,带执行的可阻塞的信息处理模块. 全部PDU格式. 可阻塞的传输拓扑.支持UPD.TCP.T

SNMP中MIB2所有主要节点

系统组:system组包含以下对象集(.1.3.6.1.2.1.1): 对象名:sysDescr(1) OID:system.1 对象类型:DisplayString[255] 访问模式:只读 描述:关于该设备或实体的描述,如设备类型.硬件特性.操作系统信息 等 对象名:sysObjectID OID:system.2 对象类型:ObjectIdentifier 访问模式:只读 描述:设备厂商的授权标识符 对象名:sysUpTime(1) OID:system.3 对象类型:TimeTick 访

SNMP详解

什么是SNMP 简单网络管理协议(SNMP:Simple Network Management Protocol)是由互联网工程任务组(IETF:Internet Engineering Task Force )定义的一套网络管理协议.该协议基于简单网关监视协议(SGMP:Simple Gateway Monitor Protocol). SNMP为不同厂家生产的不同种类.不同型号的设备定义了一个统一的规范,大大简化了设备管理员的管理工作,提高工作效率. SNMP的工作方式 SNMP可以让一个管