question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to negotiate authoritative SNMP engine ID

See original GitHub issue

I was unable to get getcmd response from cisco router in gns3, where as i was able to get reply from a juniper olive device. “No SNMP response received before timeout” is the reply. When i tried to capture the packets in wire shark, i found the report pdu from juniper device contains the authoritative engine id, where as from cisco device, it was missing. Python code which i am running (taken from the examples), is below:

from pysnmp.hlapi import *

errorIndication, errorStatus, errorIndex, varBinds = next(
    getCmd(SnmpEngine(),
           UsmUserData('noauthuser'),
           UdpTransportTarget(('10.205.96.1', 161)),
           ContextData(),
           ObjectType(ObjectIdentity('SNMPv2-MIB', 'sysDescr', 0)))
)

if errorIndication:
    print(errorIndication)
elif errorStatus:
    print('%s at %s' % (errorStatus.prettyPrint(),
                        errorIndex and varBinds[int(errorIndex) - 1][0] or '?'))
else:
    for varBind in varBinds:
        print(' = '.join([x.prettyPrint() for x in varBind]))

So can anyone throw some light on why it happens so. When i tried to run the ‘get’ command on the said cisco device by using GetSnmp.exe from snmpsoft.com, i am getting the proper response. Only when using the above code, i was unable to get any response.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
etingofcommented, Sep 24, 2019

4.4.12 has been released on PyPI and GitHub.

1reaction
etingofcommented, Sep 24, 2019

I think commit c5cefab2cee5ae38d093743ef83a08641385b1cc should fix this issue. If you could test it before I release the entire thing - that would be helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SNMP Engine ID - Cisco
An SNMP agent is considered an authoritative SNMP engine. This means that the agent receives incoming messages (Get, GetNext, GetBulk, Set), and sends...
Read more >
Forward alerts to an SNMP server
The authoritative (security) engine ID used for SNMP version 3 REQUEST messages by primary Manager. The hex value of the Authoritative Engine ID...
Read more >
Defining the engine id - Commscope Technical Content Portal
To determine what the default engine ID of the device is, enter the show snmp engineid command and find the following line: Local...
Read more >
Bug ID 837481: SNMPv3 pass phrases should not be synced ...
SNMPv3 fails to read authenticated or encrypted messages to all but one of the ... check "Authoritative (security) engineID for SNMPv3" is not...
Read more >
TRAP forwarder, SNMPv2c to SNMPv3 - Thola
Since SNMP TRAP is always a one-way communication, SNMPv3 parties can't negotiate authoritative SNMP engine ID automatically which is used for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found