MIB文件规范指南
各设备厂商采集性能公用MIB(OID)文档

单位 % % % % % % byte %
MemoryUtilization_huawei.*
FanStatus_huawei.*
PowerSupplyStatus_huawei.*
TemperatureStatus_huawei.*
TemperatureValue_huawei.*
.1.3.6.1.4.1.2011.10.2.6.1.1.1.1.8.* .1.3.6.1.4.1.2011.2.2.5.1/2.* .1.3.6.1.4.1.2011.5.25.31.1.1.1.1.7(NE系列) .1.3.6.1.4.1.25506.2.6.1.1.1.1.10(S5500SI) .1.3.6.1.4.1.2011.2.17.1.2.3.10.1.5.7.*(NE系列) .1.3.6.1.4.1.2011.2.23.1.9.1.1.1.2/1.* .1.3.6.1.4.1.25506.8.35.9.1.1.1.2/1.* .1.3.6.1.4.1.2011.2.23.1.9.1.2.1.2.* .1.3.6.1.4.1.25506.8.35.9.1.2.1.2.* .1.3.6.1.4.1.2011.2.2.8070.2.1.1.5.* .1.3.6.1.4.1.2011.2.33.20.1.5.1.2.*(AR系列) .1.3.6.1.4.1.2011.2.23.1.9.1.3.1.2.0.* 1.3.6.1.4.1.25506.8.35.9.1.3.1.3.* .1.3.6.1.4.1.2011.5.25.31.1.1.1.1.* .1.3.6.1.4.1.2011.10.2.6.1.1.1.1.*(H3C) .1.3.6.1.4.1.2011.2.17.1.2.3.4.1.12.* .1.3.6.1.4.1.2011.2.23.1.9.1.3.1.3.*(S7500) .1.3.6.1.4.1.2011.5.25.31.1.1.1.11.* .1.3.6.1.4.1.2011.2.23.1.9.1.3.1.4.*(不用) .1.3.6.1.4.1.2011.2.17.1.2.3.4.1.13.* .1.3.6.1.4.1.2011.2.17.1.2.3.4.1.14.* 锐捷设备性能指标参考表 OID值 .1.3.6.1.4.1.4881.1.1.10.2.21.1.2.1.8 .1.3.6.1.4.1.4881.1.1.10.2.36.1.1.* .1.3.6.1.4.1.4881.1.1.10.2.35.1.1.1.* .1.3.6.1.4.1.4881.1.1.10.2.21.1.6.1.3(S8610, S8606,S7606,S7604)
DIGI SNMP客户端与MIB文件使用说明书

