Giuseppe Giusti | 18 Apr 09:52 2014
Picon

Hello to everyone

Simple question:
is there a way to put a float or a double type in a smi variable?
thanks
John Money | 3 Apr 18:43 2014
Picon

Multiple Devices with the same Authoritative Engine ID

Hi Frank,

Thank you for the great framework! I have been using snmp4j to communicate
with several devices using v3 with authPriv. Recently, I came across a
scenario where 10 of the devices I am querying have the same USM parameters
(Security Name, Security Level, Auth Key and Priv Key) and I can see in the
logs that they also have the same Authoritative Engine ID. This causes the
snmp4j code to report the message "RFC3414 §3.2.7.a Not in time window"
when one of the devices has a significantly different Engine Time than the
others. I have the following questions:

1. Can the Authoritative Engine ID be the same for multiple devices
according to the SNMP RFC?

2. Is the Authoritative Engine ID the same as the device Engine ID or is it
a separate id altogether?

I have tried searching the web for these answers and I am not getting
anything concrete. Also, I modified the snmp4j code to work around this
issue by changing the Hash Key for the table variable in the UsmTimeTable
class so that the new key is a combination of Device IP Address and
Authoritative Engine Id. This allows each device to have its own Engine
Time that is used for comparison and resolves the "Not in time window"
issue. Two more questions:

3. Do you have any interest in adding this functionality to the snmp4j
code? If so I can send the source to you.

4. I noticed that the comments for the UsmTimeTable class mention that it
is a Singleton, yet the code is not setup as a singleton. Did you intend
(Continue reading)

Tongjie Li | 3 Apr 07:11 2014
Picon

[SNMP4j] How to determine the correct maxNumOfRowsPerPDU in tableUtils

Hi everybody
      I was executing a getTable in snmp4j on entitymib. I defined the
