|
From: Eugen <eu...@bl...> - 2005-11-08 16:53:09
|
Thanks a lot Dave for your answer. Now it works fine.
Actually this was not the real MIB, I've written it just to try
isolating the root cause of my error. Of course there are some objects
in it :-)
Id addition to the 2 issues you have mentioned, I had a 3rd one caused
by the fact that using the ALL value for the MIBS environment variable
it loads also the backup files generated by the text editor with the
extension .txt~. So, in my opinion it's better to use specific MIB
module names instead.
Best regards,
Eugen
-----Original Message-----
From: Dave Shield [mailto:D.T...@cs...]
Sent: Tuesday, November 08, 2005 5:09 AM
To: Eugen
Cc: net...@li...
Subject: Re: mib2c: invalid OID
On Mon, 2005-11-07 at 15:56 -0500, Eugen wrote:
> I'm trying the mib2c and it works fine for objects already defined in
> the MIBs from /usr/share/snmp/mibs directory.
>
> But if I try to add a new MIB file I get the error
> "You didn't give mib2c a valid OID to start with."
> when executing "mib2c my-root" command.
>
>
>
> The MIBS environment variable is set to ALL and I have a file called
> MY-SMI-ROOT.txt (in /usr/share/snmp/mibs) containing the following MIB
> definition:
>
> MY-SMI DEFINITIONS ::= BEGIN
It would probably be sensible to ensure that the file name and the
name of the MIB module match. That's not strictly necessary, but
it's definitely less confusing.
Either rename the file to be 'MY-SMI.txt', or tweak the first
line to read:
MY-SMI-ROOT DEFINITIONS ::= BEGIN
> my-root MODULE-IDENTITY
Not strictly legal - you're not meant to use hyphens in
SMIv2 MIB object names.
> ::= { my_objectId 1 }
Again, not legal - you can't use underscores either.
> my_objectId OBJECT IDENTIFIER ::= { enterprises 17094 }
>
> END
> What I'm missing here?
An object to implement :-)
If that's the full contents of your MIB file, then there aren't
any OBJECT TYPE definitions at all, so there's nothing for mib2c
to work with.
Dave
|