This is a list of bullet points on how to make MIBs, as the notes on line assume you know the grammar. MIBs are from the 1980s, before the interweb; and the cultural baseline has moved. Details:

  • Extend ASN1 syntax 1 2.
  • Are case sensitive (as C is)
  • Have a basic range of types [XXX], like C.
  • Types can be extended with defines, like C
  • Doesn't care about whitespace, and online samples have a weird tab length.
  • A comment starts -- (like SQL)
  • Like an SQL table definition, each item is defined by a name and its type, separated by a comma
  • The entire list of names is surrounded in parens { }
  • There are common types defined in [XXX], [XXX]
  • Each SNMP packet is supposed to have at least one TRAP type.
  • Each TRAP is a type/typedef, and is not a value.
  • A number of TLV/ AVP may be attached to a TRAP.
  • Each set of TLV/ AVP must be grouped with a GROUP type.
  • As far as I note, sequence order of TLV/ AVP isn't important.

I advise use of a validator, which will report errors verbosely. I used 3.

  • The most widely used version of SNMP is v2c. There is v1 and v3. The first edition was too simple; and third edition requires complex authentication, which is hard to manage.
  • There is a numeric naming scheme, like MAC codes or IP6, to id every section of data inside SNMP. The naming scheme is known as OID.
  • There are published MIBs for many networking/ hardware vendors. These are frequently inside their own enterprise ID.
  • Localised SNMP (i.e. specific to your company) should be inside an specific/ custom enterprise OID.
  • You can get a SNMP enterprise ID via 4
  • The SNMP packets are sent via UDP, and are not acknowledged.

SNMP MIB grammar

RSS. Share: Share this resource on your twitter account. Share this resource on your linked-in account. G+

SNMP MIB grammar

RSS. Share: Share this resource on your linked-in account. Share this resource on your twitter account. G+ ­ Follow edited