Skip to content

Unknown SNMP security name encountered #22

@Whoopsadaisy

Description

@Whoopsadaisy

Just tried the snmptrap.py SNMPv3 example from doc:
snmptrap.py -v3 -e 8000000001020304 -l authPriv -u usr-sha-aes
-A authkey1 -X privkey1 -a SHA -x AES 172.20.16.80 12345
1.3.6.1.4.1.20408.4.1.1.2 SNMPv2-MIB::sysName.0 = "mysystem"

(In the example it's "my system". <But this will cause error Error: Command-line parser error at token string(a)>)

But as soon I enter a security engine ID I get the error:
Error: {'errorIndication': UnknownSecurityName('Unknown SNMP security name encountered',)}

On the receiver side I have
snmptrapd -f -c /etc/snmp/snmptrapd.conf -Lo -On -t
with config:
createUser -e 0x8000000001020304 traptest SHA mypassword AES mypassword
createUser -e 0x8000000001020304 usr-sha-aes SHA authkey1 AES privkey1
authuser log traptest
authuser log usr-sha-aes
engineBoots 5

Foundation libraries: pysmi 0.3.4, pysnmp 4.4.12, pyasn1 0.4.8
Python interpreter: 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC]

If i send the trap via the net-snmp command snmptrap, it works:

emitter:
snmptrap -v3 -e 8000000001020304 -l authPriv -u usr-sha-aes
-A authkey1 -X privkey1 -a SHA -x AES 172.20.16.80 12345
1.3.6.1.4.1.20408.4.1.1.2 SNMPv2-MIB::sysName.0 = "mysystem"

receiver:
NET-SNMP version 5.7.3
2022-02-16 11:46:00 [UDP: [172.17.13.170]:60297->[172.20.16.80]:162]:
.1.3.6.1.2.1.1.3.0 = Timeticks: (12345) 0:02:03.45 .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.20408.4.1.1.2 .1.3.6.1.2.1.1.5.0 = STRING: mysystem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions