title: How should I deal with these SNMP mib file parsing errors?
body: <p>I am trying to use the mib files supplied by Cisco to make sense the info obtainend by polling my switch via SNMP. It's a SG300-52P, the files can be found <a href="https://software.cisco.com/download/release.html?mdfid=283019669&amp;softwareid=283415684&amp;release=1.4.0" rel="nofollow">here</a>.</p>
  
  <p>After I placed the files in one of netsnmp's default mib directories, there were multiple errors when I tried to decode one of the description to its numeric value to verify that the mib files work. I thought about resolving the issues, but they were too numerous, so I decided to just try and get the simplest of these files to work with netsnmp. I placed only the SNMPv2-SMI file in one of netsnmp's default mib directories (because that came up in the errors and is a short file with no dependencies; I've appended the content for easy reference) and ran the following command:</p>
  
  <pre><code>snmptranslate -m SNMPv2-SMI zeroDotZero
  </code></pre>
  
  <p>However, this returns the following two erros:</p>
  
  <pre><code>Expected LAST-UPDATED (SMI): At line 35 in /home/buildmanager/.snmp/mibs/SNMPv2-SMI.my
  zeroDotZero: Unknown Object Identifier (Sub-id not found: (top) -&gt; zeroDotZero)
  </code></pre>
  
  <p>After some googling and guessing, I went ahead and checked the file with this online mib file validator <a href="http://wwwsnmp.cs.utwente.nl/ietf/mibs/validate/" rel="nofollow">here</a>, which objected that</p>
  
  <pre><code>Line 34:
  2   `SMI' should start with a lower case letter
  1   syntax error, unexpected MODULE_IDENTITY, expecting OBJECT
  </code></pre>
  
  <p>I have no Idea what to make of these messages, googling them revealed nothing I could make sense of. Does this mean my file actually has errors? It's a file officially supplied by Cisco, and it's very basic - I can't imagine that would be the case.
  I've made sure that there is no interfering SNMPv2-SMI anywhere else on my system, so I'm sure that this is the file netsnmp is using. I suspect there is something here that I did not understand about SNMP and these mib files in general, so please point me at the right direction or tell me where and how to look for answers. Thanks!</p>
  
  <p>Contents of SNMPv2-SMI:</p>
  
  <pre><code>-- file: SNMPv2-SMI.my
  -- Changes:
  --      Converted to SMIC format.
  -- dperkins@scruznet.com
  
  SNMPv2-SMI DEFINITIONS ::= BEGIN
  
  org             OBJECT IDENTIFIER ::= { iso 3 }
  dod             OBJECT IDENTIFIER ::= { org 6 }
  internet        OBJECT IDENTIFIER ::= { dod 1 }
  directory       OBJECT IDENTIFIER ::= { internet 1 }
  mgmt            OBJECT IDENTIFIER ::= { internet 2 }
  mib-2           OBJECT IDENTIFIER ::= { mgmt 1 }
  transmission    OBJECT IDENTIFIER ::= { mib-2 10 }
  experimental    OBJECT IDENTIFIER ::= { internet 3 }
  private         OBJECT IDENTIFIER ::= { internet 4 }
  enterprises     OBJECT IDENTIFIER ::= { private 1 }
  security        OBJECT IDENTIFIER ::= { internet 5 }
  snmpV2          OBJECT IDENTIFIER ::= { internet 6 }
  
  -- transport domains
  snmpDomains     OBJECT IDENTIFIER ::= { snmpV2 1 }
  
  -- transport proxies
  snmpProxys      OBJECT IDENTIFIER ::= { snmpV2 2 }
  
  -- module identities
  snmpModules     OBJECT IDENTIFIER ::= { snmpV2 3 }
  
  
  
  -- macros
  
  SMI MODULE-IDENTITY
  SMI OBJECT-IDENTITY
  SMI OBJECT-TYPE
  SMI NOTIFICATION-TYPE
  
  
  -- types
  
  SMI Counter32
  SMI Counter64
  SMI Gauge32
  SMI Integer32
  SMI IpAddress
  SMI Opaque
  SMI TimeTicks
  SMI BITS
  SMI Unsigned32
  
  
  zeroDotZero    OBJECT-IDENTITY
      STATUS     current
      DESCRIPTION
              "A value used for null identifiers."
      ::= { 0 0 }
  
  END
  </code></pre>