Junos Space SDK > Developer Guides > Junos Space Application Developer Guide > Getting Started > Configuring your Environment

Using the Device Simulator

The Device Simulator is a Juniper Networks device simulator that runs in the JSVA and simulates real devices for use in the development of SDK applications that interact with devices.

The Eclipse SDK plug-in provides an Eclipse view for configuring Device Simulator devices, viewing simulator status, and starting and stopping devices. Procedures for performing these operations are provided below.

Launching the Device Simulator View

The Device Simulator view is launched by selecting the Manage Simulated Devices option on the File > Junos Space menu or by clicking the "Manage Simulated Devices" icon on the Eclipse tool bar. The DMI Simulator Status screen shown below appears.

This screen initially lists each configured device, providing the device type, port number and IP address for each device. This information is read from the n.conf device configuration files stored in the /home/admin/dmiSim/devices directory in the JSVA.

This screen has these fields and controls:

Device Simulator Status View Fields
Device Type Type of Juniper Networks device being simulated.
Server: Port TBD.
Device IP IP address of the device.
Device Status The up or down status of the device.
Refresh Status Table Button that causes the n.conf files to be reread and their information re-displayed in the table.
Total Configured Instances Displays the number of device instances detected.
Stop Instances Button that stops all running simulated devices. Button is enabled when simulated devices are running.
Start Instances Button that starts the configured devices.
Configure Launches the Device Simulator Config dialog box where you create new Device simulator devices.
Server Details Displays information about the state of the simulator.

Device Simulator View Procedures

Starting and Stopping the Device Simulator Devices

To start and stop the simulator, perform these steps:

  1. Launch the Device Simulator view. From the Eclipse menu bar, select Junos Space > Manage Simulated Devices.
  2. To start devices:
    • Click Start Instances. All simulated devices in the DOWN state will start running.
  3. To stop devices:
    • Click Stop Instances. All simulated devices in the UP state will stop running.

Configuring Devices

Device "configuration" performed in the Device Simulator view will replace any previously configured device files with a new set using the values you specify in the Device Simulator Config window. You define the value to be used in the third octet of the IP addresses assigned to the simulated devices, and specify in the screen's configuration table a given number of devices of a listed type (MX, Asgard, Hurricane, etc.) to create. When you click Finish, the devices are created with the specified values. Existing devices (n.conf files) are replaced with new ones.

The DMI Simulator Config screen is shown below. Note that the device types listed in the screen, and the first band second octets preceding the third octet pull-down menu, are user-configurable in the JSpaceSDKPlugin.properties file described Configuring Device Simulator View Parameters.

To configure devices:

  1. Select File > Junos Space > Manage Simulated Devices from the Eclipse menu bar.
  2. Select a value for the third octet of the device IP addresses from the 3rd Octet pull-down menu.
  3. For a given device type, enter in its Number of Instances field the number of devices of that type to create. Repeat for additional device types you want to create.
  4. Click Finish. The selected device definitions are created with the specified 3rd octet value.

Configuring Device Simulator View Parameters

The Device Simulator view uses settings stored in a properties file named JSpaceSDKPlugin.properties, located in the JunosSpaceSdkPlugin directory in the Eclipse plug-ins directory, eclipse\plugins\JunosSpaceSdkPlugin_<version>.

The parameters in this file that you might need to configure are described in the following table:

JSpaceSDKPlugin.properties Values
HOST_NAME Specifies the IP address of the JSVA.
USER_NAME Username for the administrative account on the JSVA used by the Device Simulator view to perform operations in the JSVA.
PASSWORD Password for the administrative account specified in the USER_NAME variable.
PORT sshd port used by the Device Simulator view to ssh into the JSVA and perform operations in the JSVA. This port is configured in the JSVA in /etc/ssh/sshd_config.
TWO_OCTET Specifies the first two octets of the IP address range that will be assigned to the simulated devices. These octets will appear in the DMI Simulator Config window as a prefix to the 3rd Octet pull-down menu.