Re: wrong MAC int the trap

Meike Stone <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAFNHiA8+U8+djM6pF+SMmDt8c5de1t_5OV8vF8TpRx_ry7_+xQ@mail.gmail.com>
2013/3/5 Meike Stone <[email protected]>:
> 2013/3/1 Lee <[email protected]>:
>> Adding a display-hint to the mib file might work.  But with snmptrapd
>> printing out
>>> 22#011.1.3.6.1.4.1.45.1.6.5.3.12.1.3.1.22 = "`s\\/c("
>> it doesn't look like it's found the mibs.
>
> strace -f -eopen snmptrapd -nf
> .
> .
> .
> pen("/etc/snmp/snmp.local.conf", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/usr/share/snmp/snmp.conf", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> open("/usr/share/snmp/snmp.local.conf", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> open("/var/lib/net-snmp/snmp.conf", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> open("/var/lib/net-snmp/snmp.local.conf", O_RDONLY) = -1 ENOENT (No
> such file or directory)
> open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 7
> open("/root/.snmp/mibs", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =
> -1 ENOENT (No such file or directory)
> open("/usr/share/snmp/mibs/.index", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/UCD-IPFWACC-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/SNMPv2-TC.txt", O_RDONLY) = 8
> open("/usr/share/snmp/mibs/UCD-SNMP-MIB.txt", O_RDONLY) = 8
> open("/usr/share/snmp/mibs/SNMPv2-SMI.txt", O_RDONLY) = 9
> open("/usr/share/snmp/mibs/UCD-DISKIO-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/EtherLike-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/IF-MIB.txt", O_RDONLY) = 8
> open("/usr/share/snmp/mibs/SNMPv2-MIB.txt", O_RDONLY) = 9
> open("/usr/share/snmp/mibs/IANAifType-MIB.txt", O_RDONLY) = 9
> open("/usr/share/snmp/mibs/RMON-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt", O_RDONLY) = 7
> open("/usr/share/snmp/mibs/VELOCITY-MIB.txt", O_RDONLY) = 7
> .
> .
> .
>
>
>> The default  location for the mib files is /usr/local/share/snmp/mibs
> Here on SLES11 it is /usr/share/snmp/mibs/
>
>> In any case, once you've got snmptrapd reading the mibs try adding
>>  DISPLAY-HINT "2x:"
>
> I found a display-hint in SNMPv2-TC.txt:
>
> MacAddress ::= TEXTUAL-CONVENTION
>     DISPLAY-HINT "1x:"
>     STATUS       current
>     DESCRIPTION
>             "Represents an 802 MAC address represented in the
>             `canonical' order defined by IEEE 802.1a, i.e., as if it
>             were transmitted least significant bit first, even though
>             802.5 (in contrast to other 802.x protocols) requires MAC
>             addresses to be transmitted most significant bit first."
>     SYNTAX       OCTET STRING (SIZE (6))
>
> This file is loaded, see strace above.
.. and I started snmptrapd -nf -DALL, here the part from the syslog:

Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: Parsing file:
/usr/share/snmp/mibs/SNMPv2-TC.txt...
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse(): parse.c, 4345:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: Parsing MIB: 7 SNMPv2-TC
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1677:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: Processing IMPORTS for
module 7 SNMPv2-TC
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1690:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]:   Processing import: joint-iso-ccitt
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1690:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]:   Processing import: ccitt
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: do_linkup(): parse.c, 1690:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-mibs:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]:   Processing import: iso
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: trace:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse(): parse.c, 4462:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: parse-file:
Feb 28 01:51:39 sles11sp2 snmptrapd[13944]: End of file
(/usr/share/snmp/mibs/SNMPv2-TC.txt)


>
> Hmm,..
>
> Thanks Meike

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.