-- 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. HTML5学习笔记(六):CSS基本样式

    背景 需要注意:背景的所有属性都不会向下进行继承. 背景色 我们可以设定一个纯色为背景色. p {background-color: red;} a {background-color: #ff000 ...

  2. 菜鸟学SSH(五)——Struts2上传文件

    上传文件在一个系统当中是一个很常用的功能,也是一个比较重要的功能.今天我们就一起来学习一下Struts2如何上传文件. 今天讲的上传文件的方式有三种: 1,以字节为单位传输文件: 2,Struts2封 ...

  3. numRecordsIn 在哪里实现?

    /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreem ...

  4. How do I learn mathematics for machine learning?

    https://www.quora.com/How-do-I-learn-mathematics-for-machine-learning   How do I learn mathematics f ...

  5. 高级数据库及一步一步搭建versant数据库

    总的来说,高级数据库课程分为分布式数据库和面向对象数据库两块.分布式数据库介绍了分布式数据库的方方面面,包括数据库系统的设计.查询处理优化.事务管理和恢复.并发控制.可靠性.安全性与目录管理等.面向对 ...

  6. (原创)C++11改进我们的程序之简化我们的程序(八)

    本次要讲的是如何通过泛型函数来简化我们的程序. 泛型函数除了之前介绍的一些优点外还有两个重要的优点 1.消除重复逻辑,提高程序的内聚性和健壮性 泛型函数在某种程度上用来弥补泛型类型的不足.通过泛型类型 ...

  7. javascript基础拾遗(十)

    1.支持ES6标准的浏览器 IE10+ Chrome Safari Firefox 移动端浏览器统一都支持 需要注意的是,不同浏览器对各个特性的支持也不一样 2.window对象 当前浏览器窗口对象 ...

  8. running boot2docker -> error in run: Failed to get machine “boot2docker-vm”: machine does not exist

    登陆和使用.详细请看.....https://github.com/boot2docker/boot2docker boot2docker start error in run: Failed to ...

  9. 【linux排错】"error while loading shared libraries: xxx.so.x" 错误的原因和解决办法

    一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误, 比如: lcw: error : cannot open shared object file: No such file ...

  10. FastJson的常用操作

    FastJson的常用操作 2017-06-05 常用操作包括以下内容: 对象与(JsonObject或JsonArray)与String的互换 String转换为(JsonObject或JsonAr ...