|
If you cannot record a device (e.g., if you don't have one available, or it is under development), then you can create a basic simulation of a device by specifying the SNMP WALK file as input to the simulator. The walk file must be in the format as supported by the simulator.
A new device can be added in the device tree of the Network Designer, by specifying the ' walk file' through the GUI or from command line with other necessary arguments. The simulator also provides a command line utility to create a WALK file.
The command line utility WalkFileCreator.bat/sh enables you to create a walk file by specifying the hostname, community, port number of the agent and the name of the walk file. To use this utility,
1. Run the WalkFileCreator.bat/sh file in <SimulatorHome>/bin/cmdline directory. The following mandatory options must be specified.
-h <hostname>:
The hostname of the system where the agent is running.
-c <community>: The community name of the agent.
-p <port>: The port number where the agent is running.
-f <walk file name>: The walk file to be created.
Example: WalkFileCreator -h 201.202.203.29 -c public -p 8001 -f walkfile1
SNMP Device Creation from UI using WALK File
The Network Simulator provides option to create a device from a WALK file. The WALK file must be in the format supported by the simulator.
Right-click a group node and select Add Device . The DeviceAdditionWizard is displayed, wherein you have to specify the following details:
Device name : You can provide any device name.
Device Image : It is preferred that you choose a device image to differentiate between the devices in a network. A collection of images are available in <Simulator_Home>/devices/images directory. You can also provide your own image for the new device. Refer to Adding Device Images.
Device Type : Select the device type as SNMP Device from the list displayed.
To simulate the SNMP device using SNMP WALK file, select MIB WALK File tab.
WALK File: Select the WALK file from the required directory.
MIBs directory: Browse and select the MIBs directory where the MIBs related to the device are placed . If the MIBs directory is not specified, then the '<simulator home>/mibs' directory will be taken by default.
WALK File format : Specify the format of the walk file The formats currently supported will be listed here.
NumericOid=Value, for example .1.3.6.1.2.1.1.1.0=sysdesc
StringOid=Value, for example .iso.org.dod.internet.mgmt.mib-2.system.sysDescr=sysdesc
NodeName=Value, for example sysDescr.0=Hardware
NodeName:->Value, for example sysDescr.0:-->Hardware
NodeName Type Value, for example .1.3.6.1.2.1.1.1.0 DisplayString Hardware
NodeName Value, for example sysDescr.0 Hardware
NumericOIDValue, for example .1.3.6.1.2.1.1.1.0 sysdesc
|
|
Note: The
format "NumericOIDValue"
is supported if a UCD WALK is
made with option -O
tenq Out put option with |
Click Create to add the device to the device tree.
Device Creation from Command Line using Walk File
The WalkFileConfigCreator.bat/sh is a utility to create an SNMP configuration from command line by specifying a WALK file as input. The WALK file must be in the format supported by the simulator. The configuration can then be used in the Network Designer UI to create a device in the device tree.
Run the WalkFileConfigCreator.bat/sh file in <SimulatorHome>/bin/cmdline directory. The following mandatory options must be specified.
-w <Walk
File>: The name of the Walk file.
-c <ConfigFile>: The name of the configuration file to be created. The configuration will be created inside <SimulatorHome>/snmpagents directory
-m <mibs directory>: The directory name, where all the related MIBs are present. If the MIBs directory is not specified, then the '<simulator home>/mibs' directory will be taken by default.
-f <walk file format(1 to 6)> : Specify the supported walk file format number. The supported formats and their corresponding numbers are given below.
|
Walk file format |
Walk file format number |
|---|---|
|
.1.3.6.1.2.1=value |
1 |
|
.iso.org.dod=value |
2 |
|
sysName=value |
3 |
|
sysName.0:-->value |
4 |
|
.1.3.6 DisplayString value |
5 |
|
sysName value |
6 |
|
.1.3.6.1.2.1 value |
7 (This format is supported if a UCD WALK is made with option -O tenq ) |
-tn <TableName>: The name of the Table to be created.
-dn <DatabaseName>: The name of the Database to be created. The default database name is simulatordb.
Example
sh WalkFileConfigCreator.sh -w /advent2/test/walk_str_oid_value -m /advent2/ADVENTNET_PRODUCTS//Simulator5/mibs/mibs_dir/ -c host4_agent -f 1
After creating the SNMP Agent configuration, you can add a device in the device tree of the Network Designer by specifying the configuration files.
|
|
Note:
While
creating the device using Walk File, the format has to be uniform throughout
the file. If the walk file is created with mixed formats as given below,
it will hinder the creation of the device. |
|