SNMP MIB库
-- 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库的更多相关文章
- SNMP学习笔记之SNMP介绍,OID及MIB库
1.1. SNMP概览 SNMP的基本知识介绍简单网络管理协议(SNMP-Simple Network Management Protocol)是一个与网络设备交互的简单方法.该规范是由IETF ...
- SNMP MIB中的含read-create节点的表的实现
做过snmp/mib开发的知道,常见的节点类型一般只有no-accessible,read-only,read-write三种访问类型.snmp V2中引入了一种新的访问类型:read-create. ...
- SNMP介绍,OID及MIB库
http://blog.sina.com.cn/s/blog_4502d59c0101fcy2.html
- 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 ...
- SNMP mib文件说明
MIB file的开始和结束 所有的MIB file的都以DEFINITIONS ::= BEGIN关键字开始,以END结束.我们所有添加的节点均应在此之间. XXX-TEST-MIB DEFINIT ...
- 使用厂商MIB库查找设备OID值 并实施监控的方法
http://chuansong.me/n/2700132 https://wenku.baidu.com/view/eeaeb1d680eb6294dd886cc7.html
- 使用厂商MIB库查找设备OID值并实施监控的方法
https://wenku.baidu.com/view/8f4b389e0029bd64783e2cd0.html
- 通过snmp监控linux
一.linux snmpd安装 yum install -y net-snmp net-snmp-utils 二.snmp的配置(vim /etc/snmp/snmpd.conf) com2sec n ...
- 天马行空-Ops平台建设概述
1 概述 什么是Ops平台,Ops平台的目标是什么,建设的考虑点有哪些?本章节以实际生活中医院的例子来进行各形象的阐述. 医院包含各种诊断治疗设备,病历库,医生.一个孕妇需要到医院 ...
随机推荐
- Spanner_
https://en.wikipedia.org/wiki/Spanner_(database) http://static.googleusercontent.com/media/research. ...
- glob 文件或目录查找
glob模块是最简单的模块之一,内容非常少.用它可以查找符合特定规则的文件或目录(含相对或绝对路径).跟使用windows下的文件搜索差不多. 在python中,glob模块是用来查找匹配的文件的 在 ...
- 【ARM】2410裸机系列-流水灯
开发环境 1.硬件平台:FS2410(s3c2410) 2.主机:Ubuntu 12.04 LTS LED原理图 LED的GPIO的配置 配置GPFCON寄存器,设置GPF4-7为输出 配置GPF ...
- Java类的成员初始化顺序
Java类的成员初始化顺序 2017-06-01 代码: public class InitializeSequence { public static void main(String[] args ...
- CISCO、H3C、华为三层交换机端口二三层切换命令对比
很多人都在问H3C是否有像CISCO三层端口切换类似的命令 switchport . 答案是肯定的.有.很多人都不知道. 其实无论是思科还是H3C还是华为他们都有这样的命令.但是在H3C和华为中不经常 ...
- 前端js上传文件插件
1. plupload文件上传 2.ajaxfileupload文件上传
- LeetCode: Best Time to Buy and Sell Stock 解题报告
Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a gi ...
- 'Project Name' was compiled with optimization
'Project Name' was compiled with optimizationhtml, body {overflow-x: initial !important;}html { font ...
- 【Web安全】越权操作——横向越权与纵向越权
参考:http://blog.csdn.net/github_39104978/article/details/78265433 看了上面的文章,对越权操作的概念还是比较模糊,不明确实际场景. 横向越 ...
- Tensorflow问题汇总
问题: Cannot assign a device for operation 'MatMul': Operation was explicitly assigned to /device:GPU: ...