Chirag
2002-04-09 06:50:03 UTC
hi,
i have created the following MIB tree from the ucd example tree.....i have put this TRIAL-MIB.txt in the shared ./mibs/ folder and when i run the snmptranslate command for trialSSSimpleString.... i get the the oid .1.3.6.1.4.1.1.1.1.1 (command used : snmptranslate -m ALL -IR trialSSSimpleString )
now when i try to get the default value of tha oid.....
Command : snmpget -m ALL localhost public snmptranslate -m .1.3.6.1.4.1.1.1.1.1.0
Output : Cannot find module (.1.3.6.1.4.1.1.1.1.1.0): At line 0 in (none)
snmptranslate: Unknown Object Identifier (Sub-id not found: (top) -> )
Command : snmpget -m ALL -v 2c localhost public .iso.org.dod.internet.private.enterprises.trialMIB.trialMIBObjects.trialScalerSet.trialSSSimpleString.0
Output : .iso.org.dod.internet.private.enterprises.trialMIB.trialMIBObjects.trialScalerSet.trialSSSimpleString.0: Unknown Object Identifier (Sub-id not found: trialMIBObjects -> trialScalerSet)
What do i do to include my new MIB and do i have to compile it ? How ? Is the following MIB okie ?
-- Definition of the MIB
TRIAL-MIB DEFINITIONS ::= BEGIN
IMPORTS
enterprises FROM RFC1155-SMI
MODULE-IDENTITY FROM SNMPv2-SMI
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF;
trialMIB MODULE-IDENTITY
LAST-UPDATED "9911030000Z" -- 30 Aug 1999, midnight
ORGANIZATION "UCDavis"
CONTACT-INFO "
Author: Wes Hardaker
University of California at Davis
"
DESCRIPTION "A simple mib for demonstration purposes.
"
::= { enterprises 1 }
trialMIBObjects OBJECT IDENTIFIER ::= { trialMIB 1 }
trialScalarSet OBJECT IDENTIFIER ::= { trialMIBObjects 1 }
trialSSSimpleString OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"This is a simple test string. It does nothing more than
return its current value, and changes values only when set by
an incoming SNMP set request."
DEFVAL { Hello World }
::= { trialScalarSet 1 }
END
Thanx
chirag
i have created the following MIB tree from the ucd example tree.....i have put this TRIAL-MIB.txt in the shared ./mibs/ folder and when i run the snmptranslate command for trialSSSimpleString.... i get the the oid .1.3.6.1.4.1.1.1.1.1 (command used : snmptranslate -m ALL -IR trialSSSimpleString )
now when i try to get the default value of tha oid.....
Command : snmpget -m ALL localhost public snmptranslate -m .1.3.6.1.4.1.1.1.1.1.0
Output : Cannot find module (.1.3.6.1.4.1.1.1.1.1.0): At line 0 in (none)
snmptranslate: Unknown Object Identifier (Sub-id not found: (top) -> )
Command : snmpget -m ALL -v 2c localhost public .iso.org.dod.internet.private.enterprises.trialMIB.trialMIBObjects.trialScalerSet.trialSSSimpleString.0
Output : .iso.org.dod.internet.private.enterprises.trialMIB.trialMIBObjects.trialScalerSet.trialSSSimpleString.0: Unknown Object Identifier (Sub-id not found: trialMIBObjects -> trialScalerSet)
What do i do to include my new MIB and do i have to compile it ? How ? Is the following MIB okie ?
-- Definition of the MIB
TRIAL-MIB DEFINITIONS ::= BEGIN
IMPORTS
enterprises FROM RFC1155-SMI
MODULE-IDENTITY FROM SNMPv2-SMI
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF;
trialMIB MODULE-IDENTITY
LAST-UPDATED "9911030000Z" -- 30 Aug 1999, midnight
ORGANIZATION "UCDavis"
CONTACT-INFO "
Author: Wes Hardaker
University of California at Davis
"
DESCRIPTION "A simple mib for demonstration purposes.
"
::= { enterprises 1 }
trialMIBObjects OBJECT IDENTIFIER ::= { trialMIB 1 }
trialScalarSet OBJECT IDENTIFIER ::= { trialMIBObjects 1 }
trialSSSimpleString OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"This is a simple test string. It does nothing more than
return its current value, and changes values only when set by
an incoming SNMP set request."
DEFVAL { Hello World }
::= { trialScalarSet 1 }
END
Thanx
chirag