0

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.
Sumit S Chawla
  • 3,180
  • 1
  • 14
  • 33

2 Answers2

2

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:

Community
  • 1
  • 1
Andrew Komiagin
  • 6,446
  • 1
  • 13
  • 23
2

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.

Ilya Etingof
  • 5,440
  • 1
  • 17
  • 21
  • I was checking `http://snmplabs.com/pysnmp/examples/hlapi/asyncore/sync/agent/ntforg/common-notifications.html#inform-auth-md5-privacy-des` Haven't tried it yet. But after adding `UsmUserData` how would the user be authenticated at the receiver end? – Sumit S Chawla Apr 26 '19 at 12:14
  • I tried running the current script by adding `UsmUserData` and I am getting `Unsupported SNMP version 3` – Sumit S Chawla Apr 26 '19 at 12:18
  • I am using `cbFun` as shown here: `http://snmplabs.com/pysnmp/examples/v1arch/asyncore/manager/ntfrcv/transport-tweaks.html` .How can i use it for v3? – Sumit S Chawla Apr 26 '19 at 12:57