Quick Note 17MIB file creation and basic usage with SNMPclientsSeptember 20161Introduction (3)2Version (3)2.1Corrections (3)3Supported MIBs (4)4SNMP Configuration (5)4.1Setting up Router Specific ID information (5)4.2Checking the SNMP enterprise values. (6)5Get the MIB file from the TransPort (8)5.1Firmware Version 5212 or later (8)5.2Firmware Version up to 5202 (9)5.2.1Get the MIB data from the TransPort (9)5.2.2Generating the MIB file (11)6The basics of using MIB files with SNMP (12)7Configuration and Firmware/Hardware (15)7.1Configuration File (15)7.2Hardware and Firmware (17)This guide details the steps involved in generating a .MIB file for use with an SNMP client.This guide has been written for technically competent personnel who are familiar with the use for DIGI hardware and understand the use of SNMP.Whilst this guide is carried out using the web interface only it is perfectly feasible to carry out each stage at the command line, these commands will be highlighted at the relevant places.2.1CorrectionsRequests for corrections or amendments to this application note are welcome and should be addressed to: *********************Requests for new application notes can be sent to the same address.As well as the Device Generated MIB, described in this quick note, DIGI Transport devices also support the Sarian-Monitor MIB and a number of standard MIBs. A list of supported standard MIBs is provided below. The Sarian Monitor MIB has a restricted set of parameters that you can poll any DIGI Transport device with to retrieve statistics relating to WWAN, Config, PPP and System parameters.The DIGI Transport range of routers supports a number of standard MIBs as well as DIGI Transport MIBs, described above, these MIBs are listed below:The following standard MIBs are supported:SNMP MIB (RFC3418)Interfaces MIB (RFC2233)*IP MIB (RFC2011)IP Forwarding Table MIB (RFC2096)TCP MIB (RFC2012)UDP MIB (RFC2013)VRRP MIB (RFC2787)SNMP MPD MIB (RFC3412)SNMP USM MIB (RFC3414)*** The following groups/tables in RFC2233 are not supported:ifXTable, ifStackTable, ifRcvAddressTable** The following groups/tables in RFC3414 are not supported:usmUserTableDIGI supported MIBs:Device Generated MIBSarian-Monitor MIBPlease note: The Device Generated MIB described in this Quick Note is a MIB that is specific to the serial number, firmware release, firmware build and model number of the unit it was generated from. If the firmware is updated a new MIB file will need to be generated. The same MIB file generated on one router, cannot be used on another router, even if the hardware is identical.4.1Setting up Router Specific ID informationWhen polling the router, it is possible to have the SNMP application be able to identify the device by a unique name and provide location and contact information.Navigate to Configuration > System > Device Identity and setup the details, but enter information that relates to you:Figure 1: Optional System Information ConfigurationNext click ‘Apply’ at the bottom of the page, and then save the new configuration to flash.If configuring this option via a terminal session the commands used are listed below:snmp 0 name < Name to identify your router.>snmp 0 contact <Name of contact>snmp 0 location <Location of device>4.2 Checking the SNMP enterprise values.Check the SNMP Enterprise number and name. Navigate to Configuration > System > General and check the miscellaneous section, the highlighted settings below should be as default:Figure 2: Enterprise number and name entryWhere <enterprise #> is the SNMP enterprise number and <enterpriseName> is the SNMP enterprise name specific to the installation.Please note: If the default enterprise number and name shown above is changed and it is intended to use the Sarian-Monitor MIB, the values in the Sarian-Monitor MIB file will also need changing to the details specific to the installation:sarian OBJECT IDENTIFIER ::= { enterprises 16378 }sarian-monitor OBJECT IDENTIFIER ::= { sarian 10000 }For example if using enterprise number 23134 and enterprise name digitransport change the above to: digitransport OBJECT IDENTIFIER ::= { enterprises 23134 }sarian-monitor OBJECT IDENTIFIER ::= { digitransport 10000 }Then save the file and reload into the SNMP management system.Please Note: If the enterprise number is changed, the Digi Transport will need to be rebooted for the new value to take effect.Please Note:Whenever the Enterprise name and Number are changed, these must be identical and consistent across all MIBs generated or loaded into the management system. If the values in either of the DIGI Transport MIBs correspond with other MIB values in the organisation, the responses received may not be correct when polling through the devices via the SNMP management system. Using the defaults above should not lead to any such conflicts.5.1Firmware Version 5212 or laterSince firmware version 5212, the MIB file is automatically generated and it can be directly downloaded from the device. Find below an example of downloading the MIB file for a WR21 via an FTP client:5.2Firmware Version up to 5202In older release (up to and including 5202) the MIB file needs to be manually generated following the steps described in this section.5.2.1Get the MIB data from the TransPortThe next step is to get the DIGI Transport to output the MIB data. Navigate to Administration - Execute a command page typ e ‘MIB print’ in the text box. Then click ‘Execute’.Figure 3: Mibprint exampleIf connected to a terminal session then the same command can simply be issued. At the command prompt (listed below):mibprintAn example of the output received from the web interface when the command has been input is listed below.Figure 4: Mibprint outputThere is a large output, this should then be copied into a text file, and saved into a folder for use in the next step.Please note:If using Firefox web browser this is done slightly differently. Right click on the frame containing the output select This frame → View Frame Source (as shown below), then copy and paste from the window that is opened.When pasting the output into a text file, make sure that the output retains its formatting with carriage returns <CR>. If the output is pasted and has wrapping enabled or is all on one line, the rest of this procedure will fail.Figure 5: How to save the output5.2.2Generating the MIB fileIn order to generate the MIB file from the text file, download the correct MIB.exe file from the DIGI website. This can be found at:/downloads/mibexePlease note: There are two versions of the MIB.exe file, MIB1exe.zip and MIB2.exe.zip.MIB1exe.zip should be used for firmware versions up to 4832MIB2exe.zip should be used for firmware releases after 4832There is included in each .zip file a copy of the Sarian-Monitor MIB file that should work for most DIGI Transport devices.When the zip is downloaded, extract it to the same folder where the text file is saved. Open the command prompt and browse to the folder containing the MIB2exe.exe file and the previously created text file. Use the MIB2exe.exe file to generate the .MIB file from the text file. The command is listed below:MIB2exe.exe <text file name>.txt <new MIB file name>.MIBWhere <text file name> is the name of the text file and <new MIB file> is the name of the .MIB file being created. In the example below both values are WR41. An example of the typical output for this can be seen below.Figure 6: Compile the MIBThis will have generated a .MIB file in the folder in which the MIB2exe.exe and the initial .txt file was stored. This can then be used with an SNMP client.Please note:The same device with a different firmware revision and/or different features enabled will need a different MIB file creating; this is due to additional features that may be available on different unit and the unique values attributed to firmware version, firmware build and model number that forms part of the initial MIB tree.In order to monitor the device with an SNMP client SNMP users need to be configured. Navigate to Configuration - Remote Management > SNMP > SNMP Users > SNMP User 0.The below example uses the community name: Public.Figure 7: Setup the community stringIf you want also to set some configuration setting, you need to set the SNMP user access as read and write as in the example above.Once this has been set, use a MIB client to poll the DIGI Transport device for required information. Usually in the MIB browser client you need to set the IP address of the TransPort and the community name:Below is a screenshot of the output of a get for the Device Identity settings that have been setup for this device.∙In the left hand pane, the tree that the MIB tool has built from the MIB that was generated above.∙In the middle pane, a query for OIDs related to SNMP configuration is performed and results are shown∙The results show what we have configured in previous sectionsFigure 8: Example reading an OID from TransPortThe MIB file can be also used to set a value for a specific OID with an SNMP SET, the example below shows how to change the SNMP name configured above.If also the SNMP user has been configured with read and write access, the SET will succeed:And performing another SNMP GET on this OID, the result will be the new value:7.1Configuration FileThis is the configuration used for the purpose of this Quick Note. The CLI commands relevant for the configuration of SNMP are highlighted:eth 0 IPaddr "192.168.1.1"addp 0 enable ONlapb 0 ans OFFlapb 0 tinact 120lapb 1 tinact 120lapb 3 dtemode 0lapb 4 dtemode 0lapb 5 dtemode 0lapb 6 dtemode 0ip 0 cidr ONdef_route 0 ll_ent "ppp"def_route 0 ll_add 1dhcp 0 IPmin "192.168.1.100"dhcp 0 respdelms 500dhcp 0 mask "255.255.255.0"dhcp 0 gateway "192.168.1.1"dhcp 0 DNS "192.168.1.1"sntp 0 server ""snmp 0 name "DIGI Transport Router SNMP Demo"snmp0contact"*********************"snmp 0 location "Munich, DE"snmpuser 0 eCommunity "CCp0VkxP"snmpuser 0 access "rw"ppp 0 timeout 300ppp 1 name "W-WAN"ppp 1 phonenum "*98*3#"ppp 1 username "username"ppp 1 epassword "KD5lSVJDVVg="ppp 1 IPaddr "0.0.0.0"ppp 1 timeout 0ppp 1 use_modem 1ppp 1 aodion 1ppp 1 autoassert 1ppp 1 r_chap OFFppp 3 defpak 16ppp 4 defpak 16web 0 prelogin_info ONweb 0 showgswiz ONftpcli 0 hostname ""ftpcli 0 directory "support/firmware/transport/MC7354_carrier_firmware"modemcc 0 info_asy_add 4modemcc 0 apn "none"modemcc 0 link_retries 30modemcc 0 stat_retries 30modemcc 0 sms_interval 1modemcc 0 sms_access 1modemcc 0 sms_concat 0modemcc 0 apn_2 "none"modemcc 0 link_retries_2 30modemcc 0 stat_retries_2 30modemcc 0 sms_interval_2 1 modemcc 0 sms_access_2 1 modemcc 0 sms_concat_2 0ana 0 l1on ONana 0 lapdon 0ana 0 asyon 1ana 0 logsize 45cmd 0 unitid "ss%s>"cmd 0 cmdnua "99"cmd 0 hostname "digi.router" cmd 0 asyled_mode 2cmd 0 tremto 1200cmd 0 rcihttp ONuser 0 access 0user 1 name "username"user 1 epassword "KD5lSVJDVVg=" user 1 access 0user 2 access 0user 3 access 0user 4 access 0user 5 access 0user 6 access 0user 7 access 0user 8 access 0user 9 access 0local 0 transaccess 2sslsvr 0 certfile "cert01.pem" sslsvr 0 keyfile "privrsa.pem" ssh 0 hostkey1 "privSSH.pem" ssh 0 nb_listen 5ssh 0 v1 OFFcloud 0 ssl ON7.2Hardware and FirmwareHere are the Firmware and Hardware details of the WR21 used in the testing of this QN: Digi TransPort WR21-L42B-DE1-XX Ser#:212303Software Build Ver5.2.11.4. Jun 5 2015 04:39:32 WWARM Bios Ver 7.42u v43 454MHz B987-M995-F80-O8140,0 MAC:00042d039f68 Async Driver Revision: 1.19 Int clkEthernet Port Isolate Driver Revision: 1.11Firewall Revision: 1.0EventEdit Revision: 1.0Timer Module Revision: 1.1(B)USBHOST Revision: 1.0L2TP Revision: 1.10PPTP Revision: 1.00TACPLUS Revision: 1.00MODBUS Revision: 0.00RealPort Revision: 0.00MultiTX Revision: 1.00LAPB Revision: 1.12X25 Layer Revision: 1.19MACRO Revision: 1.0PAD Revision: 1.4X25 Switch Revision: 1.7V120 Revision: 1.16TPAD Interface Revision: 1.12GPS Revision: 1.0TELITUPD Revision: 1.0SCRIBATSK Revision: 1.0BASTSK Revision: 1.0PYTHON Revision: 1.0CLOUDSMS Revision: 1.0TCP (HASH mode) Revision: 1.14TCP Utils Revision: 1.13PPP Revision: 5.2WEB Revision: 1.5SMTP Revision: 1.1FTP Client Revision: 1.5FTP Revision: 1.4IKE Revision: 1.0PollANS Revision: 1.2PPPOE Revision: 1.0BRIDGE Revision: 1.1MODEM CC (SIERRA LTE) Revision: 5.2FLASH Write Revision: 1.2Command Interpreter Revision: 1.38SSLCLI Revision: 1.0OSPF Revision: 1.0BGP Revision: 1.0QOS Revision: 1.0PWRCTRL Revision: 1.0RADIUS Client Revision: 1.0SSH Server Revision: 1.0SCP Revision: 1.0SSH Client Revision: 1.0CERT Revision: 1.0LowPrio Revision: 1.0Tunnel Revision: 1.2OVPN Revision: 1.2TEMPLOG Revision: 1.0 QDL Revision: 1.0。
华为存储设备MIB接口说明书

