2

I have a client machine which sends snmpinform. In other machine i am running snmptrapd server.

I wanted to mention context engine id and authoritative engine id explicitly.

While sending command i can use -e for authoritative engine id, -E for context engine Id.

But, the problem is how can I mention these values in the snmptrad.conf

Snippet of snmptrapd.conf is

createUser -e 0x000006D70000000000000000 FMS

authUser log,execute,net FMS noauth

engineID  000006D7C0A800C800000000

My command for snmpinform is :

snmpinform -v 3 -d -n "" -l noAuthNoPriv -u FMS -E 0x000006D70000000000000000 -e 80001f8804303030303036443743304138303043383030303030303030 192.168.0.200 162 1.3.6.1.4.1.1751.2.119.1.1.1.0

The output is timeout(Error message came). Further investigations with wireshark showed, in the report it is giving both authoritative and context engine ids with same values.

I did try several work arounds without any use

  1. Did not give -e option while sending snmpinform. It did discovery of authoritative engine Id and the output is still the same (Error message and timeout)

  2. Did not give -E option. snmpinform: Unknown user name

    obv: It seems to be completely different behavior. It is able to properly decode the context engine id and able to identify the user name. But, the report is with the different context engine id.

  3. Did not give -e option while creating user and while sending gave only -e(Authoritative engine id). Then it worked perfectly.

    obv: Both the authoritative and context engine ids are same. So, it worked perfectly.

What should do if i want to mention both the engine ids in the conf file?

How can i give authoritative engine id in snmptrapd.conf file as hex number?. It expectes text string. What if i have non-printable characters.

Thanks for reading patiently :-)

K.K
  • 311
  • 1
  • 7
  • 17

1 Answers1

0

I think -3e for (security) engine ID and -3E for context engine ID should do the trick for snmptrapd.conf. I found these in the net-snmp source in snmplib/snmpv3.c:150 for reference, not really sure if they are documented.

I think that is what you're asking for? You may need to play with the net-snmp source and step through things if snmptrapd doesn't behave correctly.

Colby Blair
  • 396
  • 4
  • 15