FAQs - SNMP Agent Simulator

 



 

Traps

  1. Why do you associate traps with a variable?

  2. Is there any way to "copy" Trap simulation entries? For all trap simulations I'm working on, they include 15 varbind entries and I was hoping there is a way to copy those such that I don't need to enter them for each trap ?

  3. How does the trap configuration table get populated?

  4. Is it possible to send traps by setting "fake" ip address for the traps ?

  5. I want to create a lot of identical agents with the same set of traps. Is there any way to facilitate this work?

  6. How do I send the current value of sysUpTime with a trap?

  7. Is there any way of setting up more than one agent to send traps at any one time?

1. Why do you associate traps with a variable?

 

In the case of Request and Threshold based Traps, the traps will be triggered based on the SNMP request on a OID. For this reason, we associate the trap to a OID on which the SNMP request will be done to trigger the trap.

Questions

 

2. Is there any way to "copy" Trap simulation entries? For all trap simulations I'm working on, they include 15 varbind entries and I was hoping there is a way to copy those such that I don't need to enter them for each trap ?

 

Copying the same varbinds for different traps, is currently not supported.

 

Questions

 

3. How does the trap configuration table get populated?

 

The MIBs will have the trap variables defined in it. The trap variable will contain one or more varbinding OIDs associated with it. When the MIB is simulated , Request Based  traps will be generated keeping each varbinding OID as associated variable. If the trap variable has three varbinding oid, three traps will be simulated for that trap variable in the trap table.

 

Questions

 

4. Is it possible to send traps by setting "fake" ip address for the traps ?

 

By default, the traps will be sent with the IP Address of the system from which the traps are generated. The SNMP Agent      Simulator provides you the option to configure the IP address or host name (fake IP Address) , with which the traps are to be sent. To simulate a 'fake' IP Address, all you need to do is configure the 'fake' IP Address using Settings --> Global Properties Menu option. Specify the 'fake' IP Address in "From IP Address".

     

For more information, refer the help documentation section : Simulating an SNMP Agent --> Configuring Traps .

 

Questions

 

5. I want to create a lot of identical agents with the same set of traps. Is there any way to facilitate this work?

       

The steps below will help you to create same set of traps for all agents :

Now you will have the set of nodes in the network with same set of traps configur

 

6. How do I send the current value of sysUpTime with a trap?

 

While configuring trap varbinds, you can configure the varbind value as sysUpTime.  Refer to "Configuring Traps -> Adding Variable bindings"

 

7. Is there any way of setting up more than one agent to send traps at any one time?

 

You can send traps from multiple agents at the same time by configuring behavior scripts. The javadocs of the script APIs are available in <SimulatorHome>/examples/javadocs directory. The sendTrap() can be used to send traps from multiple agents with the specified ipaddress and port number.

 

 

Behavior Simulation

  1. I have defined the script file within the behavior configuration. How can I check if the script is started ?

  2. Do I need to define a condition and an action for my script? Is it obligatory ?

  3. My objective is to have the values increase in a certain rate for every pre defined interval. How do I do this ?

  4. Is it possible to import JPython scripts into another JPython script and use the "Interface Class ScriptInterface ?

  5. Can I use the java.lang.Runtime class to execute the system command in the Jython scripts with Simulator ?

  6. Agent Simulator can execute Jython scripts when it receive the request. Can it execute the tftp command in the Jython scripts when it receive the SNMP Set request?

  7. Do you provide any java interface in the simulator where I can plugin my java code ?

  8. Is it possible to invoke the script API methods independently, i.e not from the behavior Simulation?

Top

1. I have defined the script file within the behavior configuration. How can I check if the script is started ?

 

All the debug prints are redirected to the snmpagentsimulator.out and err files. When the script executes, you can confirm it with the following debug print in the snmpagentsimulator.out file in the /logs directory.

 

"Debug Code at Py Wrap executeScripts 77

The script is executed using the py Object with id 0"

 

