jmx-dev Query: IPv6 Support in JMX SNMP APIs

Daniel Fuchs Daniel.Fuchs at Sun.COM
Tue May 6 09:09:26 PDT 2008


Hi Nitin, all,

Nitin Agrawal wrote:
> We are using javax.management.snmp APIs. 

The javax.management.snmp package is an old deprecated
package name. The SNMP APIs where candidate for
inclusion in JMX, but they never made it to the final
JMX specification.
Since then the javax.management.snmp packages have been
renamed into com.sun.management.snmp, which is provided
by JDMK 5.1 or OpenDMK.

> In our Management application, 
> we want to parse the OID data (from a SNMP GET request or a trap), where 
> in the OID type is an IPAddress and the value can be either IPv4 or IPv6 
> address. To represent this we are using 
> "javax.management.snmp.SnmpIpAddress" class. This supports IPv4 
> addresses only.

SnmpIpAddress corresponds to the IpAddress syntax defined in RFC 1155.
ftp://ftp.rfc-editor.org/in-notes/rfc1155.txt

It is  a 4 byte Octet String and can only be used to transport
IPv4 address. An object using the IpAddress syntax cannot be used
to hold an IPv6 address.

> I also checked on the Open DMK site: 
> https://opendmk.dev.java.net/download/index.html#opendmk-1.0-b02 and 
> downloaded - opendmk-1.0-b02-src-dual-01-Oct-2007_19-17-46.zip
> 
> The class - 
> OpenDMK-src\src\snmp_manager\com\sun\management\snmp\SnmpIpAddress.java 
> (Attached here: /(See attached file: SnmpIpAddress.java)/ ) does not 
> have IPv6 support.

It can't. This is not a limitation of the API - it's a limitation of
of the SNMP definitions in your MIB.

> Are you aware of any implementation of such APIs which has got IPv6 
> support ?

You need to upgrade your MIB and use an object based on one
of the textual conventions defined in the INET-ADDRESS-MIB
(RFC 4001)
ftp://ftp.rfc-editor.org/in-notes/rfc4001.txt

> If I see the J2SE JMX API specs @ 
> http://java.sun.com/j2se/1.5.0/docs/guide/jmx/spec.html, 
> "javax.management.snmp" is not there. Looks like formal support for SNMP 
> APIs has been dropped by sun.

Not at all. As explained these APIs are exported by Java DMK 5.1 and
OpenDMK. They re not part of the Java platform.
See here for more details:
http://blogs.sun.com/jmxetc/entry/what_is_the_jvm_snmp

Hope this helps,

-- daniel
http://blogs.sun.com/jmxetc

> 
> Regards
> -Nitin
> 
> 
> 
> 
> Inactive hide details for Daniel Fuchs ---05/05/2008 10:12:58 
> PM---Hi,Daniel Fuchs ---05/05/2008 10:12:58 PM---Hi,
> 
>                         *Daniel Fuchs <Daniel.Fuchs at Sun.COM>*
>                         Sent by: Daniel.Fuchs at Sun.COM
> 
>                         05/05/2008 09:57 PM
>                         Please respond to
>                         Daniel.Fuchs at Sun.COM
> 
> 	
> 
> To
> 	
> Nitin Agrawal/San Francisco/Contr/IBM at IBMUS
> 
> cc
> 	
> jmx-dev <jmx-dev at openjdk.java.net>, Ken Ellinwood/Los Angeles/IBM at IBMUS
> 
> Subject
> 	
> Re: jmx-dev Query: IPv6 Support in JMX SNMP APIs
> 
> 	
> 
> 
> Hi,
> 
> Yes, IPv6 is supported.
> 
> You can specify IPv6 addresses in the ACL files, and you can
> specify a specific interface to which to bind to (if you want
> to bind to an interface which is not the default) using
> the com.sun.management.snmp.interface property.
> 
> for instance, you can define:
> com.sun.management.snmp.interface=::1
> 
> See <jdk-install>/jre/lib/management/snmp.acl.template
> and <jdk-install>/jre/lib/management/management.properties
> 
> Hope this helps,
> 
> -- daniel
> http://blogs.sun.com/jmxetc
> 
> Nitin Agrawal wrote:
>  > Hi
>  >
>  > Apologies if it is a repeat question, but I could not find an answer to
>  > it on http://openjdk.java.net/groups/jmx/ and in the mailing list 
> archives.
>  >
>  > *Is IPv6 supported* in JMX SNMP APIs (javax.management and sub-packages)
>  > with JDK 1.5? I have searched on Sun's site and googled it, but could
>  > not get any lead on it.
>  >
>  > In our application, we are using these APIs which are only IPv4
>  > compliant. We are adding IPv6 support and hence this query.
>  >
>  > If there is already IPv6 support available for 1.5, please point me to
>  > it. If it is not, then:-
>  > - Please let me know in case if it supported in JDK 1.6 or even here
>  > there is no support for IPv6.
>  >
>  > If there is not support anywhere, we need to go with DIY approach and
>  > (re-)invent the wheel.
>  >
>  > Will appreciate any thoughts/pointers on this.
>  >
>  > Regards
>  > -Nitin Agrawal
>  >
> 
> 




More information about the jmx-dev mailing list