Hello Note that SNMPv1 and SNMPv2c/v3 traps are significantly different. Check the SNMP standards.
This should work: snmptrap -v 2c -c public -M "my mibs path" "address" '' SNMPv2-MIB::snmpTrapOID SNMPv2-MIB::sysName.0 s "test" But also consult man snmptrap. Eirik Nordbrøden (+47) 90174789 > From: akshata s harkantra [mailto:[email protected]] > Sent: 1. april 2011 01:54 > To: Dave Shield > Cc: [email protected] > Subject: Re: snmptrap command > > Thanks Dave for your suggestion. > > After I identified the notifcation object, the following is working > > snmptrap -v 1 -c public -M "my mibs path" "address" SNMPv2-MIB::snmpTrapOID > localhost 5 1 '' SNMPv2-MIB::sysName.0 s "test" > > For the above command I see the string "test" getting received on the > receiver side > > But the same thing when I try using v2/v3 version ,It gives the following > error [Changing -v to 2c or 3] > > > localhost: Unknown Object Identifier (Sub-id not found: (top) -> localhost) > > Command for v2 used > > snmptrap -v 2 -c public -M "my mibs path" "address" SNMPv2-MIB::snmpTrapOID > localhost 5 1 '' SNMPv2-MIB::sysName.0 s "test" > > Command for v3 > > snmptrap -e 0xc0a80102c0a80102 -v 3 -u snmpuser -a MD5 -A passwd1 -x DES -X > passwd2 -l authPriv -M "mibs path" "ipaddress" SNMPv2-MIB::snmpTrapOID > localhost:162 7 1 '' SNMPv2-MIB::sysName.0 s "Sending a test trap" > > > Regards, > Akshata > : : ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
