-- mib文件的开头指定文件名,并且使用BEGIN开始,文件的最后用END结束
-- IMPORTS就相当与c语言中的include,包含需要使用的一些数据类型
-- 通过FROM指定引用的来源
MOXA-CN2600-MIB DEFINITIONS ::= BEGIN
IMPORTS
enterprises,
IpAddress,
OBJECT-TYPE FROM SNMPv2-SMI
DateAndTime,
TEXTUAL-CONVENTION,
MacAddress,
DisplayString   FROM SNMPv2-TC; -- 不同的公司在enterprises节点下注册注册自己的id,moxa的节点是8691
-- 使用OBJECT IDENTIFIER指定OID
moxa OBJECT IDENTIFIER ::= { enterprises } -- 1.3.6.1.4.1.
-- 指定nport串口服务器是在moxa节点下的分支,id是2
-- oid: 1.3.6.1.4.1.8691.2
nport OBJECT IDENTIFIER ::= { moxa } -- 1.3.6.1.4.1.8691.2
-- 产品型号cn2600,是在nport串口服务器分支下,节点是11
-- oid: 1.3.6.1.4.1.8691.2.
cn2600 MODULE-IDENTITY
LAST-UPDATED "201003040000Z"
ORGANIZATION "Moxa Inc."
CONTACT-INFO
"Email: support@moxa.com
Tel : + ext." DESCRIPTION
"The MIB module for Moxa Terminal Server CN2600 series specific information." ::= { nport } -- 1.3.6.1.4.1.8691.2. -- -------------------------------------------------------------
-- groups in the MOXA-CN2600-2AC MIB
-- ------------------------------------------------------------- swMgmt OBJECT IDENTIFIER ::= { cn2600 } -- 1.3.6.1.4.1.8691.2.11.1 -- -------------------------------------------------------------
-- Textual Conventions
-- ------------------------------------------------------------- PortList ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Each octet within this value specifies a set of eight
ports, with the first octet specifying ports through
, the second octet specifying ports through , etc.
Within each octet, the most significant bit represents
the lowest numbered port, and the least significant bit
represents the highest numbered port. Thus, each port
of the bridge is represented by a single bit within the
value of this object. If that bit has a value of ''
then that port is included in the set of ports; the port
is not included if its bit has a value of ''."
SYNTAX OCTET STRING -- -------------------------------------------------------------
-- swMgmt group
-- ------------------------------------------------------------- -- -------------------------------------------------------------
-- Overview
-- ------------------------------------------------------------- overview OBJECT IDENTIFIER ::= { swMgmt } -- 1.3.6.1.4.1.8691.2.11.1.
-- 模块名称
-- 类型:DisplayString,类似字符串
-- 访问权限:只读
-- 状态:当前
-- id: overview
-- 1.3.6.1.4.1.8691.2.11.1.1.1
modelName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The model name of the CN2600."
::= { overview } -- 1.3.6.1.4.1.8691.2.11.1.1.1
-- 数据类型:整型
serialNumber OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The serial number of the CN2600. Every Terminal Server CN2600
series is assigned a unique serial
number before it is shipped."
::= { overview } firmwareVersion OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The version of the firmware currently running on the CN2600."
::= { overview }
-- 类型:ip地址
viewLan1IpAddress OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The IP address of the CN2600's LAN1 interface."
::= { overview }
-- 类型:mac地址
viewLan1MacAddress OBJECT-TYPE
SYNTAX MacAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The MAC address of the CN2600's LAN1 interface."
::= { overview } -- 省略其中的一些。。。。。 -- 可以指定整型的范围之后0,1两个值,类似枚举
-- 前面的"power-off","power-on"用于描述
power1Status OBJECT-TYPE
SYNTAX INTEGER {
power-off(),
power-on()
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The on/off status of power 1"
::= { overview } power2Status OBJECT-TYPE
SYNTAX INTEGER {
power-off(),
power-on()
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The on/off status of power 2 for 2AC model"
::= { overview } -- -------------------------------------------------------------
-- Basic settings
-- ------------------------------------------------------------- basicSetting OBJECT IDENTIFIER ::= { swMgmt } -- 1.3.6.1.4.1.8691.2.11.1. -- -------------------------------------------------------------
-- Basic settings -> Server settings
-- ------------------------------------------------------------- serverSetting OBJECT IDENTIFIER ::= { basicSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.1 serverName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A text string used to identify the CN2600."
::= { serverSetting } serverLocation OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A text string used to identify the location of the CN2600. This
option is useful for specifying the location or
application of different CN2600."
::= { serverSetting } -- -------------------------------------------------------------
-- Basic settings -> Time settings
-- ------------------------------------------------------------- timeSetting OBJECT IDENTIFIER ::= { basicSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.2
-- 时间设置,可以进行读写
timeZone OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The time-zone index of the CN2600."
::= { timeSetting } localTime OBJECT-TYPE
SYNTAX DateAndTime
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The system time in seconds since 1970/1/1."
::= { timeSetting } -- -------------------------------------------------------------
-- Serial port settings
-- ------------------------------------------------------------- portSetting OBJECT IDENTIFIER ::= { swMgmt } -- 1.3.6.1.4.1.8691.2.11.1.2.4 -- -------------------------------------------------------------
-- Serial port settings -> Operation Modes settings
-- ------------------------------------------------------------- opModeSetting OBJECT IDENTIFIER ::= { portSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.4. -- --------------------------------------------------------------------------------------
-- Serial port settings -> Operation Modes settings -> Operation Modes
-- -------------------------------------------------------------------------------------- opMode OBJECT IDENTIFIER ::= { opModeSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1
-- 表类型的定义
-- 使用SEQUENCE OF定义一种新的类型OpModePortEntry
-- 有点像C语言中结构体的定义
-- opModePortTable是表名,开头必须小写,并且结尾必须包含"Table"
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.
opModePortTable OBJECT-TYPE
SYNTAX SEQUENCE OF OpModePortEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The serial ports' operation mode table."
::= { opMode }
-- 表中一行的名称:opModePortEntry,每行数据的数据类型是一样的
-- 类型是:OpModePortEntry
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1
-- 表中第一个必须是INDEX,作为索引,并且是不可访问的。
opModePortEntry OBJECT-TYPE
SYNTAX OpModePortEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The serial port's operation mode entry."
INDEX { portIndex }
::= { opModePortTable } -- 表中数据类型 ,类似结构体定义,并且第一个是INDEX
-- 一行中,每一列的数据类型定义如下
-- INDEX如果前面定义了,就说使用前面一个表的索引,那么这里也可以省略
OpModePortEntry ::=
SEQUENCE {
portIndex
INTEGER,
portApplication
INTEGER,
portMode
INTEGER
}
-- 对索引的定义,权限不可访问,里面没有数据,所以访问也没有意义
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1.
-- 在一行opModePortEntry中,第一个元素
portIndex OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The serial port index."
::= { opModePortEntry } -- 表中一行中第二个元素的定义
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1.
portApplication OBJECT-TYPE
SYNTAX INTEGER {
disable(),
device-Control(),
socket(),
redundant-Com(),
drdas(),
terminal(),
reverse-Terminal(),
dial-InOut()
}
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The application of the serial port.
Note that changing this setting may also change the
operation mode."
::= { opModePortEntry } -- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1.
portMode OBJECT-TYPE
SYNTAX INTEGER {
real-Com(),
slip(),
slipd(),
ppp(),
disable(),
telnetd(),
dynamic(),
tcp-Server(),
tcp-Client(),
udp(),
pppd(),
term-ASC(),
term-BIN(),
rfc-(),
redundant-Com(),
drdas-Real-Com(),
drdas-Tcp-Server(),
}
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The operation mode of the serial port. Note that
changing this setting may also change the application."
::= { opModePortEntry } END

SNMP MIB库的更多相关文章

  1. SNMP学习笔记之SNMP介绍,OID及MIB库

    1.1.    SNMP概览 SNMP的基本知识介绍简单网络管理协议(SNMP-Simple Network Management Protocol)是一个与网络设备交互的简单方法.该规范是由IETF ...

  2. SNMP MIB中的含read-create节点的表的实现

    做过snmp/mib开发的知道,常见的节点类型一般只有no-accessible,read-only,read-write三种访问类型.snmp V2中引入了一种新的访问类型:read-create. ...

  3. SNMP介绍,OID及MIB库

    http://blog.sina.com.cn/s/blog_4502d59c0101fcy2.html

  4. lwip 2.0.2 snmp mib ipv6

    1.3.6.1.2.1 - SNMP MIB-2 Submitted by Harald.T.Alvestrand at uninett.no from host aun.uninett.no (12 ...

  5. SNMP mib文件说明

    MIB file的开始和结束 所有的MIB file的都以DEFINITIONS ::= BEGIN关键字开始,以END结束.我们所有添加的节点均应在此之间. XXX-TEST-MIB DEFINIT ...

  6. 使用厂商MIB库查找设备OID值 并实施监控的方法

    http://chuansong.me/n/2700132 https://wenku.baidu.com/view/eeaeb1d680eb6294dd886cc7.html

  7. 使用厂商MIB库查找设备OID值并实施监控的方法

    https://wenku.baidu.com/view/8f4b389e0029bd64783e2cd0.html

  8. 通过snmp监控linux

    一.linux snmpd安装 yum install -y net-snmp net-snmp-utils 二.snmp的配置(vim /etc/snmp/snmpd.conf) com2sec n ...

  9. 天马行空-Ops平台建设概述

    1           概述 什么是Ops平台,Ops平台的目标是什么,建设的考虑点有哪些?本章节以实际生活中医院的例子来进行各形象的阐述. 医院包含各种诊断治疗设备,病历库,医生.一个孕妇需要到医院 ...

随机推荐

  1. HTML杂记

    1.URL  uniform resource locator 遵循格式: scheme://host.domain:port/path/filename scheme - 定义因特网服务的类型.最常 ...

  2. HTML5学习笔记(十二):JavaScript新增Map和Set

    Map JavaScript的默认对象表示方式{}可以视为其他语言中的Map或Dictionary的数据结构,即一组键值对. 但是JavaScript的对象有个小问题,就是键必须是字符串.但实际上Nu ...

  3. Flink papers

    Around 2009 the Stratosphere research project started at the TU Berlin which a few years later was s ...

  4. (原创)用c++11打造好用的variant(更新)

    关于variant的实现参考我前面的博文,不过这第一个版本还不够完善,主要有这几个问题: 内部的缓冲区是原始的char[],没有考虑内存对齐: 没有visit功能. 没有考虑赋值构造函数的问题,存在隐 ...

  5. javascript基础拾遗(三)

    1.map数组映射操作 function add(x) { return x+1 } var nums = [1,3,5,7,9] result = nums.map(add) console.log ...

  6. mysql--Ubuntu下设置MySQL字符集为utf8

    1.mysql配置文件地址/etc/mysql/my.cnf 2.在[mysqld]在下方添加以下代码[mysqld]init_connect='SET collation_connection = ...

  7. js模拟form打开新窗口

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. hive的join查询

    hive的join查询 语法 join_table: table_reference [INNER] JOIN table_factor [join_condition] | table_refere ...

  9. 【转】31个实用的find命令

    find . -name "*.sql" -exec md5sum {} \; 一.主要内容 ====================================== . 用文 ...

  10. 4. EM算法-高斯混合模型GMM详细代码实现

    1. EM算法-数学基础 2. EM算法-原理详解 3. EM算法-高斯混合模型GMM 4. EM算法-高斯混合模型GMM详细代码实现 5. EM算法-高斯混合模型GMM+Lasso 1. 前言 EM ...