[SNMP4J] Message processing model 3 returned error: 1405 for privacy AES192/AES256
~Kanagavelu~
skanagavelu at gmail.com
Wed Jun 22 10:35:42 CEST 2011
Hi Friends,
I have seen the below post that SNMP4J wont support *3DES encryption.
*http://lists.agentpp.org/pipermail/snmp4j/2007-June/002224.html
Could you please, confirm me.
Also Please comment me, If it is supported, how to avoid
"SNMPv3_USM_UNSUPPORTED_SECURITY_LEVEL = 1403" error.
Thanks,
Velu.
On Wed, Jun 22, 2011 at 10:51 AM, ~Kanagavelu~ <skanagavelu at gmail.com>wrote:
> Hi Frank/Jochen/Chico,
>
> What is the problem with 3DES encryption.
> Kindly provide your comments.
> That will be more valuable for me.
>
> Thanks,
> Velu.
>
>
>
> On Tue, Jun 21, 2011 at 6:24 PM, ~Kanagavelu~ <skanagavelu at gmail.com>wrote:
>
>> Hi Jochen,
>>
>> Thanks for your input.
>>
>> Yes. The same code is working fine for AES256.
>> Attaching the code for reference.
>> Kindly let me know do i need to add any more lines to enable
>> authentication.
>>
>> import java.io.IOException;
>> import java.util.ArrayList;
>> import org.snmp4j.ScopedPDU;
>> import org.snmp4j.Snmp;
>> import org.snmp4j.TransportMapping;
>> import org.snmp4j.UserTarget;
>> import org.snmp4j.mp.MPv3;
>> import org.snmp4j.mp.SnmpConstants;
>> import org.snmp4j.security.AuthMD5;
>> import org.snmp4j.security.Priv3DES;
>> import org.snmp4j.security.PrivAES256;
>> import org.snmp4j.security.SecurityLevel;
>> import org.snmp4j.security.SecurityModel;
>> import org.snmp4j.security.SecurityModels;
>> import org.snmp4j.security.SecurityProtocols;
>> import org.snmp4j.security.USM;
>> import org.snmp4j.security.UsmUser;
>> import org.snmp4j.smi.IpAddress;
>> import org.snmp4j.smi.OctetString;
>> import org.snmp4j.smi.TimeTicks;
>> import org.snmp4j.smi.UdpAddress;
>> import org.snmp4j.smi.VariableBinding;
>> import org.snmp4j.transport.DefaultUdpTransportMapping;
>> public class TrapSenderVersion3 {
>> public static final ArrayList<UsmUser> usmUserList = new
>> ArrayList<UsmUser>();
>> private Snmp snmp;
>> private OctetString localEngineID;
>> public TrapSenderVersion3() {
>> int engineBoots = 0;
>> localEngineID = new OctetString(MPv3.createLocalEngineID());
>> USM usm = new USM(SecurityProtocols.getInstance(),
>> localEngineID,engineBoots);
>> SecurityModels.getInstance().addSecurityModel(usm);
>> }
>> /**
>> * The method will frame new V3 Trap and forward to Agent running on XP
>> * machine
>> */
>> public void sendTrap_Version3() {
>> TransportMapping transport;
>> OctetString userName = new OctetString("MD5DES3");
>> OctetString pwd = new OctetString("Password123");
>> usmUserList.add(new UsmUser(userName, AuthMD5.ID, pwd, Priv3DES.ID,
>> pwd));
>> UsmUser usmUserArray[] = usmUserList.toArray(new
>> UsmUser[usmUserList.size()]);
>> try {
>> transport = new DefaultUdpTransportMapping();
>> snmp = new Snmp(transport);
>> snmp.getUSM().setUsers(usmUserArray);
>> UserTarget target = new UserTarget();
>> target.setAddress(new UdpAddress("10.120.7.107/10112"));
>> target.setVersion(SnmpConstants.version3);
>> target.setSecurityLevel(SecurityLevel.AUTH_PRIV);
>> target.setSecurityName(userName); //the user you want to send the trap
>> target.setSecurityModel(SecurityModel.SECURITY_MODEL_USM);
>>
>> //Preparing for PDU
>> ScopedPDU pdu = new ScopedPDU();
>> pdu.add(new VariableBinding(SnmpConstants.sysUpTime, new
>> TimeTicks(1000)));
>> pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID,
>> SnmpConstants.linkDown));// new OID(".1.3.6.1.2.1.1.8")));
>> pdu.add(new VariableBinding(SnmpConstants.snmpTrapAddress, new
>> IpAddress("10.120.7.108")));
>>
>> //Sending the PDU
>> pdu.setType(ScopedPDU.TRAP);
>> snmp.send(pdu, target);
>> } catch (IOException e) {
>> e.printStackTrace();
>> }
>> }
>>
>> public static void main(String[] args) {
>> TrapSenderVersion3 obj = new TrapSenderVersion3();
>> obj.sendTrap_Version3();
>> }
>> }
>>
>>
>>
>> On Tue, Jun 21, 2011 at 5:16 PM, Jochen Katz <katz at agentpp.com> wrote:
>>
>>> Hi,
>>>
>>> > org.snmp4j.MessageException: Message processing model 3 returned error:
>>> 1403
>>>
>>> SNMPv3_USM_UNSUPPORTED_SECURITY_LEVEL = 1403;
>>> Are you sure that you used a user with authentication enabled?
>>>
>>> Regards
>>> Jochen
>>> _______________________________________________
>>> SNMP4J mailing list
>>> SNMP4J at agentpp.org
>>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>>>
>>
>>
>
More information about the SNMP4J
mailing list