You can also put print statements inside the Script files.

 

Questions

 

2. Do I need to define a condition and an action for my script? Is it obligatory ?

 

The conditions and actions are defined to have a clear picture of what each and every function of the jython script is intended for. This is followed in the simulator generated script files. It is not mandatory to follow this procedure in the user defined scripts. If there are no conditions and actions, then no action will take place, can be added.

 

Questions

 

3. My objective is to have the values increase in a certain rate for every pre-defined interval. How do I do this?

 

You can use scripting to achieve your objective. That is, you can configure a timer-based script which will execute with some predefined time interval (say for example, every 10 secs).  Now inside the script you can use the following script API to achieve your objective : getNodeValue(),  updateValue().

 

The getNodeValue() will get the corresponding node's value and using updateValue(),  you can update a new value to that node.  Now this script will be executed for every 10 seconds. Hence you will be able to increase your value at a certain rate for every predefined interval.

 

For more information on Scripting, please follow the below link in the help documentation : Simulating an SNMP Agent --> Simulating Behavior in devices.

 

Questions

 

4. Is it possible to import JPython scripts into another JPython script and use the "Interface Class ScriptInterface ?

 

It is possible to import JPython scripts into another JPython script. For example, assume you have written a JPython script, namely Example1.py, with some methods namely method1(), method2().

 

Now If you want to call these methods from some other JPython script namely, Example2.py , then you have to import the methods of the Example1.py file, in Example2.py file. The following line will import the methods used in the Example1.py.    from Example1 import method1, method2 .

 

To import all the methods in the Example1.py, from Example1 import *. But it is not possible to execute such scripts from the Simulator.

Questions

 

5. Can I use the java.lang.Runtime class to execute the system command in the Jython scripts with Simulator ?

 

Yes,  we can use Runtime class to execute System commands in Jython scripts. The following code snippet first imports the Runtime Object and then executes the command.

 

          from java.lang import Runtime

          runtime=Runtime.getRuntime()

          runtime.exec("")

Questions

 

6. Agent Simulator can execute Jython scripts when it receive the request. Can it execute the tftp command in the Jython scripts when it receive the SNMP Set request?

 

Any type of java API including the Runtime class can be imported and executed inside the jython scripts. If your requirement is to execute a command without expecting the execution status of the command, then you can use the Runtime to execute the Operating systems Tftp functions. If you have java based Tftp implementations then you can use those APIs to execute Tftp commands.

 Questions

 

7. Do you provide any java interface in the simulator where I can plugin my java code ?

 

The jython script integrated with the Simulation Toolkit has the capability to import any java class file into the script. So any java file can be interfaced to the Simulator through the jython scripts.

     Questions

 

8. Is it possible to invoke the script API methods independently, i.e not from the behavior Simulation?

 

All the java objects used in the processing of the script API Methods are created inside the Simulators. So it is not possible to invoke the script API without the Simulator Running.

 

Questions

 

 

1. In the Network Design Tool, if I set up a network with three virtual devices, does all of them has to be controlled by only one JPython script? Or can I use different scripts to control each virtual device?

 

Network Design Tool has both the features. A single script can be configured for all the devices or separate scripts can be configured for each device. Refer to the section Configuring Devices in the Network and Bulk Addition of Scripts, to learn more.

 

 

Table Configuration

  1. How do I configure values in the Table from the Agent Simulator UI ?

  2. I am trying to populate some SNMP tables with sample data. I realize that the simulator will create some default data for tables, but it only creates one row. Can rows be created using Agent Simulator in tables that do not have 'row status' or are 'non-accessible'?

Top

1. How do I configure values in the MIB Table from the Agent Simulator UI ?

 

If you want to configure values in a table, please follow the below procedure :

 

          1) Select the Table Module (for example, IfTable).

          2) On the right side, you will be able to see a button "Configure Table".

          3) Clicking on that will help you in simulating values for all the nodes in that table.

 

