设备:Cisco SG 300 交换机 / Ubuntu 14.04 LTS
当我运行 snmpwalk 时,在实际请求的数据之前出现许多错误行。
例子:
snmpwalk -v3 -u public 192.168.0.20 IF-MIB::ifHighSpeed
Unlinked OID in IPATM-IPMC-MIB: marsMIB ::= { mib-2 57 }
Undefined identifier: mib-2 near line 18 of /usr/share/mibs/ietf/IPATM-IPMC-MIB
Bad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDU
Expected "::=" (RFC5644): At line 493 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Expected "{" (EOF): At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad object identifier: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad parse of OBJECT-IDENTITY: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Timestamp should end with Z (201010310000a): At line 16 in /usr/share/snmp/mibs/CISCOSBsysmng.mib
Timestamp should end with Z (201010310000a): At line 29 in /usr/share/snmp/mibs/CISCOSBsysmng.mib
Should be ACCESS ((): At line 575 in /usr/share/snmp/mibs/CISCOSBsnmp.mib
Bad parse of OBJECT-TYPE: At line 575 in /usr/share/snmp/mibs/CISCOSBsnmp.mib
IF-MIB::ifHighSpeed.49 = Gauge32: 100
IF-MIB::ifHighSpeed.50 = Gauge32: 1000
IF-MIB::ifHighSpeed.51 = Gauge32: 1000
IF-MIB::ifHighSpeed.52 = Gauge32: 1000
IF-MIB::ifHighSpeed.53 = Gauge32: 1000
IF-MIB::ifHighSpeed.54 = Gauge32: 1000
IF-MIB::ifHighSpeed.55 = Gauge32: 1000
IF-MIB::ifHighSpeed.56 = Gauge32: 1000
IF-MIB::ifHighSpeed.57 = Gauge32: 1000
IF-MIB::ifHighSpeed.58 = Gauge32: 1000
IF-MIB::ifHighSpeed.1000 = Gauge32: 0
IF-MIB::ifHighSpeed.1001 = Gauge32: 0
IF-MIB::ifHighSpeed.1002 = Gauge32: 0
IF-MIB::ifHighSpeed.1003 = Gauge32: 0
IF-MIB::ifHighSpeed.1004 = Gauge32: 0
IF-MIB::ifHighSpeed.1005 = Gauge32: 0
IF-MIB::ifHighSpeed.1006 = Gauge32: 0
IF-MIB::ifHighSpeed.1007 = Gauge32: 0
IF-MIB::ifHighSpeed.3000 = Gauge32: 0
IF-MIB::ifHighSpeed.7000 = Gauge32: 100
IF-MIB::ifHighSpeed.20000 = Gauge32: 0
IF-MIB::ifHighSpeed.100000 = Gauge32: 0
IF-MIB::ifHighSpeed.300000 = Gauge32: 0
我使用一个非常简单的设置:
sudo apt-get install snmp
sudo apt-get install snmp-mibs-downloader
sudo gedit /etc/snmp/snmp.conf
( I comment out the 'mibs :' line )
sudo download-mibs
( I download the device MIBs, extract it and CD in )
sudo cp -R * /usr/share/snmp/mibs/
sudo bash -c 'echo "mibs ALL" >> /etc/snmp/snmp.conf'
为什么我会收到所有这些错误行?如果这是偶然的且不可避免的,有没有办法让它们从报告中跳过?( snmpwalk -Pe 不会跳过它们,即: snmpwalk -Pe -v3 -u public 192.168.0.20 IF-MIB::ifHighSpeed )