09-02-2021 02:29 AM
Hello Everyone,
I had this morning an issue with NET-SNMP.
I downloaded NET-SNMP for windows, extract it I test to get the interfaces from a cisco router using snmp table, It works fine. bellow the result,
PS C:\Program Files (x86)\Net-SNMP\usr\bin> .\snmptable.exe -Oqv -v 2c -c test 192.168.0.136 ifTable SNMP table: IF-MIB::ifTable ifIndex ifDescr ifType ifMtu ifSpeed ifPhysAddress ifAdminStatus ifOperStatus ifLastChange ifInOctets ifInUcastPkts ifInNUcastPkts ifInDiscards ifInErrors ifInUnknownProtos ifOutOctets ifOutUcastPkts ifOutNUcastPkts ifOutDiscards ifOutErrors ifOutQLen ifSpecific INTEGER: 1 STRING: GigabitEthernet0/0 INTEGER: ethernetCsmacd(6) INTEGER: 1500 Gauge32: 1000000000 STRING: 50:0:0:1:0:0 INTEGER: up(1) INTEGER: up(1) Timeticks: (4822) 0:00:48.22 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 3117579 Counter32: 29069 ? Counter32: 0 Counter32: 0 ? ? INTEGER: 2 STRING: GigabitEthernet0/1 INTEGER: ethernetCsmacd(6) INTEGER: 1500 Gauge32: 1000000000 STRING: 50:0:0:1:0:1 INTEGER: up(1) INTEGER: up(1) Timeticks: (116523) 0:19:25.23 Counter32: 19933673 Counter32: 95460 ? Counter32: 0 Counter32: 0 Counter32: 8041 Counter32: 11231955 Counter32: 112642 ? Counter32: 0 Counter32: 0 ? ? INTEGER: 3 STRING: GigabitEthernet0/2 INTEGER: ethernetCsmacd(6) INTEGER: 1500 Gauge32: 1000000000 STRING: 50:0:0:1:0:2 INTEGER: down(2) INTEGER: down(2) Timeticks: (5278) 0:00:52.78 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 ? ? INTEGER: 4 STRING: GigabitEthernet0/3 INTEGER: ethernetCsmacd(6) INTEGER: 1500 Gauge32: 1000000000 STRING: 50:0:0:1:0:3 INTEGER: down(2) INTEGER: down(2) Timeticks: (5278) 0:00:52.78 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 ? ? INTEGER: 5 STRING: Null0 INTEGER: other(1) INTEGER: 1500 Gauge32: 4294967295 STRING: INTEGER: up(1) INTEGER: up(1) Timeticks: (0) 0:00:00.00 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 ? ? INTEGER: 6 STRING: Tunnel0 INTEGER: tunnel(131) INTEGER: 17916 Gauge32: 100000 STRING: INTEGER: up(1) INTEGER: down(2) Timeticks: (146799) 0:24:27.99 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 Counter32: 0 ? Counter32: 0 Counter32: 0 ? ? PS C:\Program Files (x86)\Net-SNMP\usr\bin>
as you can see on the top of the result SNMP table: IF-MIB::ifTable means that now snmptable using a mib called IF-MIB. which is by default located on *\Net-SNMP\usr\share\snmp\mibs
A copied the same NET-SNMP extracted folder to another windows machine, I did the same command and bellow the result.
PS C:\Users\Administrator\Desktop\Net-SNMP\usr\bin> .\snmptable.exe -Oqv -v 2c -c test 192.168.0.136 ifTable Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find module (TCP-MIB): At line 0 in (none) Cannot find module (UDP-MIB): At line 0 in (none) Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) Cannot find module (SNMPv2-MIB): At line 0 in (none) Cannot find module (SNMPv2-SMI): At line 0 in (none) Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none) Cannot find module (UCD-SNMP-MIB): At line 0 in (none) Cannot find module (UCD-DEMO-MIB): At line 0 in (none) Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none) Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none) Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none) Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none) Cannot find module (UCD-DLMOD-MIB): At line 0 in (none) Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none) Cannot find module (SNMP-MPD-MIB): At line 0 in (none) Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none) Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none) Cannot find module (SNMPv2-TM): At line 0 in (none) ifTable: (Sub-id not found: (top) -> ifTable) PS C:\Users\Administrator\Desktop\Net-SNMP\usr\bin>
not sure what's wrong, if the issue is related to MIB, why it's works in my first machine and not second one even I was using the same NET-SNMP folder I extracted in 1st machine, Can some one help please I really appreciate it.
09-02-2021 11:52 PM
- It looks like the particular machine doesn't have the particular mibs installed.
M.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide