Can you please check, if snmptranslate helps you.

https://linux.die.net/man/1/snmptranslate

-Feroz

On Thu, Aug 24, 2023 at 5:39 PM Jan Andersen <j...@comind.io> wrote:

> Thx, Feroz - got it!
>
> On a completely different note; do you know how snmpwalk et al figure
> out which numerical OID matches which text OID? I've started looking at
> the MIB files, and while they are very informative, I haven't spotted
> that connection. Yet.
>
> /jan
>
> On 23/08/2023 16:56, Feroz wrote:
> > I'm not sure if your custom MIB has an extension of ".mib" or ".txt".
> > e.g:
> > IF-MIB.txt
> >
> > All the MIB's that come with the net-snmp package have a ".txt"
> extension.
> >
> > Try to change your mib file extension to "netgear-MIB.txt" and copy it
> > in the location where you have "IF-MIB.txt"..
> > See if it solves.
> >
> > On Wed, Aug 23, 2023 at 8:50 PM Jan Andersen <j...@comind.io
> > <mailto:j...@comind.io>> wrote:
> >
> >     That gives me the desired output - but why the difference from the
> >     version without '-mALL'?
> >
> >     Also, in the man page it looks like '-mALL' only lists the MIBs that
> >     are
> >     listed in the local MIB files and therefore may leave something out
> >     that
> >     the appliance might supply - or have I got that wrong?
> >
> >     /jan
> >
> >     On 23/08/2023 16:05, Feroz wrote:
> >      > can you try with
> >      >
> >      > snmpwalk -v 2c -c netgear netgear1 -mALL
> >      >
> >      > Make sure you copied mib file in appropriate directory.
> >      >
> >      >
> >      >
> >      > On Wed, Aug 23, 2023 at 8:05 PM Jan Andersen <j...@comind.io
> >     <mailto:j...@comind.io>
> >      > <mailto:j...@comind.io <mailto:j...@comind.io>>> wrote:
> >      >
> >      >     I have a curious problem with snmpwalk in debian 11 - if I run
> >      >     something
> >      >     like:
> >      >
> >      >     root@vogon:~# snmpwalk -v 2c -c netgear netgear1
> >     SNMPv2-MIB::sysORID
> >      >
> >      >     I get OIDs translated to text:
> >      >
> >      >     SNMPv2-MIB::sysORID.1 = OID: SNMPv2-SMI::mib-2.96
> >      >     SNMPv2-MIB::sysORID.2 = OID: SNMPv2-SMI::mib-2.32.2
> >      >     SNMPv2-MIB::sysORID.3 = OID: SNMPv2-SMI::mib-2.32.1
> >      >     SNMPv2-MIB::sysORID.4 = OID: SNMPv2-SMI::mib-2.16.29
> >      >     SNMPv2-MIB::sysORID.5 = OID: SNMPv2-SMI::mib-2.16.20.5
> >      >     SNMPv2-MIB::sysORID.6 = OID: SNMPv2-SMI::mib-2.78
> >      >     SNMPv2-MIB::sysORID.7 = OID: SNMPv2-SMI::mib-2.72
> >      >     SNMPv2-MIB::sysORID.8 = OID: SNMPv2-SMI::mib-2.154
> >      >     SNMPv2-MIB::sysORID.9 = OID: SNMPv2-SMI::mib-2.30
> >      >     SNMPv2-MIB::sysORID.10 = OID: SNMPv2-SMI::mib-2.76
> >      >     SNMPv2-MIB::sysORID.11 = OID: iso.2.840.10006.300.43
> >      >     SNMPv2-MIB::sysORID.12 = OID: iso.0.8802.1.1.2.1.5.4623
> >      >     SNMPv2-MIB::sysORID.13 = OID: iso.0.8802.1.1.2.1.5.4795
> >      >     SNMPv2-MIB::sysORID.14 = OID: iso.0.8802.1.1.2
> >      >     SNMPv2-MIB::sysORID.15 = OID: SNMPv2-SMI::mib-2.26.6
> >      >     SNMPv2-MIB::sysORID.16 = OID:
> SNMPv2-SMI::enterprises.4526.11.61
> >      >     SNMPv2-MIB::sysORID.17 = OID:
> SNMPv2-SMI::enterprises.4526.11.43
> >      >     SNMPv2-MIB::sysORID.18 = OID:
> SNMPv2-SMI::enterprises.4526.11.31
> >      >     SNMPv2-MIB::sysORID.19 = OID:
> SNMPv2-SMI::enterprises.4526.11.100
> >      >     SNMPv2-MIB::sysORID.20 = OID:
> SNMPv2-SMI::enterprises.4526.11.37
> >      >
> >      >     However, if I run this:
> >      >
> >      >     root@vogon:~# snmpwalk -v 2c -c netgear netgear1
> >      >
> >      >     I get them untranslated:
> >      >
> >      >     iso.3.6.1.2.1.1.1.0 = STRING: "GS324T S350 Series 24-Port
> Gigabit
> >      >     Ethernet Smart Managed Pro Switch with 2 SFP Ports"
> >      >     iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.4526.100.4.54
> >      >     iso.3.6.1.2.1.1.3.0 = Timeticks: (1266647500) 146 days,
> >     14:27:55.00
> >      >     iso.3.6.1.2.1.1.4.0 = ""
> >      >     iso.3.6.1.2.1.1.5.0 = STRING: "NEATGEAR1"
> >      >     iso.3.6.1.2.1.1.6.0 = STRING: "Network rack"
> >      >     iso.3.6.1.2.1.1.7.0 = INTEGER: 2
> >      >     iso.3.6.1.2.1.1.8.0 = Timeticks: (1900) 0:00:19.00
> >      >     iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.2.1.96
> >      >     iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.2.1.32.2
> >      >     ...
> >      >
> >      >
> >      >     I have installed the same packages on my laptop, also Debian
> 11:
> >      >
> >      >     root@vogon:~# dpkg -l | grep -i -E 'snmp'
> >      >     ii  libnet-snmp-perl                              6.0.1-6
> >      >                                                           all
> >      >     Script
> >      >     SNMP connections
> >      >     ii  libsnmp-base
> >     5.9+dfsg-4+deb11u1
> >      >                                                           all
> >            SNMP
> >      >     configuration script, MIBs and documentation
> >      >     ii  libsnmp40:amd64
> >       5.9+dfsg-4+deb11u1
> >      >                                                           amd64
> >            SNMP
> >      >     (Simple Network Management Protocol) library
> >      >     ii  snmp
> >     5.9+dfsg-4+deb11u1
> >      >                                                           amd64
> >            SNMP
> >      >     (Simple Network Management Protocol) applications
> >      >     ii  snmp-mibs-downloader                          1.5
> >      >                                                           all
> >      >     install and manage Management Information Base (MIB) files
> >      >
> >      >
> >      >     On my laptop, I always get text-OIDs. I cloned the repo
> >      >     (https://github.com/net-snmp/net-snmp
> >     <https://github.com/net-snmp/net-snmp>
> >      >     <https://github.com/net-snmp/net-snmp
> >     <https://github.com/net-snmp/net-snmp>>) and tried to figure out
> from
> >      >     the
> >      >     source what makes the difference, but it is a bit complex;
> what
> >      >     should I
> >      >     look for?
> >      >
> >      >
> >      >
> >      >
> >      >     _______________________________________________
> >      >     Net-snmp-users mailing list
> >      > Net-snmp-users@lists.sourceforge.net
> >     <mailto:Net-snmp-users@lists.sourceforge.net>
> >      >     <mailto:Net-snmp-users@lists.sourceforge.net
> >     <mailto:Net-snmp-users@lists.sourceforge.net>>
> >      >     Please see the following page to unsubscribe or change other
> >     options:
> >      > https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> >     <https://lists.sourceforge.net/lists/listinfo/net-snmp-users>
> >      >     <https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> >     <https://lists.sourceforge.net/lists/listinfo/net-snmp-users>>
> >      >
> >      >
> >      >
> >      > --
> >      > Regards,
> >      > Feroz Ahmed
> >
> >
> >     _______________________________________________
> >     Net-snmp-users mailing list
> >     Net-snmp-users@lists.sourceforge.net
> >     <mailto:Net-snmp-users@lists.sourceforge.net>
> >     Please see the following page to unsubscribe or change other options:
> >     https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> >     <https://lists.sourceforge.net/lists/listinfo/net-snmp-users>
> >
> >
> >
> > --
> > Regards,
> > Feroz Ahmed
>


-- 
Regards,
Feroz Ahmed
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to