Skip to main content

SNMP mib file installation

Step1: Installing private MIB file and changing SNMP configuration on PC

Refeering to the following link for private mibs:
http://changineer.info/server/monitoring/monitoring_snmp.html
http://wiki.pomme-tech.com/index.cgi?page=%A5%D7%A5%E9%A5%A4%A5%D9%A1%BC%A5%C8MIB%A4%CE%C4%C9%B2%C3&print=1
http://www.lesstep.jp/step_on_board/linux/23/

Refeering to the following link for errors related to mibs:
http://www.zabbix.jp/node/3056
http://serverfault.com/questions/440319/did-not-find-zerodotzero-in-module-snmpv2-smi

Step2. installing private mib files in an appropriate directory(/usr/share/snmp/private-bims)

Step3. changing snmp.conf files. You may need to create an empty new file NOT snmpd.conf.
----------------------------------------
/etc/snmp/snmp.conf
MIBDIRS /usr/share/snmp/mibs:/usr/share/snmp/private-bims
MIBS all
----------------------------------------

Step4: Checking the output before and after installing private mib files.
You don't need to restart the process. Just RUN snmpwalk.
But you may get a lots of errors.

#Installed Mib files.
$ ls
LLDP-MIB.my aruba-instant.my aruba-stats.my aruba-user6.my mib-2.my v2-smi.my
alarm-mib-1.my aruba-mesh.my aruba-switch.my aruba-voice.my rfc1513.my v2-tc.my
aruba-ap.my aruba-mgmt.my aruba-systemext.my aruba-wlan.my rfc1757.my v2-tm.my
aruba-auth.my aruba-mobility.my aruba-tc.my aruba.my rfc2021.my v3-arch.my
aruba-cts.my aruba-mon.my aruba-trap.my iana-address-mib.my.my rfc3014.my
aruba-esi.my aruba-rs.my aruba-tunnelednode.my ifType.my rfc3291.my
aruba-ifext.my aruba-snr.my aruba-user.my ifmib.my v2-mib.my

Step5: Showing the errors and getting rid of them.
$ snmpwalk -OX -v 2c -c public 10.215.1.252 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
No log handling enabled - using stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/private-bims/alarm-mib-1.my)
Undefined OBJECT-GROUP (snmpBasicNotificationsGroup): At line 693 in /usr/share/snmp/private-bims/v2-mib.my

#deleting mib-2.my
$ snmptranslate .1.3.6.1.2.1.2.2.1.10
No log handling enabled - using stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/private-bims/alarm-mib-1.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/IP-MIB.txt)
Did not find 'InetVersion' in module INET-ADDRESS-MIB (/usr/share/snmp/mibs/IP-MIB.txt)
Did not find 'InetZoneIndex' in module INET-ADDRESS-MIB (/usr/share/snmp/mibs/IP-MIB.txt)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/snmp/mibs/DISMAN-EVENT-MIB.txt)
RFC1213-MIB::ifInOctets
Aruba-no-MacBook-Air-2:private-bims aruba$ snmpwalk -c public -v 2c -On

#Removing the error mib
$ sudo rm alarm-mib-1.my
Aruba-no-MacBook-Air-2:private-bims aruba$ snmptranslate .1.3.6.1.2.1.2.2.1.10


find ./ -type f -print | xargs grep 'SNMPv2-SMI'
.//aruba-ap.my:           FROM SNMPv2-SMI
.//aruba-auth.my:           FROM SNMPv2-SMI
.//aruba-cts.my:           FROM SNMPv2-SMI
.//aruba-esi.my:           FROM SNMPv2-SMI
.//aruba-ifext.my:           FROM SNMPv2-SMI
.//aruba-instant.my:           FROM SNMPv2-SMI
.//aruba-mesh.my:           FROM SNMPv2-SMI
.//aruba-mgmt.my:                    FROM SNMPv2-SMI
.//aruba-mobility.my:           FROM SNMPv2-SMI
.//aruba-mon.my:           FROM SNMPv2-SMI
.//aruba-rs.my:           FROM SNMPv2-SMI
.//aruba-snr.my:           FROM SNMPv2-SMI
.//aruba-stats.my:           FROM SNMPv2-SMI
.//aruba-switch.my:           FROM SNMPv2-SMI
.//aruba-systemext.my:           FROM SNMPv2-SMI
.//aruba-tc.my:        FROM SNMPv2-SMI;
.//aruba-trap.my: FROM SNMPv2-SMI
.//aruba-tunnelednode.my:           FROM SNMPv2-SMI
.//aruba-user.my:           FROM SNMPv2-SMI
.//aruba-user6.my:           FROM SNMPv2-SMI
.//aruba-voice.my:           FROM SNMPv2-SMI
.//aruba-wlan.my:           FROM SNMPv2-SMI
.//aruba.my:       snmpModules                           FROM SNMPv2-SMI
.//LLDP-MIB.my:        FROM SNMPv2-SMI
.//v2-smi.my:SNMPv2-SMI DEFINITIONS ::= BEGIN               <<<<<<<<<<<<<<<<<<< deleting v2-smi.my mib for overlapping
.//v2-tc.my:        FROM SNMPv2-SMI;
.//v2-tm.my:        FROM SNMPv2-SMI
.//v3-arch.my:       snmpModules                           FROM SNMPv2-SMI
Aruba-no-MacBook-Air-2:private-bims aruba$ su rm v2-smi.my