华为存储设备M I B接口说明书华为存储MIB接口说明文档版本01发布日期2016-03-30版权所有 ? 华为技术有限公司2015。
保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
商标声明和其他华为商标均为华为技术有限公司的商标。
本文档提及的其他所有商标或注册商标,由各自的所有人拥有。
注意您购买的产品、服务或特性等应受华为公司商业合同和条款的约束,本文档中描述的全部或部分产品、服务或特性可能不在您的购买或使用范围之内。
除非合同另有约定,华为公司对本文档内容不做任何明示或默示的声明或保证。
由于产品版本升级或其他原因,本文档内容会不定期进行更新。
除非另有约定,本文档仅作为使用指导,本文档中的所有陈述、信息和建议不构成任何明示或暗示的担保。
华为技术有限公司地址:深圳市龙岗区坂田华为总部办公楼邮编:518129网址:目录1 概述本文档介绍了存储设备实现的各种MIB,包括各个MIB的功能、表间关系、单节点详细描述、MIB Table详细描述、告警节点详细描述。
读者对象本文档主要适用于以下人员:应用开发人员内容简介本文档包含1篇总体介绍和多个具体MIB参考文档,内容如下。
2 MIB介绍2.1 网络管理概述随着网络的规模越来越庞大,网络中的设备种类繁多,如何对越来越复杂的网络进行有效的管理,从而提供高质量的网络服务已成为网络管理所面临的最大挑战。
网络管理已成为整个网络解决方案中重要的一部分。
网络管理通常包含4个要素:●被管理节点:需要进行管理的设备。
●代理(Agent):跟踪被管理设备状态的软件或硬件。
●网络管理工作站(Manager):与在不同的被管理节点中的代理通信,并且显示这些代理状态的设备。
●网络管理协议:网络管理工作站和代理用来交换信息的协议。
目前TCP/IP网络中应用最为广泛的网络管理协议是简单网络管理协议SNMP(Simple Network Management Protocol)。
MIB结构和语法

1? MIB基础知识MIB(Management Information Base,管理信息库)是MO(Managed Object管理对象)定义的集合。
MIB文件是按照ASN.1定义的文本文件。
?每个管理对象都对应一个节点,并且用OID(Object Identifier)来标识;数据管理对象对应叶子节点;所有的管理对象形成了一棵管理树。
1.1 基本概念对象标识:对象标识是一种数据类型,它指明一种授权命名的对象。
表示为一个整数序列,以?(1)标准MIB:rfc1213, rfc1471 , rfc1724, rfc2618等等?? 注:通用性MIB rfc1213习惯称为MIB-II(2)自定义MIB:当标准MIB信息不足以描述厂商设备,需要自定义MIB,但首先要向IANA 组织申请编号。
1.3 MIB管理对象的基本属性管理对象的四个基本属性如下:(1)对象类型(Object Type):定义了一个特定对象的名字,例如sysUpTime。
这个名字只是一个标示符。
MIB对象既可以用这个标示符来表示,也可以用相应的MIB号码来表示。
例如定义internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }(2)语法(Syntax) :指定了数据类型,例如整数、8位组串数字(字符串;范围为0至255)、对象标识符(预先定义的数据类型别名)或NULL。
NULL是留待的后使用的空位。
(3)访问(Access):表明了这个特定对象的访问级别。
合法的值有:只读、读写、只写和不可存取。
(4)状态(Status):定义了这个对象的实现需要:必备的(被管理节点必须实现该对象);可选的((1(22????第1第第第第第2.1?v1中的(1)简单类型:Integer、Octet String、Object Identifier、Null(2)应用类型:IpAddress、Counter、Gauge、TimeTicks、Opaquev2中的(1)简单类型:Integer32、OctetString、Object Identifier、Null(2)应用类型:IpAddress、Counter32、Counter64、Gauge32、Unsigned32、TimeTicks、Opaque、BIT STRING2.2? 自定义MIB基本原则(1)优先采用标准MIB:如果确实无法满足要求才考虑自定义MIB(2)采用最新的SNMPV2-SMI来定义MIB:使用最新的SNMPv2定义MIB可以使得对MIB的描述更详尽,可用的类型也更丰富。
mib使用方法

mib使用方法MIB使用方法什么是MIB?MIB(Management Information Base),即管理信息库,是一个网络管理系统中使用的数据库,它存储了网络设备的各种配置和状态信息。
MIB的作用MIB可以帮助网络管理员以可视化的方式监测和管理网络设备。
它提供了一种统一的接口,使得设备厂商可以将自己的设备与网络管理系统集成,实现设备的远程管理和监控。
MIB的使用方法以下是一些常用的MIB使用方法,可以帮助管理员更好地理解和利用MIB。
1. MIB浏览器MIB浏览器是一个用于查看MIB数据库的工具。
它可以根据设备厂商提供的MIB文件,查看设备的各种信息。
管理员可以使用MIB浏览器搜索特定的OID(Object Identifier),并获取相关的信息。
2. MIB导入在一些网络管理系统中,管理员可以将设备的MIB文件导入到系统中,以便系统可以正确解析和显示设备的信息。
通过MIB导入,管理员可以更方便地监测和管理网络设备。
3. MIB监控MIB监控是指通过MIB获取设备的状态信息,并对这些信息进行实时监控。
管理员可以设置阈值,当设备状态超过某个阈值时,系统会自动报警。
这样可以帮助管理员及时发现和解决网络故障。
4. MIB编程一些高级网络管理系统还提供了API,允许管理员通过编程的方式来使用MIB。
管理员可以使用编程语言(如Python、Java等)来访问和操作MIB数据库,实现更精细的设备管理功能。
5. MIB与SNMPSNMP(Simple Network Management Protocol)是一种用于网络管理的协议。
MIB和SNMP是密不可分的关系,MIB定义了SNMP协议中所使用的各种数据类型和对象。
总结MIB是网络管理系统中的一项重要技术,它提供了设备的配置和状态信息。
管理员可以使用MIB浏览器、MIB导入、MIB监控、MIB编程等方法来使用MIB。
通过合理利用MIB,管理员可以更好地管理和监控网络设备,及时发现和解决问题。
Mib文件分析

Mib文件分析使用MIB浏览器:从/mibbrowser.htm下载JMIBBrowser学习浏览MIB。
下载JMIBBrowser后解压,点击mib.bat文件运行程序。
开启图形界面以后点击Load MIB 载入RFC1213-MIB,然后在Select Server中填入172.30.70.1,在左侧树状菜单中选择相应OID,点击get就可以浏览相应MIB信息了。
考察对象:The system group—The system group is the basic group in the Internet standard MIB. Its elements are probably the most accessed managed objects.获取数据及分析:-- the System group-- Implementation of the System group is mandatory for all-- systems. If an agent is not configured to have a value-- for any of these variables, a string of length 0 is-- returned.① sysDescr OBJECT-TYPESYNTAX DisplayString (SIZE (0..255))ACCESS read-onlySTATUS mandatoryDESCRIPTION"A textual description of the entity. This valueshould include the full name and versionidentification of the system's hardware type,software operating-system, and networkingsoftware. It is mandatory that this only containprintable ASCII characters."::= { system 1 }Get:Request : Get .1.3.6.1.2.1.1.1.0Creating Session..Displaying results...Oid : 1.3.6.1.2.1.1.1.0 (sysDescr.0 )Value : Huawei Versatile Routing Platform SoftwareVRP(R) Software, Version 3.10(NSSA), RELEASE 5331SP01Copyright (c) 2001-2004 HUAWEI TECH CO., LTD.Quidway S8016Analysis:networking software: VRP(R) Software (Versatile Routing Platform Software) Version:Version 3.10(NSSA)name: Quidway S8016②sysObjectID OBJECT-TYPESYNTAX OBJECT IDENTIFIERACCESS read-onlySTATUS mandatoryDESCRIPTION"The vendor's authoritative identification of thenetwork management subsystem contained in theentity. This value is allocated within the SMIenterprises subtree (1.3.6.1.4.1) and provides aneasy and unambiguous means for determining `whatkind of box' is being managed. For example, ifvendor `Flintstones, Inc.' was assigned thesubtree 1.3.6.1.4.1.4242, it could assign theidentifier 1.3.6.1.4.1.4242.1.1 to its `FredRouter'."::= { system 2 }Get:Request : Get .1.3.6.1.2.1.1.2.0Creating Session..Displaying results...Oid : 1.3.6.1.2.1.1.2.0 (sysObjectID.0 )Value : 1.3.6.1.4.1.2011.2.23.11.2Analysis:使用SMI 企业子树进行网络分配的供应商标识。
MIB结构和语法
1 MIB基础知识MIB(Management Information Base,管理信息库)是MO(Managed Object 管理对象)定义的集合。
MIB文件是按照ASN.1定义的文本文件。
每个管理对象都对应一个节点,并且用OID(Object Identifier)来标识;数据管理对象对应叶子节点;所有的管理对象形成了一棵管理树。
1.1 基本概念对象标识:对象标识是一种数据类型,它指明一种授权命名的对象。
表示为一个整数序列,以点分隔。
MIB树:表示对象标识的整数构成一个树型结构,类似于DNS和文件系统。
对象标识从顶部开始,顶部没有标识,以root表示。
所有的MIB变量都从1.3.6.1.2.1这个标识开始。
树上的每个节点还有文字名,例如:1.3.6.1.2.1就和.dod.internet.memt.mib对应。
图1 管理信息库的对象命名举例1.2 MIB分类MIB依据数据的通用性可以分为:(1)标准MIB:rfc1213, rfc1471 , rfc1724, rfc2618等等注:通用性MIB rfc1213习惯称为MIB-II(2)自定义MIB:当标准MIB信息不足以描述厂商设备,需要自定义MIB,但首先要向IANA组织申请编号。
1.3 MIB管理对象的基本属性管理对象的四个基本属性如下:(1)对象类型(Object Type):定义了一个特定对象的名字,例如sysUpTime。
这个名字只是一个标示符。
MIB对象既可以用这个标示符来表示,也可以用相应的MIB号码来表示。
例如定义internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }那么既可以用internet也可以用字串.1.3.6.1来表示这个对象。
(2)语法(Syntax) :指定了数据类型,例如整数、8位组串数字(字符串;范围为0至255)、对象标识符(预先定义的数据类型别名)或NULL。
mib库管理 标准
mib库管理标准MIB(Management Information Base)库是网络管理系统中非常重要的组成部分,它定义了网络中各种设备的管理信息。
通过MIB库,网络管理员可以实现对网络设备的监控、配置和故障诊断等功能。
本文将介绍MIB库管理标准的相关内容。
一、MIB库的基本概念1. MIB库的定义:MIB库是一种用于存储管理信息的数据库,它以树形结构的形式组织管理信息。
MIB库中的每个管理信息项都由一个唯一的标识符表示。
2. OID(Object Identifier):OID是MIB库中用于唯一标识管理信息项的标识符。
OID采用了层级结构,每一级都由一个数字表示,例如1.3.6.1.2.1.1代表了MIB库中的一个管理信息项。
3. MIB文件:MIB文件是用于描述MIB库中各个管理信息项的规范。
MIB文件通常使用ASN.1(Abstract Syntax Notation One)语言来定义管理信息项的结构和语义。
二、MIB库管理的工具和协议1. SNMP(Simple Network Management Protocol):SNMP是一种用于管理和监控网络设备的应用层协议。
SNMP通过GET和SET等消息实现对MIB库的读写操作。
SNMP协议定义了MIB库的访问方式和操作规范。
2. MIB浏览器:MIB浏览器是用于查看和管理MIB库的工具。
MIB浏览器可以根据MIB文件的定义显示MIB库中的各个管理信息项,并提供相应的操作界面。
3. MIB编译器:MIB编译器用于将MIB文件编译成可供SNMP协议使用的格式。
编译后的文件通常以二进制格式存储,以提高MIB库的访问效率。
三、MIB库管理的流程1. MIB库的导入:在使用MIB库之前,需要将MIB文件导入到MIB库管理工具中。
MIB文件的导入可以通过MIB浏览器或MIB编译器完成。
2. MIB库的浏览和编辑:导入MIB文件后,可以使用MIB浏览器对MIB库进行浏览和编辑。
MIB Browser使用手册范本
MIB Browser使用手册摩托罗拉(中国)电子有限公司无线网络解决方案事业部2011/06/081使用MIBBrowser进行MIB文件编译MG-SOFT MIB Browser 是MIB测试常用的工具,使用该工具进行MIB测试前首先要正确编译所测试的MIB文件。
这里介绍一下如何进行MIB文件的编译:1.1打开MIB COMPILER界面:1、从开始菜单打开MIB Compiler界面方法如下:开始->程序->MG-SOFT MIB Browser->MIB Compiler2、从MIB Browser界面打开MIB Complier方法如下:在上图中点击红色标出的按钮。
1.2单个文件编译:使用MIB-Compiler可以进行单个文件的编译,操作方法如下:1、在MIB Compiler界面点击红色标出按钮,如下:打开存放未编译MIB文件的目录:选定要编译的MIB文件,双击即可。
2、MIB文件编译成功后,会有如下提示信息:即,MIB文件编译成功,可以保存,在如下界面点击"save"按钮将编译成功的MIB文件保存到默认路径下:1.3批量MIB文件编译批量MIB文件编译是对同一目录下的所有MIB文件一次编译,具体操作方法如下:1、在MIB Compiler界面选择“Compile multiple MIB files”按钮2、打开批量MIB文件编译选择窗口,如下:这里是对目录下的所有MIB文件进行编译;编译完成后,对编译完的MIB文件进行保存:由于多MIB文件编译是对指定目录中的MIB文件依次编译,如果某个MIB文件编译需要引入的另外一个文件在后面的话,会导致该MIB文件编译由于缺少需要引入的MIB文件而失败;因此对指定目录中的MIB文件编译保存后,可能会有一部分MIB文件编译失败;这时需要重新进行一次批量编译,并将编译后的MIB文件保存在同一目录下。
1.4单个MIB文件编译和批量MIB文件编译中应注意的问题需要将未编译的MIB文件存放到没有中文的路径下,若未编译的MIB文件存放目录中有中文,将导致MIB文件编译失败。
mib文件使用方法
mib文件使用方法MIB文件是管理信息库(Management Information Base)的缩写,它是一种用于网络管理的标准文件格式。
MIB文件的使用方法主要包括MIB的定义、MIB的解析和MIB的应用。
本文将详细介绍MIB文件的使用方法。
一、MIB的定义MIB文件是一种文本文件,其中包含了网络设备的配置信息和状态信息。
MIB文件使用一种类似于结构化的语言来定义各种对象和属性。
MIB文件通常以.mib作为文件扩展名,并可以使用文本编辑器进行查看和编辑。
MIB文件中的对象和属性都采用了层次结构的命名方式,类似于文件系统的路径。
每个对象都有一个唯一的标识符,称为OID (Object Identifier)。
OID由一系列数字组成,用点号进行分隔。
MIB文件中定义了各种不同类型的对象,例如整数、字符串、布尔值等,这些对象可以用来描述设备的各种状态和配置。
二、MIB的解析MIB文件中的对象和属性通常是通过OID进行访问和解析的。
解析MIB文件的过程可以分为两个步骤:编译和加载。
编译是指将MIB文件转换为计算机可以理解的格式。
编译器会读取MIB文件中的定义,并生成相应的数据结构和代码。
这些数据结构和代码可以用来在程序中访问和操作MIB中定义的对象和属性。
加载是指将编译后的MIB文件加载到网络管理系统中。
网络管理系统可以根据MIB文件中的定义,建立设备的管理模型,并通过SNMP等协议与设备进行通信。
加载MIB文件后,网络管理系统可以使用OID来访问和操作设备的各种状态和配置。
三、MIB的应用MIB文件的应用主要包括设备管理和网络监控两个方面。
设备管理是指使用MIB文件来管理和配置网络设备。
通过MIB文件,管理员可以获取设备的各种状态信息,例如CPU使用率、内存使用量等。
管理员还可以修改设备的配置,例如修改IP地址、启用或禁用某个接口等。
设备管理可以通过命令行界面、图形界面或脚本来实现。
网络监控是指使用MIB文件来监控网络的状态和性能。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
INDEX{zkClassInfoIndex}
::= {zkClassInfoTable2 1}
ZkClassInfoEntry2 ::= SEQUENCE {
zkClassInfoSex2Integer32,
zkClassInfoAge2Integer32,
zkCLassInfoName2DisplayString,
DESCRIPTION
"
"
::= {zkClassInfoEntry 1}
zkClassInfoSex OBJECT-TYPE
SYNTAXInteger32 {
man(1),
woman(2)
}
MAX-ACCESSread-write
STATUScurrent
DESCRIPTION
"
"
::= {zkClassInfoEntry 2}
关键字
说明
备注
tablename
表格名
xxxxTable首字母小写
Entrytype
表对象名
XxxxEntry首字母大写
not-accessible
访问方式
此处必须是not-accessible
entryname
行名
和XxxxEntry名相同,首字母小写xxxxEntry
description
描述信息
DESCRIPTION
"
"
::= {zkClassInfoEntry 5}
zkClassInfoTable2 OBJECT-TYPE
SYNTAXSEQUENCE OF ZkClassInfoEntry2
MAX-ACCESSnot-accessible
STATUScurrent
DESCRIPTION
"
源码如下:
XXX-TEST-MIB DEFINITIONS ::= BEGIN
IMPORTS
enterprises
FROM RFC1155-SMI
Integer32
FROM SNMPv2-SMI
DisplayString
FROM SNMPv2-TC;
xxx OBJECT IDENTIFIER ::= {enterprises22566}
zkClassInfoAddress2DisplayString
}
zkClassInfoSex2 OBJECT-TYPE
SYNTAXInteger32
MAX-ACCESSread-write
STATUScurrent
DESCRIPTION
"
"
::= {zkClassInfoEntry2 1}
END
注:分号,英文全角分号。
在一个MIB file中,所有引用到的数据类型均应有引用。
如:
IMPORTS
enterprises
FROM RFC1155-SMI
Integer32
FROM SNMPv2-SMI
DisplayString
FROM SNMPv2-TC;
MIB
对象标识
对象标识用关键字OBJECT IDENTIFIER声明,它的主要功能是用来将一类功能的对象结合起来。展开或折叠此对象标识即可展开或折叠此类功能的所有对象。
在ASN.1中,对象标识符类型描述对象的抽象信息,MIB树中的每一个标号是用对象标识符描述的。
例如:
xxx OBJECT IDENTIFIER ::= {enterprises22566}
xxx是一个子树支,它定义在enterprises树支下,“22566”是子树xxx在父树enterprises下的一个唯一对象标识符。
deprecated (反对的)
obsolete(废弃的)
description
对被管理对象的功能、特征等进行描述的关键字
例如:
XxxxOBJECT-TYPE
SYNTAXDisplayString
MAX-ACCESSread-only
STATUScurrent
DESCRIPTION
"
"
::={xxxx1 }
DESCRIPTIONdescription
INDEX{index list}
:: ={ (tablename) 1}
(Entrytype):: =
SEQUENCE{
(column1)(column1type),
(column2)(column1type),
(columnN)(columnNtype)}
zkClassInfoTable OBJECT IDENTIFIER ::= {xxx 1}
zkClassInfoTable2 OBJECT IDENTIFIER ::= {xxx 2}
zkClassInfoTable OBJECT-TYPE
SYNTAXSEQUENCE OF ZkClassInfoEntry
表类型
表类型是一个特殊类型的声明,表内声明的对象称为列对象,表对象可以看作是一些标量对象的集合。利用SEQUENCE和SEQUENCE OF定义表格和表格中的行,通常来说,表格对象的名字后面加有后缀Table,行对象的名字后面加有后缀Entry。
其声明如下:
tablenameOBJECT-TYPE
SYNTAX SEQUENCE OFEntrytype
TimeTicks(时间戳)
NetworkAddress(网络地址)
IpAddress(Ipv4地址)
access
该节点支持的访问方式
read-only(只读)
read-write(读写)
read-create(读和创建)
no-accessible(不可访问)
status
该节点的状态
current (当前的)
zkClassInfoAge OBJECT-TYPE
SYNTAXInteger32
MAX-ACCESSread-write
STATUScurrent
DESCRIPTION
"
"
::= {zkClassInfoEntry 3}
zkCLassInfoName OBJECT-TYPE
SYNTAXDisplayString
MAX-ACCESSnot-accessible
STATUScurrent
DESCRIPTION(description)
:: ={ (parent) (number)}
entrynameOBJECT-TYPE
SYNTAXEntrytype
MAX-ACCESSnot-accessible
STATUScurrent
This is test table.
"
::= {xxx 2}
zkClassInfoEntry2 OBJECT-TYPE
SYNTAXZkClassInfoEntry2
MAX-ACCESS not-accessible
STATUScurrent
DESCRIPTION
"
This is teat entry.
zkClassInfoAgeInteger32,
zkCLassInfoNameDisplayString,
zkClassInfoAddressDisplayString
}
zkClassInfoIndex OBJECT-TYPE
SYNTAXInteger32
MAX-ACCESSread-write
STATUScurrent
::= { ( parent ) ( number )
关键字
说明
备注
objectname
被管理对象的名字
必须以小写字母开头
OBJECT-TYPE
每一个叶子对象所必须的关键字
syntax
被管理对象类型的关键字
Counter(计数)
Gauge(标准)
DisplayString(显示字符串)
Interger(整数)
MAX-ACCESSread-write
STATUScurrent
DESCRIPTION
"
"
::= {zkClassInfoEntry 4}
zkClassInfoAddress OBJECT-TYPE
SYNTAXDisplayString
MAX-ACCESSread-write
STATUScurrent
MAX-ACCESSnot-accessible
STATUScurrent
DESCRIPTION
"
This is test table.
"
::= {xxx 1}
zkClassInfoEntry OBJECT-TYPE
SYNTAXZkClassInfoEntry
MAX-ACCESS not-accessible
其编译后的视图为:
在每一个树支下,可以定义被管理资源的管理对象,其中一类是标量节点(直观地看象树叶的节点)。利用OBJECT-TYPE定义。其定义的句法如下:
objectnameOBJECT-TYPE
SYNTAX(syntax)
MAX-ACCESS(access)
STATUS(status)
DESCRIPTION(description)
MIB
MIB file
所有的MIB file的都以DEFNITIONS::= BEGIN关键字开始,以END结束。我们所有添加的节点均应在此之间。
XXX-TEST-MIBDEFINITIONS ::= BEGIN