Re: Adding new OIDs in existing MIB files

"Syed Mujtaba Ahmed Razvi" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks,
    I wrote my own MIB file.

--- MIB FILE Start
ESS-MIB DEFINITIONS ::= BEGIN


IMPORTS
	enterprises, IpAddress, Counter, TimeTicks
		FROM RFC1155-SMI
	OBJECT-TYPE
		FROM RFC-1212
	DisplayString
		FROM RFC-1213;

andor	 OBJECT IDENTIFIER ::= { enterprises 9023 }
-- .1.3.6.1.4.1 enterprises
products     OBJECT IDENTIFIER ::= { andor 1 }


intROMan OBJECT-TYPE
	SYNTAX  	INTEGER(0..400000000)
	ACCESS		read-only
	STATUS		mandatory
	DESCRIPTION	"Power output"
::= { products 1 }


intRWMan OBJECT-TYPE
	SYNTAX  	INTEGER(0..65535)
	ACCESS		read-write
	STATUS		mandatory
	DESCRIPTION	"max 1800"
::= { products 2}

strRWMan OBJECT-TYPE
	SYNTAX		DisplayString (SIZE (0..30))
	ACCESS		read-write
	STATUS		mandatory
	DESCRIPTION	"Set to string value for serial port output."
::= { products 3}

strRMan OBJECT-TYPE
	SYNTAX		DisplayString (SIZE (0..30))
	ACCESS		read-only
	STATUS		mandatory
	DESCRIPTION	"Message giving more detailed information on alarms."
::= { products 4}


END

-- MIB File End

After that i compiled it with mibcc.exe file.

C:\WINDOWS\system32>MIBCC -n -oOUT.BIN -t DEMOSNMP9.MIB
Microsoft (R) SNMP MIB Compiler Version 2.00
Copyright (c) Microsoft Corporation 1998.  All rights reserved.
mibcc: parsing DEMOSNMP9.MIB
mibcc: total files processed: 1
iso(1)
..iso(1).org(3)
..iso(1).org(3).dod(6)
..iso(1).org(3).dod(6).internet(1)
..iso(1).org(3).dod(6).internet(1).private(4)
..iso(1).org(3).dod(6).internet(1).private(4).enterprises(1)
..iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).andor(9023)
..iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).andor(9023).products
(1)
..iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).andor(9023).products
(1).intROMan(1)
..iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).andor(9023).products
(1).intRWMan(2)
..iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).andor(9023).products
(1).strRWMan(3)
..iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).andor(9023).products
(1).strRMan(4)
..
mibcc: writing compiled file 'OUT.BIN'


I renamed the OUT.BIN file to MIB.Bin file and copied it to 
windows\system32.

Now, even after successfull compilation i am unable to access the oids.
for eg. if i try to get .1.3.6.1.4.1.9023.1.3.0 , it gives me


Error: SNMP variable does not exists; status :NoSuchName; index: 1 .

Am i missing any step??


Regards,
Mujtaba

>From: "Dave Shield" <[email protected]>
>To: "Syed Mujtaba Ahmed Razvi" <[email protected]>
>CC: [email protected], [email protected]
>Subject: Re: Adding new OIDs in existing MIB files
>Date: Sat, 16 Jun 2007 13:48:17 +0100
>
>On 16/06/07, Syed Mujtaba Ahmed Razvi <[email protected]> wrote:
> >    I am working on SNMP in windows xp. After i have created the mib, do 
>i
> > need to compile it using some tool or not like mibcc.exe etc ? How the 
>new
> > mib file created will get integrated with the old existing mib?
>
>Please see the FAQ entries "How can I add a MIB".
>
>
>
> > I have an existing MIB with tree like
> > + iso
> >    + org
> >      + dod
> >        + internet
> >           + directory  (its empty)
> >           + mgmt
> >           + experimental
> >           + private
> >           + security   (its empty)
> >           + snmpV2
> >
> > Now can i add into it in internet, my own "myPro"
> >           + myPro
>
>No, you can not!
>The only place where you can legitimately define new OIDs
>is under the 'private.enterprises' subtree, using your own
>enterprise number (obtainable from IANA, see www.iana.org).
>
>If you're testing things internally, then you can use the
>NET-SNMP-MIB::netSnmpPlaypen subtree, but this must
>not be used in publically distributed software.
>
>    But you can't unilaterally decide to use an arbitrary part
>of the internationally administered OID tree for your own
>private purposes.  Standards don't work like that!
>
>Dave
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>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
>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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.