不要太表面了,最好提供到MIB的数据组织方式、PDU的概念以及Get(GetRequest、GetNextRequest)Set(),以及Trap的具体操作流程等等!!

解决方案 »

  1.   

    我有个WORD文件,发消息给个EMAIL
      

  2.   

    公司正好在用SNMP进行路由器控制。所知道的知识都是网上找到的,可能你都已经搜到过了。
      

  3.   

    看一下tcp/ip 卷1 第25章,专门讲解snmp的,非常详细。
    以下为摘录,要的话可以发给你。对象标识是一种数据类型,它指明一种“授权”命名的对象。“授权”的意思就是这些标
    识不是随便分配的,它是由一些权威机构进行管理和分配的。
    对象标识是一个整数序列,以点(“.”)分隔。这些整数构成一个树型结构,类似于D N S
    (图1 4 - 1)或U n i x的文件系统。对象标识从树的顶部开始,顶部没有标识,以r o o t表示(这和
    U n i x中文件系统的树遍历方向非常类似)。
    图2 5 - 6显示了在S N M P中用到的这种树型结构。所有的M I B变量都从1 . 3 . 6 . 1 . 2 . 1这个标识
    开始。
    树上的每个结点同时还有一个文字名。例如标识1 . 3 . 6 . 1 . 2 . 1就和i s o . o r g . d o d .
    i n t e r n e t . m e m t . m i b对应。这主要是为了人们阅读方便。在实际应用中,也就是说在管理进程
    和代理进程进行数据报交互时,M I B变量名是以对象标识来标识的,当然都是以1 . 3 . 6 . 1 . 2 . 1开头的。
    图25-6 管理信息库中的对象标识
    在图2 5 - 6中,我们除了给出了m i b对象标识外,还给出了i s o . o r g . d o d . i n t e r n e t .
    p r i v a t e . e n t e r p r i s e s(1 . 3 . 6 . 1 . 4 . 1)这个标识。这是给厂家自定义而预留的。在A s s i g n e d
    Number RFC中列出了在该结点下大约4 0 0个标识。
    25.5 管理信息库介绍
    所谓管理信息库,或者M I B,就是所有代理进程包含的、并且能够被管理进程进行查询和设
      

  4.   

    谢谢楼上各位,但是还是不够详细, laiyiling(陌生人) 兄的word是否会解决燃眉之急。。??!!公司要我设计Monitor系统,监控公司的平台的软硬件以及客户端,系统比较庞大,完全定义自己作这个监控系统还是比较麻烦的,老总的意思是参照SNMP来作,那位高手给点意见,这个参照的度很难把握,何况SNMP协议本身就比较繁杂。
      

  5.   

    前段时间搜集了些SNMP的资料,不过也都是SNMP的凤毛麟角,过段时间也可能要开始搞SNMP了,楼主不嫌请加我qq:5637448
      

  6.   

    The message to [email protected] is bounced because : User not found你发送到[email protected]的邮件由于以下原因被退回 : 用户不存在
      

  7.   

    楼主自己看看snmp v2/v3的协议(RFC文档,编号我忘了) 
    再找些资料看看
      

  8.   

    Caps77(厉兵秣马) 兄客气了:我的msn:[email protected],qq上班我不大用的。
      

  9.   

    等俺总结吧。snmp的详细资料还真少。
    对于SNMP的MIB里面OID的VALUE放在哪里,这个问题我一只没有搞清楚,而MIB里面的数据就好像LDAP等协议里面的schema一样是一种规则,那么,OID对应的值又放在哪里呢?
      

  10.   

    SNMP的MIB的OID的VALUE一般可以通过文件来存放,你需要按标准的mib文件编写,然后存放数据
    也可以用数据库来存放,具体存放格式不定
      

  11.   

    可以参考MIB BROWSER,Advent Net等软件编写mib文件的方式来了解值的存放
      

  12.   

    http://www.programfan.com/article/showarticle.asp?id=2298
    这篇文章可能对你有用
      

  13.   

    MIB的定义又一个工具可以用的,不过是共享软件,没有购买的话只能使用部分功能
    楼主上网搜索一下MIB 应该能够找到 是国外的软件
      

  14.   

    mssqlDbId OBJECT-TYPE
          SYNTAX INTEGER (1..2147483647)
          ACCESS read-only
          STATUS mandatory
          DESCRIPTION
              "The dbid of the database."
          ::= { mssqlDbEntry 1 }
    比如上面这个节点,它的value如果用MIB存储的话,因该放在那里呢?
      

  15.   

    郁闷了,搞SNMP的就这么少吗?我用snmp++和adventnet搞了一个测试环境,联调成功。
    但是对于adventnet回送回来的报文格式有点不理解,有高手愿意和我一起讨论分享经验吗?
    我的msn:[email protected]
      

  16.   

    adventnet回送回来的报文应该是符合SNMP的PDU标准的,因而,你用snmp++应该是可以解析出来的
    不过不同语言之间,可能变量类型什么的不一致
      

  17.   

    晕倒,不能发包字节数据给看
    我想说的是按照标准来说Packet的报文格式第一个字节是0x30,第二个字节因该是长度,我在调试的时候看到发送包按照这种格式是对的,第二个字节代表了发的包长,但是收到的包的第二个字节却是远远的大于了包长。在循环返回的数据中都是如此。我就不理解了,这第二个返回的字节是怎么算长度的,而且snmp服务器竟然解析通过,认为是正确的。
      

  18.   

    请问各位大侠,能不能将SNMP的请求转换成的内部数据格式给提取出来啊?
    我现在需要的是将发送的请求数据包抓到,看它到底是发的啥子数据包
      

  19.   

    本来打算发的,但是,csdn不让发,怕我那是攻击代码。木办法啊。
      

  20.   

    UP.
    SNMP就是按照SNMP的标准格式,从服务端读取MIB对某个Device的161端口发起PDU请求,由该Device的Agent返回Message。
    由SNMP服务器监听162端口,监听Device的代理根据Trap策略发送Trap消息。研究了这么久就研究了这么多。
    碰到难点了,对MIB的读取和解析。。那位高人有经验,给点参考意见。有点无从下手的感觉。
      

  21.   

    自己干了,用c和stl来解析,完善好了放上来,供大家修改!
      

  22.   

    MOM can send alerts to other applications by generating Simple Network Management Protocol (SNMP) traps. MOM can generate an SNMP trap as a response for alert or event processing rules. By using SNMP traps, the alerts and events in MOM can be monitored or used by SNMP management applications.In addition to being a MOM-managed computer, any computer that generates a trap must have the SNMP service installed and running.MOM can generate SNMP traps as a response for both alert or event processing rules. An alert processing rule can specify that an SNMP trap is generated for all alerts or alerts matching criteria such as the alert source, severity, processing rule group, computer, domain, and time. The SNMP trap will convey information as described in the MOM Management Information Base. For more information about the MOM Management Information Base, see MissionCritical.mib. Note   
    MOM event processing rules support using the SNMP Trap Catcher and SNMP Extended Trap Catcher data providers as event sources. Event processing rules that catch SNMP traps allow you to monitor computers and other devices that rely on SNMP for their instrumentation. For more information, see the MOM Installation Guide.To send an SNMP trap as a response to an alertInstall an SNMP management application on the computer that will serve as the SNMP trap destination. 
    Consult the documentation for your SNMP management product for installation requirements and instructions. The SNMP trap destination is usually required.Install the SNMP service on the computers that will generate the SNMP trap. 
    For flexibility, MOM allows SNMP traps to be generated from servers running MOM or MOM agents. The computer name or IP address of the SNMP trap destination is required when the SNMP service is installed on the server running MOM or agent computers. For information about installing the SNMP service, see Configuring the SNMP Service.In the MOM Administrator console, create and deploy an alert processing rule that generates an SNMP trap. An alert processing rule will allow you to generate an SNMP trap as a common response for all alerts that match the criteria you specify in the processing rule. 
    For an example of creating an alert processing rule that generates an SNMP trap, see How to Generate an SNMP Trap for an Alert.
      

  23.   

    snmp 我觉得可以说的就是一点,用户可以根据配置文件,取得相应的情报(通过自己配置的程序)
      

  24.   

    goodheartppl(goodheart)
    excuse me  what's the MOM ,can u show a detailed description,a tools or a lib or sth??
      

  25.   

    明白了字节81 A4 代表A4 + (81-80)=A5 0x80==128。所以包长度是正确的,165!!!
    技术问题已经基本解决。
    可以开始真正的SNMP Code 了!!
      

  26.   

    MOM can send alerts to other applications by generating Simple Network Management Protocol (SNMP) traps. MOM can generate an SNMP trap as a response for alert or event processing rules. By using SNMP traps, the alerts and events in MOM can be monitored or used by SNMP management applications.In addition to being a MOM-managed computer, any computer that generates a trap must have the SNMP service installed and running.MOM can generate SNMP traps as a response for both alert or event processing rules. An alert processing rule can specify that an SNMP trap is generated for all alerts or alerts matching criteria such as the alert source, severity, processing rule group, computer, domain, and time. The SNMP trap will convey information as described in the MOM Management Information Base. For more information about the MOM Management Information Base, see MissionCritical.mib. Note   
    MOM event processing rules support using the SNMP Trap Catcher and SNMP Extended Trap Catcher data providers as event sources. Event processing rules that catch SNMP traps allow you to monitor computers and other devices that rely on SNMP for their instrumentation. For more information, see the MOM Installation Guide.To send an SNMP trap as a response to an alertInstall an SNMP management application on the computer that will serve as the SNMP trap destination. 
    Consult the documentation for your SNMP management product for installation requirements and instructions. The SNMP trap destination is usually required.Install the SNMP service on the computers that will generate the SNMP trap. 
    For flexibility, MOM allows SNMP traps to be generated from servers running MOM or MOM agents. The computer name or IP address of the SNMP trap destination is required when the SNMP service is installed on the server running MOM or agent computers. For information about installing the SNMP service, see Configuring the SNMP Service.In the MOM Administrator console, create and deploy an alert processing rule that generates an SNMP trap. An alert processing rule will allow you to generate an SNMP trap as a common response for all alerts that match the criteria you specify in the processing rule. 
    For an example of creating an alert processing rule that generates an SNMP trap, see How to Generate an SNMP Trap for an Alert.
      

  27.   

    你看这个文档,写的很详细的 http://www.vckbase.com/document/journal/vckbase15/network/nprotocol/WinSNMPApi.zip
      

  28.   

    呵呵,这个文档我也有,我是打算自己实现了,作为公司的Project!
      

  29.   

    总结一下吧:无论snmp++还是Agent++都用到了net-snmp的lib或者参考。所以如果想真正编码直接下载net-snmp的源码去读,或者边用边读。
    提供一个搭建测试的方法:可以安装win snmp,然后用net-snmap的代码作跟踪测试。
    或者用AdventNet作Agent,用SNMP++测试,总之环境很容易搭建的。
    其实协议就这些了,最主要的是看你怎么使用了,我觉得管理策略、监控策略的定制、管理和监控的力度、以及如何真正的实现职能监控的设计实现才是最核心也是最难处理的。