本文记录的是在进行Net-SNMP配置及测试时经常用到的命令,具体的使用方法可参考命令的帮助文档。

####1. net-snmp-create-v3-user#### 正如命令的字面意思,该命令用来创建 Net-SNMP v3用户。

####2. net-snmp-config####

1
2
3
4
5
6
7
The net-snmp-config shell script is designed to retrieve the  
configuration information about the libraries and binaries dealing
with the Simple Network Management Protocol (SNMP), built from the
net-snmp source package. The information is particularily useful
for applications that need to link against the SNMP libraries and
hence must know about any other libraries that must be linked in
as well.

net-snmp-config命令用来获取处理SNMP协议的库和二进制文件的配置信息,其从Net-SNMP的源文件包编译而得。该信息对那些依赖于SNMP库的应用尤其有用.

Continue reading

本文记录是如何配置 Net-SNMP VACM. VACM,即 View Based Access Control.分为两部分: 1. VACM的快速配置 2. VACM的综合配置,该配置能够更加精细地配置用户的访问控制权限.

###一、VACM的快速配置###

####1. SNMPv1 and SNMPv2 rocommunity/rwcommunity#### 对于SNMPv1和SNMPv2c,对基于COMMUNITY的请求,能够将其访问权限限定在特定的OID树,且将访问来源限定在特定的IP访问内,通常采用如下格式:

1
2
3
4
rocommunity COMMUNITY [SOURCE [OID]]
rwcommunity COMMUNITY [SOURCE [OID]]
rocommunity6 COMMUNITY [SOURCE [OID]]
rwcommunity6 COMMUNITY [SOURCE [OID]]

对于SNMP 5.3及其以上的版本,该指示符也能够将其访问权限限定在特定的视图VIEW中,语法如下:

1
2
3
4
rocommunity COMMUNITY SOURCE -V VIEW
rwcommunity COMMUNITY SOURCE -V VIEW
rocommunity6 COMMUNITY SOURCE -V VIEW
rwcommunity6 COMMUNITY SOURCE -V VIEW
Continue reading

本文记录的是对 Net-SNMP 中 VACM mask 的理解,VACM 即 View Based Access Control 的缩写,其用于控制用户访问设备 MIB 树的权限。

在snmpd.conf 中使用 view 标识符加以 mask 参数,能够将用户的访问权限控制在 MIB Table 中的某一特定行,下面是 man page 中的摘要:

Continue reading

本文记录的是如何使用 64-bit 的mib计算Linux设备的存储大小。

为了解决snmp采集大容量(>2T)Linux设备时dskTotal越界的问题, 在snmp5.5+版本中引入了64bit的mibs, 包括 (UCD-SNMP-MIB::dskTotalLow,UCD-SNMP-MIB::dskTotalHigh),(UCD-SNMP-MIB::dskAvailLow,UCD-SNMP-MIB::dskAvailHigh),(UCD-SNMP-MIB::dskUsedLow,UCD-SNMP-MIB::dskUsedHigh), 那么如何利用64bit的mibs计算存储大小呢?

Continue reading
  • page 1 of 1
Author's picture

CaryaLiu

@Chengdu


iOS Developer


Chengdu