I am trying to get SNMPv3
to work using sharpsnmplib
but i am stuck on the discovery step.
Discovery discovery = Messenger.GetNextDiscovery(SnmpType.GetRequestPdu);
ReportMessage report = discovery.GetResponse(60000, new IPEndPoint(IPAddress.Parse(IPAddr), 161));
I was under the impression that the above code will send an empty request that would get the engineID
and context from the device.
But when looking at the result, it returns 1.3.6.1.6.3.15.1.1.4.0
which is usmStatsUnknownEngineIDs
.
Am i missing something?
SNMPv3 requires an application to know the identifier (snmpEngineID) of the remote SNMP protocol engine in order to retrieve or manipulate objects maintained on the remote SNMP entity. The EngineID is also one of the inputs used for key derivation of the authentication and privacy keys.
The Engine ID is used by SNMPv3 entities to uniquely identify them. An SNMP agent is considered an authoritative SNMP engine. This means that the agent responds to incoming messages (Get, GetNext, GetBulk, Set) and sends trap messages to a manager. The agent's local information is encapsulated in fields in the message.
A REPORT operation is an indication of some core SNMP communication error or bootstrapping response. It is most typically handled internally to the SNMP stack and most end-users and even application developers don't need to know about it.
The SNMP Version 3 feature provides secure access to devices by authenticating and encrypting data packets over the network. Simple Network Management Protocol version 3 (SNMPv3) is an interoperable, standards-based protocol that is defined in RFCs 3413 to 3415.
You have done nothing wrong, but simply some SNMP agents require the initial requests to contain a valid engine ID and they only respond to those valid requests.
That's the security configuration part, not caused by #SNMP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With