For more information on populating/simulating values in tables, refer to Populating the SNMP table.

 

Questions

 

 

 

3. I am trying to populate some SNMP tables with sample data. I realize that the simulator will create some default data for tables, but it only creates one row. Can rows be created using Agent Simulator in tables that do not have 'row status' or are 'non-accessible'?

 

You can add rows in the Agent Simulator for tables with or without "row status" option. As specified in the documentation, adding, modifying or deleting rows in the table can be done using the "Configure Table" button . This button will be enabled          only when you have simulated values for the MIB and when the Table Node is selected in the MIB.    

 

Questions

      

 

SNMPv3

  1. What are the security levels of SNMPv3 ?

  2. How to simulate a V3 agent ?  

  3. What are the third party packages available  that can be used to download and test the v3agent with privacy support?

  4. I have simulated and started a SNMPv3 agent.  Now, I want to add a new user and provide them views for the MIBs that I have in the agent.  What do I do ?

  5. I created a new V3agent.ser file. But I was unable to see all the users configured ?

  6. What should I set in the "Engine Id" of the AgentSimulator and "ContextEngineID" of the MibBrowser for communicating with the v3 agent?

Top

 

1. What are the security levels of SNMPv3 ?

 

SNMPv3 provides the following three levels of security:

A request can be made on behalf of a user with any one of the above security levels.

 

Questions

2. How to simulate a V3 agent?

 

To simulate a V3 agent please refer the section Simulating a v3 Agent

 

Trouble shooting :

  1. Unable to Encode PDU : You will get this error if you had not set the privacy jars in the classpath. Please check all the privacy jar settings.

  2. Time Sync Error : You will get this error if when you add entries from the MIB Browser. If you had made any mistakes in the entries. Once of the connection is refused. You have to stop and start the agent and also delete the entry from the MIB Browser and add it again.

  3. General Failure : This is a common error . When you forget to provide the Context name or provide a wrong entry.

Questions

 

3. What are the third party packages available that can be used to download and test the v3agent with privacy support ?

 

Please refer the topic, Privacy Support to know about the third party packages that can be used to provide privacy support.

 

Questions

 

4. I have simulated and started a SNMP v3 agent.  Now, I want to add a new user and provide them views for the MIBs that I have in the agent.  What do I do?

 

To add a new user to the v3 agent, you have to configure the new user information in the USM and VACM tables. The SNMPv3 Config tool bundled with the product is used to add new entries to the USM and VACM Tables. Please refer the section Simulating a v3 Agent to know more.

 

Questions

 

5. I created a new V3agent.ser file.  But I was unable to see all the users configured?

 

When the SNMPV3 agent is started it reads the snmpv3.ser file. All the changes and modifications should be saved to this file. Only then you will be able to view the changes.

 

Questions

 

6. What should I set in the "Engine Id" of the AgentSimulator and "ContextEngineID" of the MibBrowser for communicating with the v3 agent?

 

Engine ID is nothing but a unique ID for the v3 agent. When you are adding a user to the configuration table in MibBrowser then the first request will be sent for discovery packet i.e if the agent is running in the specified port then the agent response by filling the engine ID. Then there after the communication between the browser and the v3 agent will take place with reference to the EngineID.

 

So there is no relation between the Engine ID specified in the Agent Simulator and the Context Engine ID specified in the

MIbBrowser.

 

Questions

 