following columns like  following sample code

          public static OID[] getColumnOIDs() {
        if (equipmentColumns != null) return equipmentColumns;
        equipmentColumns = new OID[11];
        equipmentColumns[0] = new OID(".1.3.6.1.2.1.47.1.1.1.1.1");
//entPhysicalIndex
        equipmentColumns[1] = new OID(".1.3.6.1.2.1.47.1.1.1.1.2");
//entPhysicalDescr
        equipmentColumns[2] = new OID(".1.3.6.1.2.1.47.1.1.1.1.3");
//entPhysicalVendorType
        equipmentColumns[3] = new OID(".1.3.6.1.2.1.47.1.1.1.1.4");
//entPhysicalContainedIn
        equipmentColumns[4] = new OID(".1.3.6.1.2.1.47.1.1.1.1.5");
//entPhysicalClass
        equipmentColumns[5] = new OID(".1.3.6.1.2.1.47.1.1.1.1.6");
//entPhysicalParentRelPos
        equipmentColumns[6] = new OID(".1.3.6.1.2.1.47.1.1.1.1.7");
//entPhysicalName
        equipmentColumns[7] = new OID(".1.3.6.1.2.1.47.1.1.1.1.13");
//entPhysicalModelName
        equipmentColumns[8] = new OID(".1.3.6.1.2.1.47.1.1.1.1.14");
//entPhysicalAlias
        equipmentColumns[9] = new OID(".1.3.6.1.2.1.47.1.1.1.1.16");
//entPhysicalFru if is fixed
        equipmentColumns[10] = new
OID(".1.3.6.1.2.1.47.1.1.1.1.11");//entPhysicalSerialNum
        return equipmentColumns;
(Continue reading)

ajin george | 2 Apr 06:15 2014
Picon

Identification of 802.1D and 802.1Q devices

Hi all,

            Is there any way by which we can identify whether a snmp device
is of type 802.1D or 802.1Q. Is it possible to identify it through SNMP4j
by analysing result of some OID or so. Could someone please share some
information regarding this?

Regards

   Ajin
Prathib Kumar | 27 Mar 07:20 2014
Picon

Need help in understanding how msgAuthoritativeEngineBoots is populated

Hi Frank/ All,

In our application, we are trying to query the sysUpTime for every 5 mins
and the customer is using SNMPV3 authPriv.

In our application, we dont populate msgAuthoritativeEngineBoots and I did
bit search on internet, it looks SNMP4J also doesnt set this attribute.

Any idea where else it can get populated ? or any idea where else to look
for ?

Packet 378:

   378 2014-03-11 06:05:02.833067 10.36.127.6
10.36.125.4           SNMP     173    get-request SNMPv2-MIB::sysUpTime.0

[...]

*    msgAuthoritativeEngineBoots: 13*

    msgAuthoritativeEngineTime: 600888

    msgUserName: admin

[...]

                data: get-request (0)

                    get-request

(Continue reading)

Picon

Special Characters in Passphrases

Good morning all,

We have SNMP4J in a production system and I've noticed that using special characters in the authentication
and privacy phrases doesn't seem to work.  For example, "Password12 <at> 345678" will fail where
"Password12345678" will succeed.  My suspicion is that it is a limitation of the device I'm talking to and
not of the SNMP4J library.  Is my assessment correct?  Or are there limitations on the character set for pass
phrases that are identified somewhere deep within the SNMP RFCs?

Thanks,

Peter McCarthy
Samuel John | 21 Mar 06:25 2014
Picon

Adding java file for custom MIB file into AgentX.

HI,
I am new to snmp4j and I'm neither an expert in java. I am trying to learn
implementation of AgentX to create a master and sub agent for the company I
work in as a trainee. Since i could not find a free mib compiler in java, i
was asked to code the master agent and sub agent myself.

I have been able to create a java file similar to the AgentppTestMib.java
that monitors 3 scalar variables. I did that by comparing the agenpptest
mib file and its corresponding java file. But I find creating code to
implement tabular values a bit hard to understand from the
AgentppTestMib.java file.

If there is anyway you can help me understand, either by explaining the
steps or by giving a link where I can find a good tutorial, kindly do so.
Expecting a positive response.

Thanking you,
Samuel John
VIKRAM MODUGU | 15 Mar 16:55 2014

Re: SNMP4J Digest, Vol 86, Issue 11

Hi Frank,

When we have put heavy load on on snmp agent, it seems the agent is becoming unresponsive for some time tentatively.
There is other scenario, where are getting the time out from the snmp agent.

Can you pls give me the scenarios where all the possibilities of getting snmp time out message when we do the
snmp walk?

did you find fault in our implementation of updating the table model.

Thanks,
Vikram.
________________________________________
From: snmp4j-bounces@...
[snmp4j-bounces@...] on behalf of
snmp4j-request@... [snmp4j-request@...]
Sent: Saturday, March 15, 2014 4:30 PM
To: snmp4j@...
Subject: SNMP4J Digest, Vol 86, Issue 11

Send SNMP4J mailing list submissions to
        snmp4j@...

To subscribe or unsubscribe via the World Wide Web, visit
        https://s16675406.onlinehome-server.info/mailman/listinfo/snmp4j
or, via email, send a message with subject or body 'help' to
        snmp4j-request@...

You can reach the person managing the list at
        snmp4j-owner@...
(Continue reading)

VIKRAM MODUGU | 14 Mar 12:47 2014

Issue with bulk data loading into MOMutableTableModel

HI,

We have seen the snmp4j agent is crashing when heavy load is being put on the snmp4j agent.

We have a scenario of having 50k records in a particular  mib table, here we are giving how we are loading the
content into the motable model.

                MOMutableTableModel model = (MOMutableTableModel) table.getModel();

                                                synchronized (model) {

                                                                model.clear();

                                                                Map<Integer, String> domainMap = postgresServ.getAllAvailableDomains();

                                                                logger.info("Acquired the lock on associated clients table model.");

                                                                List<AssociatedClient> assocClientList = redisServ

                                                                                                .getAssociatedClientsInfo();

                                                                int recCount = 1;

                                                                for (AssociatedClient client : assocClientList) {

                                                                model.addRow(new DefaultMOMutableRow2PC(),Variable[]);

}

}
(Continue reading)

Tal Kapon | 13 Mar 21:51 2014

Can I override the limitation of SNMP v3 minimum passphrases length?

Hi all ,

I am using SNMP4J in order to query network equipment.

Cisco switches allow SNMP v3 users to be defined with passphrases shorter
than 8 characters. SNMP4J throws the following exception when using short
passwords. Any way to override this limitation other than changing the
source code?

*Caused by: java.lang.IllegalArgumentException: USM passphrases must be at
least 8 bytes long (RFC3414 §11.2)*

*                at org.snmp4j.security.UsmUser.<init>(UsmUser.java:83)*

Thanks in advance,

Tal
Stefan Sanner | 11 Mar 10:48 2014
Picon

set a tablerow


Hello everyone,

I have written a similar question around 2 weeks ago, but I couldn't make any progress.

I still try to add and modify rows in a table wich don't support the usage of TableUltils.createRow().

I looked for an example on how to add a row with snmp4j without using this function, but I couldn't find one.

Does anyone has an example on how to add a row?

I tried to code a low level API solution on the basis of http://www.webnms.com/snmp/help/snmpapi/snmpv3/table_handling/snmptables_addrow.html#Low

01> SNMPClient snmp = new SNMPClient("udp:"+ ip +"/161");
02>
03> VariableBinding[] bindings={new VariableBinding(new OID( WLAN_MAC_ACL + ".1." +
String.valueOf(rowCount)),new OctetString(mac)),
04>			        new VariableBinding(new OID( WLAN_MAC_ACL + ".2." + String.valueOf(rowCount)),new Integer32(200000)),
05>			        new VariableBinding(new OID( WLAN_MAC_ACL + ".3." + String.valueOf(rowCount)),new
Integer32(1))}; 
06>
07> snmp.getUSM().addUser(new OctetString(AccessName), new UsmUser(new
OctetString(AccessName),AuthMD5.ID, new OctetString(AccessPassword),PrivDES.ID, new OctetString(AccessPassword)));
08>		
09> ScopedPDU pdu = new ScopedPDU();
10> pdu.setType(ScopedPDU.SET);
11> for(int i = 0; i < Binding.length;i++)
12>	pdu.add(Binding[i]);	
13>
14> ResponseEvent response = snmp.send(pdu,  getUserTarget(AccessName));
(Continue reading)


Gmane