Sumit S Chawla
Sumit S Chawla

Reputation: 3590

SNMPv3 - Convert Custom MIB File to python MIB file

I am working on SNMPv2 currently and want to switch to SNMPv3. I have my MIB File written for v2, which was converted to python file using: pysmi. But in the documentation, it is written that it only supports v1 and v2.

So, my question is:

  1. Are there any changes in v2 MIB file and v3 MIB file?
  2. How to convert MIB file to python file for v3.
  3. Is there any documentation for SNMP v3 which I can refer to write MIB, send traps and receive traps using GET method apart from official documentation.

Upvotes: 0

Views: 549

Answers (2)

Ilya Etingof
Ilya Etingof

Reputation: 5555

To expand a bit on Andrew's answer:

  1. You do not need to change anything MIB-related when switching from SNMPv2c to SNMPv3. The same Pythonized MIBs should work just fine. That's because pysnmp used SMIv2 internally regardless of anything.

  2. There is no need for that.

  3. You should be using the same MIB. The best way to send SNMP notifications would be by following this example. Just replace CommunityData with UsmUserData.

Upvotes: 2

Andrew Komiagin
Andrew Komiagin

Reputation: 6556

You are confusing two different things SNMP protocol versions and MIB format versions. Currently there 3 versions of SNMP:

  • SNMPv1
  • SNMPv2C
  • SNMPv3

and there are two versions of MIB files:

Upvotes: 2

Related Questions