$ snmptranslate .1.3.6.1.2.1.2.2.1.10
No log handling enabled - using stderr logging
Did not find 'InetVersion' in module INET-ADDRESS-MIB (/usr/share/snmp/mibs/IP-MIB.txt)
Did not find 'InetZoneIndex' in module INET-ADDRESS-MIB (/usr/share/snmp/mibs/IP-MIB.txt)

RFC1213-MIB::ifInOctets

$ find ./ -type f -print | xargs grep 'INET-ADDRESS-MIB'
.//alarm-mib-1.my:       FROM INET-ADDRESS-MIB           -- [RFC3291]
.//rfc3291.my:INET-ADDRESS-MIB DEFINITIONS ::= BEGIN               <<<<<<<<<<<<<<<<<<<

$ sudo rm rfc3291.my
$ snmpwalk -c public -v 2c 10.215.1.253 1.3.6.1.4.1.14823.2.2.1.14.1.2.1.3
# Success!!!!!!!

#Displaying OID with translation, however it fails to interprete hex numbers.
$ snmpwalk -c public -v 2c 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
WLSX-USER6-MIB::nUser6Role.'..LZ..'."10.215.100.63" = STRING: phone
WLSX-USER6-MIB::nUser6Role.'..LZ.J'."10.215.100.52" = STRING: phone

#Displaying OID with translation, however it succeeds to interprete hex numbers with -OX option.
$ snmpwalk -c public -v 2c -OX 10.215.1.253 .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.4
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:19:94][STRING: 10.215.100.63] = STRING: phone
WLSX-USER6-MIB::nUser6Role[STRING: 0:0:4c:5a:8b:4a][STRING: 10.215.100.52] = STRING: phone

Comments

Popular posts from this blog

SNMP mib tips: snmpwalk & snmptranslate

Referring to this web site: https://gist.github.com/bahootyper/575190 The following explanations are about snmpwalk & snmptranslate command options. #Displayes every OID $ snmptranslate -Tp #Dispaly OID label(MIB name) from OID $ snmptranslate .1.3.6.1.4.1.14823.2.2.1.1.2.1.1.2 WLSX-SWITCH-MIB::userPhyAddress #Dispaly MIB tree name from OID label #-IR: label,  -Tp: tree option $ snmptranslate -IR -Tp nUser6Name +-- -R-- String    nUser6Name(3)          Textual Convention: DisplayString          Size: 0..128 #Dispaly MIB tree name from OID label #-IR: label,  -Tp: tree option $ snmptranslate -Tp .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.3 +-- -R-- String    nUser6Name(3)          Textual Convention: DisplayString          Size: 0..128 # OID's detailed option $ snmptranslate -Td .1.3.6.1.4.1.14823.2.2.1.14.1.2.1.3 WLSX-USER6-MIB::nUser6Name nUser6Name OBJECT-TYPE   -- FROM WLSX-USER6-MIB   -- TEXTUAL CONVENTION DisplayString   SYNTAX OCTET STRING (0..1

ettercap on MAC OSX

TK-MBA-2:~ taka$ brew info ettercap ettercap: stable 0.8.2 (bottled), HEAD Multipurpose sniffer/interceptor/logger for switched LAN https://ettercap.github.io/ettercap/ /usr/local/Cellar/ettercap/0.8.2_1 (75 files, 2.3MB) *   Poured from bottle on 2017-05-25 at 14:14:48 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/ettercap.rb ==> Dependencies Build: cmake ✘ , ghostscript ✘ Required: pcre ✔ , libnet ✔ , openssl ✔ Optional: ghostscript ✘ , gtk+ ✘ , gtk+3 ✘ , luajit ✘ ==> Options --with-ghostscript Build with ghostscript support --with-gtk+ Build with gtk+ support --with-gtk+3 Build with gtk+3 support --with-luajit Build with luajit support --without-curses Install without curses interface --without-ipv6 Install without IPv6 support --without-plugins Install without plugins support --HEAD Install HEAD version TK-MBA-2:~ taka$ ettercap --with-gtk+ ettercap 0.8.2 copyright 2001-2015 Ettercap