SNMP GetBulk command

前提是你 提交于 2019-12-07 08:43:13

问题


i would like to know whether i can use the getbulk command with SNMPv1. If yes please let me know its adv... in no then what are the drawbacks.

Thanks in advance.

Uday.


回答1:


No. That is determined by the protocol stack (GET BULK was introduced in v2 stack), not by other factors.

If you want to use GET BULK, you have to use SNMP v2 and v3, not v1.




回答2:


As others have stated, the GetBulkRequest was introduced in SNMPv2. However you may find it useful to know that a version 1 GetRequest PDU can be associated with multiple variable bindings. In doing so, the GetRequest response will contain a mapping of those OID objects and their current values (if the request was successful).

If you do not require the "walking" of the tree, and you have all the OID's in advance, then loading a GetRequest with all needed variable bindings may work for you.

If you are using Java, the SNMP4J API is compatible with SNMP v1, v2c and v3. SNMP4J API




回答3:


It's worth noting that GETBULK is in v2c, which is a minor upgrade to SNMPv1 and thus supported by nearly every device these days even if the vendor didn't go to the trouble of doing SNMPv3 entirely.

SNMPv1: uses communities with V1 PDUs SNMPv2c: uses communities with V2 PDUs SNMPv3: uses multiple security modules with V2 PDUs

And then the SMI version numbers (1 and 2) can be used with any protocol unless there are SMIv2 datatypes which can't be accessed with V1 PDUs (eg, counter64).




回答4:


If you perform snmpbulkwalk using v1 then you will recieve the following error

bash# snmpbulkwalk -v 1 -Os -c demopublic test.net-snmp.org
No log handling enabled - using stderr logging
snmpbulkwalk: Cannot send V2 PDU on V1 session

as snmpbulkwalk introduced on v 2c, performing this will bring you the neat output, learn the concept

bash# snmpbulkwalk -v2c -Os -c demopublic test.net-snmp.org
sysDescr.0 = STRING: test.net-snmp.org
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (174391443) 20 days, 4:25:14.43
sysContact.0 = STRING: Net-SNMP Coders <net-snmp-coders@lists.sourceforge.net>
sysName.0 = STRING: test.net-snmp.org
sysLocation.0 = STRING: Undisclosed
sysORLastChange.0 = Timeticks: (7) 0:00:00.07


来源:https://stackoverflow.com/questions/3986497/snmp-getbulk-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!