0

I am writing on a MIB for SNMP using ASN.1.

I have multiple revisions of a board. All boards have Common attributes but later revisions have additional attributes

Is it possible for a new revision to inherit the previous attributes?

Is it possible to go like this? Revision0 (OID 1) -> attributes (OID 1) Revision1 (OID 2) -> attributes (OID 1) in a single MIB? I tried later changing the attribute's identifier but all object-types go to Revision0!

Saveen
  • 4,120
  • 14
  • 38
  • 41
Findas
  • 69
  • 3
  • The question is stated as a question about ASN.1, but in the body, you speak of "multiple revisions of a board" and about a "new revision" (of a board, presumably) inheriting attributes. I don't know about MIB or SNMP. I do know about ASN.1. I don't understand what you are asking. – Kevin May 13 '19 at 14:43

1 Answers1

0

It depends on what you're doing and on what you need.

If I had a bunch of scalar objects, and I'd added some to the end of a subtree to support newer equipment, and the older equipment didn't support it, you'd just rely on the older equipment rejecting requests for the newer OIDs. That's perfectly cromulent.

If your MIBs are more structural, with tables, you can either:

  1. Do the same thing; just add more fields to the table that are conditionally supported, or
  2. Create a second table with the new information, sharing an index with the first one to effectively "extend" the first table. However, this may be overkill, and your users will have to poll both tables independently; semantically, however, they will be neatly linked.

In general you want to try to avoid extending your MIBs. Think of the data you'll need up-front to the extent possible, regardless of the state of hardware support. Of course in reality you will think of/invent features later so it cannot be entirely avoided. Certainly don't change OIDs: that's prohibited.

By the way, though the lexical notation of a MIB is ASN.1, the scheme you're really using is SMIv2.

Community
  • 1
  • 1
Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055