Hi Parash,

What do you exactly mean by "trap is bound to IPv6 address"?

(If you tried to set the agentAddress field in a trap/notification with a IPv6 address
you will fail, as SNMP supports IPv4 addresses only for this field.

Best regards,
Frank

Am 06.03.2013 01:05, schrieb Hallur,Parashuram:
Frank or any body else on the forum:

Would you please help me with pointers on how to fix this issue? What needs to be done to be able to send the traps from IPv6 application?
Thanks for any pointers.

Parash


On Tue, Mar 5, 2013 at 7:24 AM, <[email protected] <mailto:[email protected]>> wrote:

    The results of your email command are provided below. Attached is your
    original message.

    - Results:
        Ignoring non-text/plain MIME parts

    - Unprocessed:
        the trap is bound to IPv6 address, would you please help me
    with how to fix
        this issue?
        Thanks,
        Parash
        On Mon, Mar 4, 2013 at 11:44 PM, Frank Fock <[email protected]
    <mailto:[email protected]>> wrote:
        > Hi,
        >
        > I think you are trying to sent an IPv6 address as IpAddress
    BER encoded
        > on the wire. This is not possible, because the SNMP standard
    defines
        > IpAddress as IPv4 address and nothing else.
        > If this worked with 1.0 then this was an error in 1.0.
        >
        > Best regards,
        > Frank
        >
        > Am 04.03.2013 12:24, schrieb Hallur,Parashuram:
        >
        >> Hi,
        >>
        >> I'm using the following code to create the target address.

    - Ignored:
        >>
        >> Address targetAddress =
        >>
    GenericAddress.parse("udp:<**HostName>:<TrapReceiverPort>/**162");
        >>
        >> This goes through fine when I use the snmp4j1.0.jar.
    However, this
        >> particular version seems does not support the IPv6
    addresses. For IPv6
        >> requests it throws the java.nio.**BufferOverFlowException.
        >> java.nio.**BufferOverflowException
        >>      at java.nio.Buffer.nextPutIndex(**Unknown Source)
        >>      at java.nio.HeapByteBuffer.put(**Unknown Source)
        >>      at org.snmp4j.asn1.**BEROutputStream.write(**
        >> BEROutputStream.java:65)
        >>      at org.snmp4j.asn1.BER.encodeOID(**BER.java:437)
        >>      at org.snmp4j.smi.OID.encodeBER(**OID.java:205)
        >>      at org.snmp4j.smi.**VariableBinding.encodeBER(**
        >> VariableBinding.java:176)
        >>      at org.snmp4j.PDUv1.encodeBER(**PDUv1.java:207)
        >>      at
    org.snmp4j.mp.MPv1.**prepareOutgoingMessage(MPv1.**java:108)
        >>      at
        >>
    org.snmp4j.**MessageDispatcherImpl.sendPdu(**MessageDispatcherImpl.java:*
        >> *376)
        >>      at org.snmp4j.Snmp.sendMessage(**Snmp.java:900)
        >>      at org.snmp4j.Snmp.send(Snmp.**java:779)
        >>      at org.snmp4j.Snmp.send(Snmp.**java:771)
        >>
        >> To fix the above issue, I picked up the latest jars
    snmp4j2.1.0.jar,
        >> snmp4j1.11.3.jar, and snmp4j1.10.jar. All of these throw
    the unknown host
        >> exception. What I notice is that snm4j sends hostname as
        >> "hostname:trapreceiverport" to underneath java api to
    resolve the address,
        >> hence the issue unknownhostexception. The same code works
    with 1.0 version
        >> of jar. Are there any difference from now and then? Any
    help is very much
        >> appreciated.
        >>
        >> Thanks,
        >> Parash
        >> ______________________________**_________________
        >> SNMP4J mailing list
        >> [email protected] <mailto:[email protected]>
        >>
    
http://lists.agentpp.org/**mailman/listinfo/snmp4j<http://lists.agentpp.org/mailman/listinfo/snmp4j>
        >>
        >
        > --
        > ---
        > AGENT++
        > Maximilian-Kolbe-Str. 10
        > 73257 Koengen, Germany
        > https://agentpp.com
        > Phone: +49 7024 8688230
        > Fax:   +49 7024 8688231
        >
        > ______________________________**_________________
        > SNMP4J mailing list
        > [email protected] <mailto:[email protected]>
        >
    
http://lists.agentpp.org/**mailman/listinfo/snmp4j<http://lists.agentpp.org/mailman/listinfo/snmp4j>
        >

    - Done.



    ---------- Forwarded message ----------
    From: "Hallur,Parashuram" <[email protected]
    <mailto:[email protected]>>
    To: Frank Fock <[email protected] <mailto:[email protected]>>,
    [email protected] <mailto:[email protected]>
    Cc:
    Date: Tue, 5 Mar 2013 07:24:43 +0530
    Subject: Re: [SNMP4J] UnknowHost Exception while sending the snmp trap
    Thanks Frank for the response. Yes the application which is trying
    to send the trap is bound to IPv6 address, would you please help
    me with how to fix this issue?

    Thanks,
    Parash


    On Mon, Mar 4, 2013 at 11:44 PM, Frank Fock <[email protected]
    <mailto:[email protected]>> wrote:

        Hi,

        I think you are trying to sent an IPv6 address as IpAddress
        BER encoded
        on the wire. This is not possible, because the SNMP standard
        defines
        IpAddress as IPv4 address and nothing else.
        If this worked with 1.0 then this was an error in 1.0.

        Best regards,
        Frank

        Am 04.03.2013 12:24, schrieb Hallur,Parashuram:

            Hi,

            I'm using the following code to create the target address.

            Address targetAddress =
            GenericAddress.parse("udp:<HostName>:<TrapReceiverPort>/162");

            This goes through fine when I use the snmp4j1.0.jar.
            However, this
            particular version seems does not support the IPv6
            addresses. For IPv6
            requests it throws the java.nio.BufferOverFlowException.
            java.nio.BufferOverflowException
                 at java.nio.Buffer.nextPutIndex(Unknown Source)
                 at java.nio.HeapByteBuffer.put(Unknown Source)
                 at
            org.snmp4j.asn1.BEROutputStream.write(BEROutputStream.java:65)
                 at org.snmp4j.asn1.BER.encodeOID(BER.java:437)
                 at org.snmp4j.smi.OID.encodeBER(OID.java:205)
                 at
            org.snmp4j.smi.VariableBinding.encodeBER(VariableBinding.java:176)
                 at org.snmp4j.PDUv1.encodeBER(PDUv1.java:207)
                 at
            org.snmp4j.mp.MPv1.prepareOutgoingMessage(MPv1.java:108)
                 at
            
org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:376)
                 at org.snmp4j.Snmp.sendMessage(Snmp.java:900)
                 at org.snmp4j.Snmp.send(Snmp.java:779)
                 at org.snmp4j.Snmp.send(Snmp.java:771)

            To fix the above issue, I picked up the latest jars
            snmp4j2.1.0.jar,
            snmp4j1.11.3.jar, and snmp4j1.10.jar. All of these throw
            the unknown host
            exception. What I notice is that snm4j sends hostname as
            "hostname:trapreceiverport" to underneath java api to
            resolve the address,
            hence the issue unknownhostexception. The same code works
            with 1.0 version
            of jar. Are there any difference from now and then? Any
            help is very much
            appreciated.

            Thanks,
            Parash
            _______________________________________________
            SNMP4J mailing list
            [email protected] <mailto:[email protected]>
            http://lists.agentpp.org/mailman/listinfo/snmp4j


-- ---
        AGENT++
        Maximilian-Kolbe-Str. 10
        73257 Koengen, Germany
        https://agentpp.com
        Phone: +49 7024 8688230
        Fax:   +49 7024 8688231

        _______________________________________________
        SNMP4J mailing list
        [email protected] <mailto:[email protected]>
        http://lists.agentpp.org/mailman/listinfo/snmp4j





--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to