General

  1. I have all the configurations in SNMP Agent Simulator as database format in my local machine, how do I transfer those configuration to the other machines so that the agent simulator on those  machine can also load my configuration?

  2. Can I to simulate an agent running in a router with many ports? If I can, how do I do it?

  3. What is the maximum SNMP packet size that the simulator supports?

  4. Our devices have a lot of counters which is represented in MIB as read-only parameters. How can I simulate the multiple changes of different counters in simulated agent?

  5. Is it possible to configure an SNMP agent to send garbled/invalid responses? Again, the intent is to test the SNMP manager's robustness in the face of receiving bad packets.

  6. Is it possible to configure one or more of the SNMP agents so that they sometimes fail to respond to queries? ( I want to test my SNMP manager's retry mechanism; so being able to predictably force retries to occur by having the agent drop every other packet, for instance, would be most useful).

  7. Is it possible to simulate error conditions using SNMP Agent Simulator ?

Top

 

1. I have all the configurations in SNMP Agent Simulator as database format in my local machine, how do I transfer those configuration to the other machines so that the agent  simulator on those  machine can also load my configuration?

 

All the tables corresponding to the configuration will be stored under data directory present inside "\mysql\ " directory. You can zip all the files corresponding to the configurations ( the directory name will be the data base name you had given while saving the configuration ) and transfer those files to the remote host wherever you want to share your configurations.

 

Questions

2  Can I to simulate an agent running in a router with many ports? If I can, how do I do it?

 

Yes, you can simulate an agent running in a Router. Load the RFC1213 mib and the corresponding Router Mibs in the Agent Simulator. The simulator simulates the default values for all the nodes in the loaded mibs.

 

For the Router agent, the following values has to be configured in the loaded RFC1213 mib:

 

- The interfaces table (ifTable) should have at least two rows. By default the 'ifTable' will have only one row. So you have to add rows in the 'ifTable'.

- The 'ipForwarding' scalar node under the 'ip' group should have value as 1.

 

Start the Agent Simulator. Now the simulator will act as a router agent. You can query this agent from your manager application.

 

Questions

          

3. What is the maximum SNMP packet size that the simulator supports?

 

The maximum SNMP packet size supported in SNMP Agent Simulator is 64 KB and in Network Designer is 20000 bytes.

 

Questions

 

4. Our devices have a lot of counters which is represented in MIB as read-only parameters. How can I simulate the multiple changes of different counters in simulated agent?

 

You can configure simulation types for any type of node. The simulation type that are supported are  : Constant, Linear, Wave, Sine Wave, Exponential, Random. For example, if you configure random as the simulation type for your counter node, then the response that you get for that node will be random.

 

For more information on configuring simulation types, refer to Configuring MIB Values. Other than the simulation type, we also support scripting. Scripting will be very useful in cases  where you want to make the agents behave according to your known needs. For more information on scripting, refer to Configuring behavior.

Questions

 

 

5. Is it possible to configure an SNMP agent to send garbled/invalid responses? Again, the intent is to test the SNMP manager's robustness in the face of receiving bad packets.

 

Yes,  it is possible to configure an SNMP agent to send garbled/invalid responses. The SNMP Agent simulator supports customizing the SNMP request/response PDU by accessing and modifying the PDU content in the buffer, before sending it to the socket layer. By customizing the SNMP PDU to send garbled/invalid responses, you can test the SNMP managers robustness in the event of receiving bad packets.

 

Refer to Customizing the SNMP PDU, to know more.

Questions

 

 

6. Is it possible to configure one or more of the SNMP agents so that they sometimes fail to respond to queries? ( I want to test my SNMP manager's retry mechanism; so being able to predictably force retries to occur by having the agent drop every other packet, for instance, would be most useful).

         

We do not have a direct implementation of dropping request packets received from the manager. But this scenario can be very well achieved by creating a delay in response using the behavior simulation.

 

For example, if we want to drop alternative packet from the manager, we can delay every alternative request from the manager more than the retry time or the time out time so that the manager sends the second packet before it receives the response for the request.

 

Questions

 

7.  Is it possible to simulate error conditions using SNMP Agent Simulator ?

 

We are supporting 'Error Simulation' , by which you can send errors for the requests received. The errors can be thrown for all the three type of requests Get, GetNext and Set. Refer to, Configuring Error Conditions to learn more.

 

Questions

 



Copyright © 1996-2006, AdventNet Inc. All Rights Reserved.