xian snmp device simulator v5 - jalasoft · 2014-10-15 · xian snmp device simulator v5 user guide...
TRANSCRIPT
Jalasoft
Xian SNMP Device Simulator v5
User Guide
1
Table of Contents
Xian SNMP Device Simulator V5 User Guide
Installation………………………………………………………………………….…. 3
Introduction…………………………………………………………………… 3
Architecture…………………………………………………………………… 3
System Requirements…………………………………………………………. 5
Default Installation……………………………………………………………. 5
Distributed Installation………………………………………………………... 9
Modify Installation……………………………………………………………. 17
Uninstall………………………………………………………………………. 19
Simulator Console…………………………………………………………………….. 22
Adding and Removing Agents……………………………………………….. 22
Basic Functionality – Simulating Network Devices………………………….. 24
Dynamic Simulation………………………………………………………….. 32
Historical Simulation…………………………………………………………. 35
Advanced Features …………………………………………………………… 38
IP Address Manager……………………………………………………38
Common Problems……………………………………………. 42
Device Recorder………………………………………………………. 43
Saving and Loading Simulation Configurations…………………...…. 49
Licensing……………………………………………………………………………….53
License Manager……………………………………………………………….53
License Request………………………………………………………………..54
Add License……………………………………………………………………57
2
Remove License……………………………………………………………...….58
Command Line…………………………………………………………………………..59
Load……………………………………………………………………………...59
Device Operations.…………...…………………………….…………….………61
Save Projects.………………………………………………………………….....65
Running Commands from Scripts……………………………………….……….66
3
Installation Procedure for the
Jalasoft Xian SNMP Device Simulator V5
Introduction
The Jalasoft SNMP Device Simulator V5 is an application that gives you the power to
dynamically simulate any SNMP device you need. The product was developed with the
intent of being very intuitive and hence easy to install and even easier to use and
understand. This guide will provide you with step by step instructions to facilitate the
installation and startup of the new Device Simulator.
Architecture
The Xian SNMP Device Simulator V5 is comprised of the following components that
work together to provide an array of features which make up the SNMP Simulator
Service.
SNMP Engine
Simulation Mode
Normal
Dynamic
Historical
Device Recorder
SNMP Requests
SNMP Client
SNMP Gets
SNMP Device
CLI Console
Desktop Console
IP Manager
Xian SNMP Device Simulator Service
TCP/Http:9090
TCP:8383
Fig 1.0
The Xian SNMP Device Simulator Service employs an SNMP engine that is in charge of
handling all the simulation processes required to respond to an SNMP request; These
requests are made by an SNMP client, by default through port TCP 161. The service runs
a simulation in three different modes (Normal, Dynamic and Historical). The
4
configurations are made through the Simulator Console or via Command Line and by
default, the comunication goes through http channel using port 9090 and back from the
service usign TCP port 8383.
Simulation Modes
Through the simulation mode, the Device Simulator provides a set of plugins and rules
that are necessary in order to run a Network device.There are three types of simulations
that can be performed:
Normal Simulation allows the user to perform a representation of an SNMP
network device with information that follows a static behavior throughout the
entire simulation period. This information is based upon specific values related to
the OIDs stored in a dump file which correspond to a specific network device.
Dynamic Simulation mode works similar to Normal simulation but it provides
more realistic data. The SNMP Device simulator will perform simulations through
a set of formulas and statistical operations to generate dynamic values over a
period of time for the desired virtual devices.
Historical Simulation mode executes simulations from previously recorded
dynamic simulation files. The Device Simulator will use a File Manager to load
and handle historical records which will serve to simulate a device.
IP Manager handles the computer’s network card IP addresses, which the simulator will
assign to the devices that it will run. This module allows the user to insert one IP or a
range of IP addresses to the computer where the simulation service is located.
Device Recorder module records the behavior of a network device by performing SNMP
walks on it, which are later on stored into a file. This module records a device and adds it
to the list of available devices to simulate; Once recording is complete, an XML file is
created containing all data retireved from the network device. This file is placed into the
folder “Recorded_Devices”, located in the installation path. In order to make use of this
feature, it is imperative that there is direct conectivity between the simulator and the
device to be recorded.
Simulator Console there are two ways to interact with the Simulator to perform
necessary operations to begin simulating or to access all the new available features. The
first way of interaction is the Simulator console, which is a graphic interface that makes it
possible to connect to the simulator agent(s). The other is the Command Line Interface or
CLI Console, through which you can execute a variety of operations from the Windows
command prompt. Both of these alternatives communicate with the agent service through
port 9090 and back from the service usign TCP port 8383.
SNMP Client is any application hosted on an external server on the network that makes
snmp requests to a simulated device, which is managed by the Xian SNMP Agent. The
comunication to an SNMP client is made through TCP port 161.
5
SNMP Device is any physical device located on the network from which the Simulator
can make a recording. This information is stored on an xml file as a new template to be
used for subsequent simulations. The comunication to an SNMP device is made through
TCP port 161.
System Requirements
In order to meet the system requirements needed to install the Xian SNMP Device
Simulator, the aspects below must be taken into account.
- One of the following Operating systems
o Windows Server 2008 R2 Standard
o Windows Server 2008 R2 Enterprise
o Windows Server 2008 Standard
o Windows Server 2008 Enterprise
o Windows 8.1
o Windows 8.1 Enterprise
o Windows 7 Professional
o Windows 7 Enterprise
o Windows Vista Home Premium
o Windows Vista Enterprise
o Windows Vista Ultimate
- Dot Net frameworks 4.0 installed.
- SNMP port available
- Static IP addresses (assigned to the Simulator’s service and also for the
devices that will be simulated)
Default installation:
To install the Xian SNMP Device Simulator run the following steps:
1. Run the “Setup.exe” file to begin the installation (this is located in the root of the
installation kit).
2. The installation wizard will be displayed, click Next on the Welcome window.
6
Fig 1.1
3. The Xian SNMP Device Simulator EULA will be displayed, carefully review the
information and check the license agreement checkbox to agree with the terms
and conditions and click on Next.
Fig 1.2
4. The following screen in the wizard displays the list of features that will be
installed, select to install all the features and click on Next. In this window you
can also specify the location in which the installation files will be placed; by
default, the path is the one displayed on the figure below.
7
Fig 1.3
5. Once the features that will be installed are selected, the Agent Service
Parameters window is displayed. Choose the IP Address that will be used by the
agent. When you login, either from the Simulator Command line or the Simulator
Console, you will need to specify this IP address in order to connect to the Agent
Service. You will additionally need to specify the port that will be used to
communicate with, and then click Next. Please note that the IP address has to be
static and it has to have direct connectivity to real devices in case you need to
record them.
Fig 1.4
8
6. The Ready to Install window is now displayed. Click Install to confirm that you
are ready to start the installation with the configurations you specified.
Fig 1.5
7. Once the installation process has completed, click Finish.
Fig 1.6
9
Distributed installation:
The Simulator components can be installed independently in different servers or all in one
single box. To deploy a distributed installation you can setup each component separately
as described below.
Install the Simulator Agent Service only
1. Run the “Setup.exe” file to begin the installation (this is located in the root of the
installation kit).
2. The installation wizard will be displayed, click Next on the Welcome window.
Fig 1.8
3. The Xian SNMP Device Simulator EULA will be displayed, carefully review the
information and check the license agreement checkbox to agree with the terms
and conditions and then click Next.
Fig 1.9
10
4. The following screen in the wizard displays the list of features that can be
installed, select to install the Simulator Agent Service only and click on Next.
Fig 1.10
5. On the Agent Service Parameters window, choose the IP Address which will be
used by the agent. Specify the port number to communicate with the Simulator
Console and click Next. Please note that this IP address has to be static and has to
have direct connectivity to real devices in case you need to record them.
Fig 1.11
11
6. The Ready to Install window is now displayed. To confirm that you are ready to
start your installation with the configurations you specified, click Install.
Fig 1.12
7. To complete the installation wizard click Finish.
Fig 1.13
12
Install the Simulator Console only
1. Run the “Setup.exe” file to begin the installation (this is located in the root of the
installation kit).
2. The installation wizard will be displayed, click Next on the Welcome window.
Fig 1.14
3. The Xian SNMP Device Simulator EULA will be displayed, carefully review the
information, check the license agreement checkbox to agree with the terms and
conditions and then click Next.
Fig 1.15
13
4. The following screen in the wizard displays the list of features that can be
installed, select to install only the Simulator Console and click on Next.
Fig. 1.16
5. The Ready to Install window is now displayed. Click Install to confirm that you
are ready to start the installation with the configurations you specified.
Fig. 1.17
14
6. To complete the installation click on Finish
Fig. 1.18
Install the Simulator Command Line only
1. Run the “Setup.exe” file to begin the installation (this is located in the root of the
installation kit).
2. The installation wizard will be displayed, click Next on the Welcome window.
Fig. 1.19
15
3. The Xian SNMP Device Simulator EULA will be displayed, carefully review the
information and check the license agreement checkbox to agree with the terms
and condidtions and then click Next.
Fig. 1.20
4. The following screen in the wizard displays the list of features that can be
installed, select to install only the Simulator Command Line feature and click on
Next.
Fig. 1.21
16
5. The Ready to Install window is now displayed. Click Install to confirm that you
are ready to start your installation with the configurations you specified.
Fig. 1.22
5. To complete the installation click on Finish
Fig. 1.23
17
Modify Installation
The Xian SNMP Device Simulator allows you to modify your installation by adding or
removing components from your environment. To do this, follow the steps described
below:
1. Run the “Setup.exe” file on the machine where the Simulator is installed. This
will initiate the installation wizard. Click Next on the welcome window.
Fig. 1.24
2. On the window displayed, click on the button Modify to update the features
installed.
Fig. 1.25
18
3. The Features window will be displayed; update the installation by adding or
removing the features available and then click Next.
Fig. 1.26
4. If you have chosen to add the Simulator Agent Service, the Agent service
parameters window will be displayed; set proper values and click Next.
5. Click on the “Modify” button to apply the changes.
Fig. 1.27
19
6. To complete the installation click on Finish
Fig. 1.28
Remove Installation To uninstall the Xian SNMP Device Simulator run the following steps:
1. Run the “Setup.exe” file on the machine where Xian SNMP Device Simulator is
installed. This will initiate the installation wizard. Click on Next.
Fig. 1.29
20
2. The Modify or Remove window is displayed; click on the “Remove” button.
Fig. 1.30
3. To confirm the operation, the window Ready to remove the installed features
will be displayed. Click on Remove to uninstall the Simulator.
Fig.1.31
21
4. Once the Uninstallation is completed, click on Finish to close the wizard.
Fig. 1.32
22
Chapter 2
Xian SNMP Device Simulator console
The Xian SNMP Device Simulator provides you with a graphic interface as a means of
interaction with the agent’s service, which is responsible for performing all simulation tasks. To
start the Simulator console on your Windows machine go to Start > All Programs > Jalasoft >
Xian SNMP Device Simulator V5 Console. Adding and removing agents
Before you can start simulating any SNMP device, you will first need to connect to a
simulator agent which is in charge of handling the devices. To achieve this, please follow the
instructions below.
1. Open the Xian SNMP Device Simulator v5 Console. Initially, the console will be
displayed as shown in figure 2.1
Fig. 2.1
2. From the menu bar, select File > Add Agent.
3. In the Add Agent window displayed, specify the agent’s IP address and the Port; the
default port number should be 9090. However, if you entered a different port number
during the installation, you must choose that one.
23
Fig. 2.2
4. Click Add; the console will connect to the agent, which will be displayed in the tree
view.
Fig 2.3
5. Repeat this same process to add as many agents as you’d like.
In order to remove an agent from the simulator’s console, do the following.
1. In the Simulator’s console, go to the tree view and select the Agent Manager node,
then go to the menu bar and select File > Remove Agent. You can also find this
option in the Agent Manager Context menu.
24
2. In the Remove Agent window, check the agent(s) that you want to remove from the
Simulator Console (Fig).
Fig. 2.4
3. Click Remove.
You can also perform these two operations (add/remove agents) from the tree view pane
through the context menu of each individual agent.
Basic Functionality - Simulating Network Devices
Normal Simulation
The Xian SNMP Device Simulator allows you to simulate any SNMP based device that
you may require to test in your environment. With this intent, it provides a set of device
models from which you can start. Follow the steps below to simulate a device from
scratch.
1. Open the Simulator Console
2. On the menu bar, select file > Simulate Device(s)
3. The Simulate Device wizard is displayed, on the Device tab (Fig. 2.5), select the
IP of the agent that will run your device, and then choose the device that you’d
like to simulate from the device model list; please note the Add/Remove buttons
that are displayed in this tab next to the list of available devices through which
you can add or remove devices to and from the list, giving you the option to
include your own list of devices to simulate (fig. 2.6). Click Next to continue.
25
Fig 2.5
26
Fig. 2.6
4. The following step directs you to the IP Address tab. From the available list,
select the IP or set of IP addresses that you want to assign to simulate each
device(s). The number of devices created will depend on the number of IPs you
select in this tab. You will also find the Refresh and IP Manager buttons next to
the list of IP addresses; the refresh button will display any new IP address that is
not being shown on the list. The IP Manager feature allows you to add new IPs to
the available list. This subject will be covered in more detail on the Advanced
Features section; Click Next to continue.
27
Fig 2.7
5. In the SNMP Settings tab, set the SNMP version that the device will use. The
Simulator Console provides support for SNMP Version 1, SNMP Version 2 and
SNMP Version 3. For SNMP versions 1 and 2, establish the community string that
will be used (fig.2.8), then click Next. If you select SNMP Version 3, choose the
security authentication type, the authentication credentials with the protocol
(MD5/SHA) and in the Privacy section, set the password and protocol type (Fig.
2.9), then click Next.
28
Fig. 2.8
29
Fig. 2.9
30
6. The Simulation Mode tab allows you to specify the type of simulation that you
want the agent to run for the new device(s). For this example, select to run a
Normal Simulation which will give a static behavior on the outputs of the
simulated device. You are now done with your settings, click Finish.
Fig. 2.10
Immediately after you complete the configuration wizard, your device(s) will be up
and running and you will be able to send requests to them from an SNMP client
application. The device(s) will be listed in the main pane and the details of each
selected device will be displayed in the Properties pane, located on the right side of
the Simulator’s Cons
31
Fig. 2.11
32
Dynamic Simulation
Dynamic simulation is a type of simulation based on probabilistic formulas applied to the
values contained in an SNMP dump file used to simulate a device. This simulation mode
provides the user with much more realistic data when running a device. To enable this
feature, perform the following actions:
a) To create a new device with Dynamic simulation
1. Follow the same procedure as with the Normal Simulation mode (up to step 5)
to create a new device.
2. In the Simulation Mode tab, select the Dynamic Simulation option (Fig
2.13). The difference between normal and dynamic simulation, is that the later
will provide more realistic data based on statistical formulas applied on the
OIDs contained in the device template file. When selected, the option to
“collect logs” will store all the information simulated for the device. This
process will be explained in more detail in the section Historical Simulation.
Click Finish to complete the wizard. Once the device is running you can
double check its status in the device’s properties (fig 2.14).
Fig 2.12
33
Fig 2.13
b) To enable Dynamic simulation on an existent device:
1. In the Device Simulator go to the tree view pane, expand the Agent Manage
node.
2. Select the agent on which the device is running.
3. Go to the main pane and right click on the device you want to update.
4. From the context menu, select Simulation Mode > Dynamic.
Fig. 2.14
34
The Xian SNMP Device Simulator gives you the possibility to set various parameters to
help you manage the dynamic data that will be generated. You can create these settings by
performing the following actions:
1. Go to the installation path where the simulator is located. (e.g. C:\Program
Files\Jalasoft\Xian SNMP Device Simulator V5\ )
2. Open the file “Jalasoft.DeviceSimulator.Snmp.Simulation.Config.Xml”
3. The entries in the section below (DynamicFunctions) represent the syntax
of the supported OIDs. At this point you can set the “Value” field with a
desired value which represents the probabilistic weight for each type of
entry expressed in percentages:
<Section name="DynamicFunctions">
<Entry name="TIMETICKS"
value="Sequential,15;Incremental,70;Resettable,15"/>
<Entry name="INTEGER"
value="Sequential,10;Constant,80;Performance,10"/>
<Entry name="UINTEGER"
value="Sequential,9;Constant,21;Incremental,23;Decremental,8;Perform
ance,38;Resettable,1"/>
<Entry name="GAUGE" value="Sequential,5;Performance,95"/>
<Entry name="COUNTER"
value="Sequential,10;Incremental,88;Resettable,2"/>
<Entry name="COUNTER64"
value="Sequential,10;Incremental,88;Resettable,2"/>
<Entry name="OCTETSTRING"
value="Sequential,50;Probabilistic,50"/>
<Entry name="OBJECTIDENTIFIER"
value="Sequential,50;Probabilistic,50"/>
<Entry name="IPADDRESS"
value="Sequential,50;Probabilistic,50"/>
<Entry name="OPAQUE" value="Sequential,50;Probabilistic,50"/>
<Entry name="NULL" value="Sequential,50;Probabilistic,50"/>
</Section>
4. Save changes and close the file.
5. Restart the Simulator Service in order to apply changes.
To better understand this concept, let’s take one of the entries from the
DynamicFunctions section from above as an example. Let’s take into account the entry
named “COUNTER”.
<Entry name="COUNTER"
value="Sequential,10;Incremental,88;Resettable,2"/>
35
For this specific entry, we understand that during the simulation, the probability for the
next value to be generated sequentially is 10%; additionally, we have an 88% probability
that the value will be greater than the previous one generated and 2% probability that this
value will be reset.
Historical Simulation
Historical simulation is very useful when it comes to reproducing the behavior of a device
in a specific period of time. For instance, if you have configured a Dynamic simulation
and are collecting data with an SNMP client making specific requests through an
automated script, and later you find a problem with the device, your can use the logs
collected to reproduce the exact same behavior to find out the root cause of the problem.
Historical simulation runs a device based on logs stored from a previous Dynamic
simulation.
Please note that running a simulation with historical data will only allow the simulator to
respond to SNMP request for the specific OIDs that were logged during the data
collection. If you attempt to make any request for an OID that was not registered in the
logs, the simulator will return a null value since no data was registered for that specific
OID.
Historical data files are created on a daily basis for each device that is running the
simulation mode Dynamic Collecting Logs; by default, these files are kept on the system
for 7 days before the agent removes them. If you need to increase this value, you can
change this configuration by doing the following:
1. Go to the installation path where the simulator is located. (e.g. C:\Program
Files\Jalasoft\Xian SNMP Device Simulator V5\ )
2. Open the file “Jalasoft.DeviceSimulator.Snmp.Simulation.Config.Xml”
3. Update the “Value” field for “HistoricalLifetimeDays” with the desired
number of days on the following entry:
<Section name="HistoricalDataLog">
.
.
<Entry name="HistoricalLifetimeDays" value="7"/>
4. Save changes and close the file.
5. Restart the Simulator Service in order to apply changes.
As stated above, in order to start the historical simulation mode the Xian SNMP Device
Simulator will require all available logs from a previous simulation running dynamically.
In order to achieve this, the following steps are required:
36
1. Follow the same procedure as with the Dynamic Simulation mode (up to step
5) to create a new device.
2. In Simulation Mode tab select the Dynamic Simulation option as well as the
option to collect logs; this checkbox will enable the collection of data of all the
values generated in response to any request made to the simulated device.
Once this is done, click Finish.
Fig. 2.15
Wait some time for data to be collected. Bear in mind that it is necessary that SNMP
requests are sent to the simulated device. Once enough information is collected, follow
these steps:
1. Right click on the device and change the simulation mode by selecting
“Simulation Mode > Historical Logs” from the context menu.
37
Fig. 2.16
2. Specify the timeframe period of the historical logs to be used for the
simulation; make sure that historical log registries are available for the selected
period and then click ok.
Fig. 2.17
38
Note that if no data is available yet for Historical simulation, the following message will
be displayed:
Fig. 2.18
Once the Historical Simulation starts, the simulator will use the logs that correspond with
the specific time range selected, in order to retrieve data. The output will follow the exact
same order in which SNMP requests were registered.
Advanced Features
IP Address Manager
Every device needs an IP address in order to be identified in the network. The IP Manager
feature allows you to handle the IP addresses that will be assigned for each one of the
devices that you want to simulate. This feature will help you assign local IP addresses to
the server where the simulator is running.
1. From the Simulator Console, go to the Tree view pane and expand the Agent
Manager.
2. Select an agent, expand it and click on IP Manager node.
Fig. 2.19
39
3. On the main pane (top side), click the Add icon to enter new IP addresses.
Fig. 2.20
4. IP Configuration window is displayed; select a network adapter from the ones
available on your local machine.
Fig. 2.21
40
5. You can either select an individual IP or a range of IP addresses to be added. Enter
the IP(s) required.
Fig. 2.22
41
6. Set the Mask that will be used.
Fig 2.23
7. Click Add to apply settings; New IP addresses will be displayed in the main pane.
Fig. 2.24
42
From the windows network adapter settings, you can verify that the new IP(s) were added
to the list of IP addresses and you are now ready to use them to simulate your devices.
Common Problems
Windows will display the following error message when attempting to add an existent IP
address.
Fig. 2.25
The message below will be displayed when invalid entries are entered. For example, an
incomplete IP address or an invalid range of IP address.
Fig. 2.26
Fig. 2.27
When the mask value is empty or has an invalid entry
43
Fig. 2.28
Device Recorder
This feature gets all SNMP information for a certain period of time from a physical device
and stores it in an xml file that later will be used as a template when creating a new
simulations. Device Recorder can store multiple SNMP walks applied to the device so
that the resulting file will have several values per OID, making the simulation based on
the real device more realistic.
1. On the tree view pane, go to Agent Manager, select an agent and expand it.
2. Click on the Device Recorder node.
Fig. 2.29
44
3. In the main pane, click on the (+) button. SNMP Device Recorder window
should be displayed, on Device tab set the IP address of the physical device,
SNMP port to communicate with, number of retries to access the device and
the timeout values; then, click Next.
Fig. 2.30
45
4. In the Security tab, set the SNMP version and establish the community string
or security settings that will be used.
Fig. 2.31
46
5. In the Data Collection tab, specify the file name with which the recording will
be created. This file will be stored in the installation path inside the folder
“Recorded_Devices”; set the number of executions or SNMP walks that the
simulator will run during the recording, specify the value for the elapsed time
between each execution, which is the timeframe that the user must wait before
making the next query to the device. Use the time unit to complement this
information. Finally, set the schedule to begin with the recording, you can
either choose to run it immediately or run it at a specific date and time.
Fig. 2.32
47
6. Set the Schedule to run immediately or at a specific time and then click on
Finish to start the recording. The Simulator Console will display the recording
device in the main pain where you can see the progress and the status of the
recording (fig. 2.33).
Fig. 2.33
Notice that you can start/stop at any time the recording task of a device from the menu bar
located at the top side of the main pane.
48
After the recording has been completed, you will find your new device available for
simulation in the list of device models available when creating a new device for
simulation.
Fig. 2.34
49
Saving and loading simulation configurations
The Xian SNMP Device Simulator allows you to save complete simulation sessions,
giving you the option to load the session back up to continue working on it at a later time.
For example, if we have 5 switches and 3 Routers simulated, and this is a scenario that
will be used in future tests, we can just save the set of running devices and then load them
later. In order to do this, follow the steps below:
1. From The Simulator’s console, go to the tree view pane. Under Agent Manager
right click on the specific agent node from which you want to save the project.
Fig. 2.35
2. In the context menu displayed, click on Save Simulation.
50
3. Select the destination path where the file will be saved, enter a name and click on
Save.
Fig. 2.36
All the devices that are handled by the agent will be saved into an XML file along with
each devices’ configuration. Also, a folder with the same name as the file with the suffix
“_Devices” will be created. This folder includes the device templates corresponding to the
devices that were running at the time when the project was saved.
Whenever you’d like to load your project again, you just need to follow the steps below:
1. From the Simulator’s console, go to tree view pane and under Agent Manager
right click on the agent node on which you want to load the project.
51
2. In the context menu displayed, click on Load Simulation.
Fig. 2.37
3. Search for the path where the file is located and click Open.
4. If you have some devices already created in your Simulator Console, you can
either Merge or Replace them with the one that will be loaded. By selecting
Merge, the simulator will keep the existent devices and add the ones that are being
loaded; on the other hand, if you choose to replace, all existent devices will be
removed from the agent and replaced by the devices contained in the saved file.
Fig. 2.38
52
Once the operation is complete, a notification message is displayed with a
summary of the devices added.
Fig. 2.39
53
Licensing
The Xian SNMP Device Simulator includes a free Trial Evaluation License which allows you to
simulate up to 10 devices with no time limit, but with restricted use of the simulator’s features. In
addition, there is also a Full License which enables all the new features in the Device Simulator.
Device Recorder, IP Manager, Dynamic and Historical simulation and the possibility of
simulating a much greater amount of devices are only available in the Full License.
There is a close nit relationship between the license and the machine in which the Xian SNMP
Device Simulator will be running. In order for a license to be generated, the MAC address of the
machine will be required; therefore, the license generated will only work for that specific agent
installed in that machine.
License Manager
The License Manager allows you to handle the licenses you purchased. It displays basic
information like the status of the license, ID, mac and IP addresses in which the Device Simulator
has been registered. To Access the License Manager follow these steps:
1. Open the Device Simulator Console.
2. Go to the menu bar and click on File.
3. Click on License Manager.
Fig. 3.1
The License Manager gives you the power to perform such operations as requesting, adding and
removing licenses.
54
License Request
In order to request a license follow the steps described below.
1. Open the License Manager. At first instance, the evaluation license should be displayed.
Fig. 3.2
2. Click on the License Request button; in the license request form enter your company
name and select the list of Mac addresses for which you want to request a license. In
figure 3.3 two agents are selected to request a license for each one of them but if you need
to add any additional agent, you can do this by clicking on the Add button.
Fig. 3.3
55
3. Click on the Generate button. Browse for a destination folder and then click on Save.
Fig. 3.4
4. Click OK in the license request confirmation.
Fig. 3.5
5. Go to https://store.jalasoft.com/#/product/1.
56
6. On the web page displayed, enter valid data for all the required fields.
Fig. 3.6
7. Upload the file created in step 4. You will receive a single license per each MAC address
contained in the file.
8. Select a payment method and fill in the required information for the purchase.
Once the operation is complete, you will receive an email from [email protected] to
confirm that the purchase was successfully completed with the requested license file attached.
57
Add license
Once you have acquired a license, you can add it to the Simulator Console by performing the
following steps:
1. Open the License Manager.
2. Click on the Add button.
3. Browse the specific folder containing the license and click open.
Fig. 3.7
4. Close License Manager.
Problems adding/removing a license
Here is a description of some problems that may occur when handling a license.
1. When the license file you are trying to add does not correspond to the proper agent. Since
each license is created exclusively for a specific machine, it will display an error as shown
on fig. 3.8 if it’s used for a different agent.
Fig. 3.8
2. When the license file is corrupt. The same error from above will be displayed.
3. If you try to add a license in your Simulator Console and you have more than one agent
added, the License Manager will display an error like the one above. Even though the
license file may be the correct one, the simulator will try to apply it to all of the agents. In
58
this case, a warning message will be displayed, but after clicking on ok you’ll see that the
license has been added correctly to the corresponding agent.
Fig. 3.9
4. When you select the option to remove a license from a console connected to several
agents, the operation will remove the licenses of all the agents. To avoid this, first remove
the agents that will continue to have a license from that Simulator Console and then
remove the license of the desired agent.
5. After a license is removed from an agent, the agent will use the default evaluation license,
limiting the number of managed devices to 10. The exceeding number of devices will be
disabled from the simulator console.
Fig. 3.10
Delete license
If you have one of the available bundle licenses, you will want to remove the existent evaluation
license you have. To do so, follow the steps described below:
1. Open license manager
2. Select the license to remove
3. Click on the Delete button
4. Click Yes to confirm the delete operation.
59
COMMAND LINE
The Jalasoft Xian SNMP Device Simulator also provides command line support, in addition to
the features provided in version 5.
You can run commands using the executable “jxdevsim.exe” (located in the installation path);
when the Simulator is installed, the PATH is automatically inserted into the environmental
variable of the computer. In order to start using it, you can simply open Windows command
prompt and run the command “jxdevsim.exe”.
Fig. 4.0
Jxdevsim.exe receives a set of parameters that allows the user to perform the operations available
on the Simulator Console through command line. Below you’ll find a brief description of each
command taken as a parameter:
Load. This command allows you to load a device from a template or a dump file.
Help. Displays step by step instructions on how to perform available existent commands.
Device.Allows the user to perform operations upon devices.
Save. Allows you to save all running devices and settings into a project.
Command Load.
This command loads a saved project that contains all devices that were created and simulated.
Syntax
Jxdevsim Load [-a] [-p] [-m]
Parameters
-a: Agent’s IP address where the Simulator service is installed, this parameter
receives the server IP address followed by the port number.
60
-p: Specifies the file from which the project will be loaded. This should contain
the path and file name of the project where the devices and dumps are located.
-m: Specify whether the devices will be merged with the existent ones or not. If
not specified, all devices will be replaced with the ones present in the import file.
Examples
1. Load a device using the agent’s IP address and the path to the file name containing
the project to be loaded and without merging.
C:\>jxdevsim load -a 10.31.80.63:9090 -p "C:\SavedProject.xml"
Merge = NO, Replace = YES
Device(s) deleted: 2
Device(s) added: 2
Device(s) no added: 0
IP(s) created: 0
Dump missing: 0
2. Load a device using the agent’s IP address and the path to the file name containing
the project to load with the option to merge enabled.
C:\>jxdevsim load -a 10.31.80.63:9090 -p "C:\SavedProject.xml" -m
Merge = YES, Replace = NO
Device(s) added: 0
Device(s) no added: 0
IP(s) created: 0
Dump missing: 0
61
Command Help
This command displays step by step instructions on how to perform existent commands.
Syntax
Jxdevsim Help
Parameters
None.
Examples
C:\>jxdevsim help
Jalasoft SNMP device simulator [Version 1.0.304.0]
Copyright (c) 2014 Jalasoft Corporation. All rights reserved.
LOAD To load device(s) and dump(s).
HELP Displays step by step instructions on how to perform available existent
commands.
DEVICE To add, start, stop or remove all devices from an agent.
SAVE To save device(s) and dump(s).
Command Device
This command runs operations upon a given device(s). Only one operation can be passed to the
command at a time.
Syntax
Jxdevsim Device [Add] [Remove] [Start] [Stop] [Show]
Operation
Add Adds a new device to the agent.
Remove Removes a device from the agent.
Start Starts a device that has a stopped status.
Stop Stops a device that is running on the agent.
Show Displays the devices that are being simulated on the agent.
Add a Device
This operation adds a new device to a specific agent. Along with the parameters, you
must specify the IP addresses that will be assigned to the new device.
Syntax
Jxdevsim Device Add [-a] [-f] [-v 1|2] [-c] [-d] <Target IPs>
62
Parameters
-a: IP address of the Agent where the SNMP simulator is installed. This
parameter receives the server IP address followed by the port number.
-f: File name of the dump used for simulating.
-v: Version of the SNMP device to simulate, values[1 or 2].
-c: Community string of the device.
-d: Dynamic simulation. By default, normal simulation is enabled.
Examples
1. Create a 3comSwitch using SNMP version2 with a community string
named “public”
C:\>jxdevsim device add -a 10.31.80.63:9090 -f 3comSwitch.xml -v 2 -c
public 192.168.0.3
Type operation [Add]
Device(s) Success = 1
Note that the file “3comSwitch.xml” and all other device templates are
located in the installation path under the folder “Devices”. The entire path
does not need to be specified.
The agent’s IP address is 10.31.80.63 using the default port 9090 and the
simulated device is created with the IP address 192.168.0.3
2. Create 2 APCUP devices using dynamic simulation.
C:\>jxdevsim device add -a 10.31.80.63:9090 -f APCUPS.xml -v 2 -c
public -d 192.168.0.3 192.168.1.4
Type operation [Add]
Device(s) Success = 2
Remove a Device
This operation removes existing devices from a specific agent. Along with the parameters,
you must specify the IP addresses of the devices that will be removed.
Syntax
Jxdevsim Device Remove [-a] [-all] [-y] <Target IPs>
Parameters
-a: Agent where the SNMP simulator is installed. This parameter receives
the server IP address followed by the port number.
-all: Removes all devices from the agent (Device IP not accepted)
-y: Confirmation acknowledgement. If specified, no confirmation is
requested when removing device(s)
63
Examples
1. Remove a device from an agent by providing the device’s specific IP
address.
C:\>jxdevsim device remove -a 10.31.80.63:9090 192.168.0.3 -y
Type operation [Remove]
Device(s) Success = 1
2. Remove all available devices from a specific Agent.
C:\>jxdevsim device remove -a 10.31.80.63:9090 -all -y
Type operation [Remove]
Device(s) Success = 2
Start a Device
This operation starts devices from a specific agent. Along with the parameters you must
specify the IP addresses of the devices that will be started.
Syntax
Jxdevsim Device Start [-a] [-all] <Target IPs>
Parameters
-a: Agent where the SNMP simulator is installed. This parameter receives
the server IP address followed by the port number.
-all: Starts all devices from the agent (Device IP not accepted)
Examples
1. Starts two specific devices with the IPs “192.168.0.1” and “192.168.0.2”
from a given agent.
C:\>jxdevsim device start -a 10.31.80.63:9090 192.168.0.1 192.168.0.2
Type operation [Start]
Device(s) Success = 2
2. Starts all stopped devices on an agent.
C:\>jxdevsim device start -a 10.31.80.63:9090 -all
Type operation [Start]
Device(s) Success = 3
64
Stop a Device
This operation stops devices from a specific agent. Along with the parameters, you must
specify the IP addresses of the devices that will be stopped.
Syntax
Jxdevsim Device Stop [-a] [-all] <Target IPs>
Parameters
-a: Agent where the SNMP simulator is installed. This parameter receives
the server IP address followed by the port number.
-all: Stops all devices from the agent (Device IP not accepted)
Examples
1. Stop a specific device from the simulator agent.
C:\>jxdevsim device stop -a 10.31.80.63:9090 192.168.0.1
Type operation [Stop]
Device(s) Success = 1
2. Stop all existent devices from the simulator agent.
C:\>jxdevsim device stop -a 10.31.80.63:9090 -all
Type operation [Stop]
Device(s) Success = 3
Show Devices
This operation displays the devices that are simulated on a specific agent. Along with the
parameters, you must specify the IP addresses of the devices that will be stopped.
Syntax
Jxdevsim Device Show [-a] [-all] <Target IP>
Parameters
-a: Agent where the SNMP simulator is installed. This parameter receives
the server IP address followed by the port number.
-all: Shows all simulated devices running on an agent (Device IP not
accepted)
Examples
1. Displays the information of a given device running on an agent.
65
C:\>jxdevsim device show -a 10.31.80.63:9090 192.168.1.7
|Model | Device IP | Status | Version | Simulated |
|----------------------------- | ------------------- | ----------------- | ---------- | -------------
|Flat APC UPS 1400 | 192.168.1.7 | RUNNING | V2 | Dynamic |
2. Displays general information of all devices running on an agent.
C:\>jxdevsim device show -a 10.31.80.63:9090 –all
|Model | Device IP | Status | Version | Simulated|
|-------------------- | --------------- | ---------- | ------- | ---------|
|JalaHP4108GL | 192.168.1.9 | RUNNING | V2 | Normal|
|Cisco PIX 520 Firewall | 192.168.0.3 | STOPPED | V2 | Dynamic|
|Cisco PIX 520 Firewall | 192.168.0.2 | STOPPED | V2 | Dynamic|
|Flat APC UPS 1400 | 192.168.1.7 | RUNNING | V2 | Dynamic|
|JalasoftF5 V9000 Reviewed | 192.168.1.4 | STOPPED | V2 | Normal|
|Cisco PIX 520 Firewall | 192.168.0.1 | STOPPED | V2 | Dynamic|
Command Save
This command saves all simulated devices along with its settings and dump files into a project.
Syntax
Jxdevsim Save [-a] [-p] [-r]
Parameters
-a : Agent’s IP address where the Simulator service is installed. This parameter
receives the server IP address followed by the port number.
-p: Specifies the file name in which the project will be saved.
-r: Specifies whether an existent file will be replaced or not by the new project.
Examples
1. Save your simulated devices in a specific path
C:\>jxdevsim Save -a 10.31.80.63:9090 -p "C:\MySimulationProject.xml" -r
Device(s) exported = 6
Dump(s) exported = 4
You can find the exported device(s) and Dump(s) in:
C:\MySimulationProject.xml
66
2. Save project in the default path
C:\>jxdevsim Save -a 10.31.80.63:9090 -p MySimulationProject2.xml -r
Device(s) exported = 6
Dump(s) exported = 4
You can find the exported device(s) and Dump(s) in:
C:\\MySimulationProject2.xml
Running commands from Scripts
Even though you can save the devices that you created with the simulator, as well as its
configurations, and these settings will remain just as you left them on your last save operation;
you might want to have some more flexibility and also store the operations you performed during
the creation of your devices. You can do this by running each one of your commands from a
batch file, later on when you’re executing them you will be able to deploy the desired devices by
simply executing this file manually or calling it from a script.
The following are some examples of running the CLI commands from a file:
1. Creating a batch file to add new devices; this file will contain the following
@echo off
title Testing for command line
echo starting ADD command. . .
jxdevsim device add -a 10.31.144.38:9090 -f 3comSwitch.xml -v 2 -c public
192.168.38.2
jxdevsim device add -a 10.31.144.38:9090 -f 3comSwitch.xml -v 2 -c public
192.168.38.3
jxdevsim device add -a 10.31.144.38:9090 -f 3comSwitch.xml -v 2 -c public
192.168.38.2
echo finish ADD command
echo Press any key to end . . .
pause>nul
2. Here we see the content of a batch file that performs several operations (ADD, STOP,
SAVE and REMOVE).
@echo off
title commands for Xian SNMP device simulator
REM These are the commands that are available for Xian SNMP device simulator
such as ADD, STOP, SAVE and REMOVE
echo starting ADD command. . .
67
FOR /L %%A IN (1,1,20) DO (
jxdevsim device add -a 10.31.80.63:9090 -f 3comSwitch.xml -v 2 -c public
192.168.0.%%A
)
REM %%A, it is the last octeto that will go from 1 to 20 in this case
echo Operation ADD completed
echo starting STOP command. . .
jxdevsim device stop -a 10.31.80.63:9090 -all
REM this command stops all devices from agent 10.31.80.63.
echo Operation STOP completed
echo starting SAVE command. . .
jxdevsim save -a 10.31.80.63:9090 -p "C:\DevicesExported.xml"
REM this command exports all devices managed by the agent to the specified
output file.
echo Operation SAVE completed
echo starting REMOVE command. . .
jxdevsim device remove -a 10.31.80.63:9090 -all -y
REM this command removes all devices from the specified agent.
echo Operation REMOVE completed
echo Press any key to exit . . .
pause>nul
3. Let’s say we want to create one Cisco Router and one HP Switch with Dynamic
simulation, two APCUPS’s running normal simulation and then, we would like to catalog
these devices to verify that they were created correctly. Finally, we would like to save
them into a project named SimulationProject.xml.
What I’m going to do first is create a new text file and in it type the following entries
jxdevsim device add -a 10.31.80.63:9090 -f CiscoRouter2621.xml -v 2 -c public -d
192.168.0.3
jxdevsim device add -a 10.31.80.63:9090 -f APCUPS.xml -v 2 -c public
192.168.0.4 192.168.0.5
jxdevsim device add -a 10.31.80.63:9090 -f HPSwitchProcurve4180GL.xml -v 2 -c
public -d 192.168.0.6
jxdevsim device show -a 10.31.80.63:9090 -all
jxdevsim Save -a 10.31.80.63:9090 -p "C:\SimulationProject.xml" –r
68
Next, I will save this file with the extension “.bat” and will name it “MyCommands.bat”
Now I can create a VB script from which the file will be ran. For example, we could type
the following entries on it.
dim shell
set shell=createobject("wscript.shell")
shell.run "MyCommands.bat"
set shell=nothing
Now I can save this file with the extension “.vbs” (i.e. DeviceSimulatorScrip.vbs ) and
run it from command line; see figures 4.1 – 4.2
Fig. 4.1
69
Fig. 4.2
As simple as that, after the script completes the execution, the new devices will be created
and saved in the root with the name “SimulationProject.xml.
Note. For all of the examples shown above, please take into consideration that the IP addresses
are correct; properly pointing to the agent and valid in the case of the devices. Also, please make
sure that none of them are already in use.
If you have any questions or requests, please contact [email protected]